intellij-haxe icon indicating copy to clipboard operation
intellij-haxe copied to clipboard

Use Haxe compiler as the completion engine for IDEA

Open EBatTiVo opened this issue 11 years ago • 10 comments

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

EBatTiVo avatar Aug 19 '14 04:08 EBatTiVo

This one perhaps can be reopen.

as3boyan avatar Sep 10 '14 15:09 as3boyan

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.

EBatTiVo avatar Sep 10 '14 17:09 EBatTiVo

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.

grisevg avatar Oct 13 '14 08:10 grisevg

This is by far the most awaited feature :-)

nadako avatar Oct 21 '14 17:10 nadako

If I recall correctly I implemented support for it for OpenFL projects, need to test.

as3boyan avatar Jan 29 '15 18:01 as3boyan

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.

Simn avatar Feb 13 '15 19:02 Simn

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.

bji avatar Feb 13 '15 20:02 bji

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.

nadako avatar Feb 13 '15 22:02 nadako

I need to test this feature on different kinds of projects, for OpenFL it used to work for me.

as3boyan avatar Feb 23 '15 17:02 as3boyan

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.

CanIGetaPR avatar Apr 22 '24 12:04 CanIGetaPR