Lines 33-40
Link Here
|
33 |
public ASTNode findNode(org.eclipse.jdt.core.dom.CompilationUnit ast) { |
33 |
public ASTNode findNode(org.eclipse.jdt.core.dom.CompilationUnit ast) { |
34 |
// For field declarations, a variable declaration fragment is returned |
34 |
// For field declarations, a variable declaration fragment is returned |
35 |
// Return the FieldDeclaration instead |
35 |
// Return the FieldDeclaration instead |
|
|
36 |
// For enum constant declaration, we return the node directly |
36 |
ASTNode node = super.findNode(ast); |
37 |
ASTNode node = super.findNode(ast); |
37 |
if (node == null) return null; |
38 |
if (node == null) return null; |
|
|
39 |
if (node.getNodeType() == ASTNode.ENUM_CONSTANT_DECLARATION) { |
40 |
return node; |
41 |
} |
38 |
return node.getParent(); |
42 |
return node.getParent(); |
39 |
} |
43 |
} |
40 |
/** |
44 |
/** |