-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Java Frontend: EnumDeclarations do not get any content other than entries #1445
Comments
Hi :) Thanks for reporting the Issue. I will look into it and find out what the best option is there. I assume you mean in the Java language Frontend? |
If you have a specific piece of code that shows the issue I'd love to test it out. |
Yes, here's a sample class. For me, the resulting GitHub wouldn't let me upload a .java file, so here's the file zipped. Here's the content:
|
Thanks for that :) if you already have something that is not finished but shows an approach that you would follow you can submit a draft PR and signal what is missing or still not working. |
It turned out my approach did work, it was only my test that was wrong. Have a look :) |
Hello CPG team,
the
de.fraunhofer.aisec.cpg.frontends.java.DeclarationHandler
ignores themembers
ofenumDecl
in the methodhandleEnumDeclaration
, so any newEnumDeclaration
does not get any fields, methods, constructors that it may need.Import statements are also not considered, unlike for records.
I copied and adapted the relevant parts of
handleClassOrInterfaceDeclaration
(lines ~227-303) over tohandleEnumDeclaration
, and that seemed to work quite well as a start, but I could not get it to work completely in the end.I hope you can have a look into it.
The text was updated successfully, but these errors were encountered: