intellij-haxe
intellij-haxe copied to clipboard
Use Haxe compiler as the completion engine for IDEA
IDEA currently depends upon the FindUsages database for code completion (suggestions). The Haxe compiler itself has been extended to provide completion support, and it’s contextually aware. Make the IDEA plug-in use the Haxe compiler as a completion engine.
TIR: STB-2901
This one perhaps can be reopen.
I agree, the change (number 9) that was fixed, I think was from Elias' (eliasku) branch. This was closed when I merged the changes from there over to TiVo's branch.
Is it meant to be working now? I get more and more into macro programming in haxe and it's very useful if IDE suggests things that macros has generated.
This is by far the most awaited feature :-)
If I recall correctly I implemented support for it for OpenFL projects, need to test.
Is there anything we can do to help with this? It has been an open issue for months and I don't understand what's causing problems here.
Getting basic completion done should be a matter of invoking the Haxe compiler with the usual compilation parameters (as if you were compiling normally) and an additional --display argument. The IDE only has to figure out which (byte) position the caret is at and then parse the XML string the compiler writes to stderr.
There is no problem other than lack of time. Other issues are being focused on; there was a believe that spot fixing the existing parser that was already implemented into the plugin was the better short term solution, but in hindsight it may not have been the best approach. However when starting trying to improve the plugin, beginning by ripping out and throwing away huge parts of it didn't seem like the best initial course of action. So now we're well down the path of doing spot fixes to the existing parser and the plugin infrastructure surrounding it.
I believe that we'd be very pleased if someone took on the effort of replacing the plugin's parser with calls out to the haxe compiler. If nobody else does this I expect we'll get around to doing it eventually. I can't say exactly when that would be as we're still fixing other bugs, including non-parser-related bugs.
I wonder if there is something Haxe compiler could provide for IDE that it doesn't provide right now and is required by (or "would be good for") IDEA.
I need to test this feature on different kinds of projects, for OpenFL it used to work for me.
Using the haxe compiler right now causes freezes during typing as the compiler is not kept alive and doesnt cache results. Completion stutters and blocks on waiting for haxe.exe to exit.
It needs to be reworked to run kept alive.