Well, I am writing an IDE.... That must have good autocompletion. However, as it seems, the current server protocol / commandline "api" is critically flawed....
The problem: Pressing DOT / Opening bracket into my editor must call the compiler with my (still unsaved) file.... yeah, STILL UNSAVED! I do NOT want to force Save all the time user presses DOT!
It is ugly, it's bad!
FEATURE REQUEST: Fix this flawed design. The next code is a dream code that I hope will become reality ASAP...
C:\path\to\project> haxe compile.hxml --display input [enter]
[haxe.exe is now accepting from STDIN]
class something {
/* ... */
...
var s = "Test";
s.
[end of stdin - Ctrl+Z or whatever. Now haXe returns to STDOUT as usual:]
<list>
<i n="length"><t>Int</t><d>...</d></i>
<i n="charAt"><t>index : Int -> String</t><d>...</d></i>
<i n="charCodeAt"><t>index : Int -> Int</t><d>...</d></i>
<i n="indexOf">
<t>value : String -> ?startIndex : Int -> Int</t>
<d>...</d>
</i>
...
</list>
If this is implemented, my IDE can just use classic STDIN/STDOUT IPC with Haxe. Without saving! Just that?
Also, I need convenience features like this:
C:\path\to\project> haxe compile.hxml --display class:String
C:\path\to\project> haxe compile.hxml --display class:String --show-private-members
returns data about the specified class so I can index it into my IDE and show it into my class browser.
The Socket / Cache Server API may be similar. Passing --display input, then, sending a packet with the source code till the cursor position.
Also:
C:\path\to\project> haxe compile.hxml --display input@73 [enter] full source code to STDIN followed by EOF / Ctrl+Z
So please, please improve this. You will help not only FlashDevelop! you will help all of us that write IDEs
And also small good features that I hope didn't overlooked if already exist:
C:\path\to\project> haxe --makefile:myProject.xml --classexts:hx,haax,haxe,haxx
The first option allows usage of makefile with different than hxml extension, for example myproject.xml or someTarget.hxtarget
The second option makes haxe to treat *.hx, *.haax, *.haxe and *.haxx files as haxe modules.