|
|
Re: How to get internal.compiler ASTnodes from core.dom ASTnodes? [message #1790562 is a reply to message #1790547] |
Wed, 13 June 2018 01:24 |
Federer Roger Messages: 30 Registered: December 2017 |
Member |
|
|
I need to finish a tool demo using a web editor code-mirror. There are two scenes. Content highlight and Open Declaration. Of course, I want to use JDT-core as the back-end to support these features.
If I select a variable all same words are highlighted. I guess it may be implemented by getting all the references of this target ASTNode. However, I can't find any useful method in public AST classes like (getReference or getReferenceBinding). And I also have this problem in OpenDeclaration. I can't find any method or interface like (findDeclaration or getDeclaration) in public AST or public IBinding classes.
I download jdt-core and jdt-ui source code and debug my need in Eclipse. But I see a lot wrapper classes like IJavaElement or IJavaProject as a parameter in the MatchLocator or Search class. In fact, I am not sure if I can achieve my goal by using JDT as a standalone application.
[Updated on: Wed, 13 June 2018 01:26] Report message to a moderator
|
|
|
Powered by
FUDForum. Page generated in 0.04727 seconds