Currently, enum constants only save their name, so their arguments get lost.
The arguments are delivered by the Java Parser API, so I hope it is easy to add a property for them.
I am not sure how you decide whether to safe AST children as fields or create edges for them, and also I would not know how to integrate it into the DeclarationBuilder so that other language modules are not affected, so I'd rather leave this one up to you.
(I'm sorry that I did not get around to give feedback on your last proposed fix, but I did not run into any more trouble so far. Thanks!)
Example:
public enum ChessPiece {
PAWN("Bauer",1),
KNIGHT("Springer", 3),
BISHOP("Läufer", 3),
ROOK("Turm", 5),
QUEEN("Dame", 9),
KING("König", -1);
private final String name;
private final int value;
ChessPiece(String name, int value) {...}
}
Currently, enum constants only save their name, so their arguments get lost. The arguments are delivered by the Java Parser API, so I hope it is easy to add a property for them.
I am not sure how you decide whether to safe AST children as fields or create edges for them, and also I would not know how to integrate it into the DeclarationBuilder so that other language modules are not affected, so I'd rather leave this one up to you.
(I'm sorry that I did not get around to give feedback on your last proposed fix, but I did not run into any more trouble so far. Thanks!)
Example: