Replies: 3 comments 2 replies
-
Now I started with the first test case which is One way would be to resolve bindings for each type we find from type search by converting Types into Reference and resolve Bindings. For that We need to have a reference to CompilationUnitDeclaration which we are completion on to get the scope for binding resolution. Before I start on this path I would like to see other suggestions which we can achieve the same. @mickaelistria @datho7561 @snjeza @testforstephen Any ideas ? |
Beta Was this translation helpful? Give feedback.
-
I added a poc MR with some changes for resolving type bindings as well. #653 I think we could try to a cache type bindings during a single completion run if we see that we repeatedly resolving the same bindings as we improve the DOMEngine. I really need some input since even though I have works a lot in CompletionEngine issue fixing, there are lot I don't yet know as well. I would really like to get input from everyone may be from the members in jdt.core project who also has lot more experience in this area. |
Beta Was this translation helpful? Give feedback.
-
One thing that I'll comment on is that we think that DOM-based completion won't be good with ECJ, because the parser that's used for building the IJavaElements is not as fault-tolerant as the one that's used for completion. The completion version of the ECJ parser (CompletionParser) uses a strategy where it inserts a special node in the AST that indicates where the completion was triggered. It creates this special node by performing some string manipulation on the source file. It does this, because when completion is invoked, the Java document is almost always in an invalid state. javac leaves invalid nodes in the AST tree. For example, if you have I don't know how much of what I've said is useful to you. I have worked with |
Beta Was this translation helpful? Give feedback.
-
Background
I started to work on enabling CompletionTests with DOMCompletionEngine, the high level plan is
Create a new Javac Suite
Take on test at a time
Improve the DOMCompletionEngine to make tests pass
Repeat last 2 steps until we have all tests passing
Now the idea is to just add features in DOMEngine until we have tests pass which gives us a good standing group to refactor the DOMEngine to make sure it is maintainable as well.
Beta Was this translation helpful? Give feedback.
All reactions