Hi,
I'm developing an Eclipse plugin. I need to find all the references in the source using AST's or
jdt.core.dom
or something like that. I need this references likeASTNodes
in order to get the parent node and check several things in the expression where references are involved. Thanks beforehand.
Edited:
I want to concrete a little more, My problem is that I try to catch some references to a constant but... I have not idea how I can do to catch in the matches this references. I need check the expressions which the references to a determined constant are involved. I only get the source of the method where they are used.
I think the problem is the scope or the pattern:
pattern = SearchPattern.createPattern(field, IJavaSearchConstants.REFERENCES);
scope = SearchEngine.createJavaSearchScope(declaringType.getMethods());
Thanks beforehand!