Open datho7561 opened 4 days ago
Possible roadblock: currently, the AST returned after conversion seems to turn List
myList = new into List myList; instead of preserving the new by doing something like List myList = new $missing$().
What about the Tree returned by Javac? Is there some useful info we lose in translation?
Yes, the info is in the javac AST. Currently, we are explicitly preventing it from being added into the translated JDT AST. I have a work in progress PR that removes this and gets constructor completion (sort of) working, however this will probably cause some of the AST conversion tests to regress.
I hope that if we guard the creation of the node with a check whether recovery is enabled, we can keep both completion and tests happy.
eg.
should complete, for example,
ArrayList<String>()
orList<String> { ... }
.Also:
Should suggest possible constructors. The JDT behaviour seems to only suggest local types in this case for performance reasons.
Possible roadblock: currently, the AST returned after conversion seems to turn
List<String> myList = new
intoList<String> myList;
instead of preserving thenew
by doing something likeList<String> myList = new $missing$()
.