goodwinnk / eclihx

Automatically exported from code.google.com/p/eclihx
0 stars 0 forks source link

Code completion #34

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Today eclihx uses the official haxe compiler for the code completion. It is 
available only for getting functions of a current definied variable. I want 
to create a code completion like java jdt tool. It's not easy but it's a 
good challenge.
Yesterday i have shown the official source code from jdt. It's a very nasty, 
there is lot of code and it's so specific to java

Original issue reported on code.google.com by sylvain....@gmail.com on 6 Oct 2009 at 9:00

Attachments:

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
I believe this ticket should be renamed or merged to "Improved haxe editor" as 
code
completion requires a fairly developped AST. 

Nikolay had a quick look at DLTK (http://www.eclipse.org/dltk/) as a way to 
provide a
large part of the functionality. The AXDT plugin (as3 dev in eclipse, see
http://axdt.org/) uses IMP (http://www.eclipse.org/imp/). However reading the 
axdt
website I found an interesting ticket explaining their desire to use Xtext
(http://www.eclipse.org/Xtext/) instead of IMP. So I explored Xtext a bit as 
well.
Here are a few interesting pointers:

- An interesting Xtext webinar:
  http://live.eclipse.org/node/705
- A comparison between IMP, Xtext, and Cie in the 1st paper of this 2008 
conference:
  http://www.dsmforum.org/events/DSM08/
- Xtext suitable for javascript like DSL?
  http://www.openarchitectureware.org/forum/viewtopic.php?showtopic=13862
- Some guy developing a grammar for haxe (could be used in xtext):
  http://haxe.org/forum/thread/476

From all this I understand that: Xtext is more polished and would be very well 
suited
in building the parser+AST+editor with code completion, error linking, and 
more. IMP
can do it however more java coding would be required (using visitors). It seems 
that
IMP could do more analysis and searching than Xtext but that has to be 
verified. So I
guess if we look for a more evolved editor Xtext will be the way to go. Other
features will have to be hard coded or reused from IMP/DLTK...

My suggestion: before working a new haxe editor, a significant effort, how 
about the
low hanging fruit of applying xtext for hxml files?

Original comment by fmjrey on 7 Oct 2009 at 8:37

GoogleCodeExporter commented 9 years ago
Well ok if there is a better framework which provides code completion, error 
linking 
and others, it's a better choice than develop it from scratch. 

Original comment by sylvain....@gmail.com on 7 Oct 2009 at 9:46

GoogleCodeExporter commented 9 years ago
Follow up on the development of a grammar for haXe:
http://haxe.org/forum/thread/634

Such grammar could be used as an inspiration for creating an Xtext
(http://www.eclipse.org/Xtext/) grammar.

Original comment by fmjrey on 9 Oct 2009 at 9:35

GoogleCodeExporter commented 9 years ago
Just started a new thread on the haXe forum:
http://haxe.org/forum/thread/648

It's about having the haXe compiler run on top of the JVM, thus enabling easier 
IDE
integration for code completion, on-the-fly and incremental compilation. The
OCaml-Java toolkit (http://ocamljava.x9c.fr/) can be used for that purpose.

Original comment by fmjrey on 9 Oct 2009 at 10:36

GoogleCodeExporter commented 9 years ago
I got the xtext sample and renamed all names for eclihx.hxml customization. The 
result is very interesting, we obtain lot of class with eclipse inheritance and 
we 
can override the methods as we want.

I have committed the project in 3 branches. 
The eclihx.hxml contains the generating file which create all files : 
GenerateHXml.mwe It uses the HXml.xtext which contains the grammatical language 
specification. 

If you want to try the sample, you must start the eclihx.ui project and create 
a 
.hxml file and you can try the code completion (CTRl+SPACE).

Original comment by sylvain....@gmail.com on 9 Oct 2009 at 12:06

GoogleCodeExporter commented 9 years ago
http://img48.imageshack.us/img48/9566/firsto.jpg
http://img48.imageshack.us/img48/817/capture2z.jpg

Original comment by sylvain....@gmail.com on 15 Oct 2009 at 6:41

GoogleCodeExporter commented 9 years ago
Just making a note of the new axdt plugin which uses xtext for its as3 editor. 
The soon to be released plugin web site is here:
http://new.axdt.org/
It seems considerable time has been spent getting it to work, Helios+xtext 1.0 
required.
Editor source code with grammar file here:
http://new.axdt.org/browser/as3/as3-runtime/src/main/java/org/axdt/as3
It should certainly provide some inspiration...

Original comment by fmjrey on 29 Jul 2010 at 8:26

GoogleCodeExporter commented 9 years ago
Here some other code completion enhancements:

If you press Ctrl+Space within a method, you should get codecompletion entries 
for class members (like in 'this.'), static class members (like in 
'ClassName.'), available classes (for later accessing of static members).

Support for code templates. i.E. New Method/Type Template in class body.

Original comment by danielk...@gmail.com on 27 Nov 2010 at 12:05

GoogleCodeExporter commented 9 years ago
Two more: 

Display HaxeDoc on CodeCompletion.

If you hover variables, method calls, class names etc. you should get the 
declaration and HaxeDoc in a tooltip. (type information)

Original comment by danielk...@gmail.com on 27 Nov 2010 at 12:08

GoogleCodeExporter commented 9 years ago
 support for Code templates would be a very welcome addition

Original comment by fintanbo...@gmail.com on 31 Dec 2011 at 3:27