Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » How to get internal.compiler ASTnodes from core.dom ASTnodes?
How to get internal.compiler ASTnodes from core.dom ASTnodes? [message #1790476] Mon, 11 June 2018 10:06 Go to next message
Eclipse UserFriend
As I known, jdt has two sets of implementation for FieldDeclaration, MethodDeclaration and TypeDeclaration. If I have already got the ASTNode in core.dom, can I get the corresponding internal.compiler ASTNode?
Re: How to get internal.compiler ASTnodes from core.dom ASTnodes? [message #1790547 is a reply to message #1790476] Tue, 12 June 2018 13:21 Go to previous messageGo to next message
Eclipse UserFriend
Package o.e.j.internal.compiler.ast is "internal", and thus not intended to be used by clients.
Why wouldn't the public AST suffice for you?
Re: How to get internal.compiler ASTnodes from core.dom ASTnodes? [message #1790562 is a reply to message #1790547] Tue, 12 June 2018 21:24 Go to previous message
Eclipse UserFriend
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: Tue, 12 June 2018 21:26] by Moderator

Previous Topic:Problem for updating Eclipse Oxygen
Next Topic:How to use Nd structure to store CompilationUnit and BindingResolver info?
Goto Forum:
  


Current Time: Thu Jul 24 18:56:51 EDT 2025

Powered by FUDForum. Page generated in 0.03255 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top