Eclipse plugin
Ary Manzana
ary at esperanto.org.ar
Mon Oct 30 18:53:38 PST 2006
Bill Baxter escribió:
> Actually I could do without a full-blown IDE if there were just a
decent
> visual debugger. For writing code I'm fine with emacs, but debugging
> via printfs is annoying. And don't go telling me about that crashy
> WinDbg thing -- it's just not up to snuff.
I agree. Well, making the debug thing is the most difficult part, but it
would be very nice to have it, although right now I'm not feeling
capable of doing that (I know little about compilers, debuggers, etc.).
Eclipse provides a framework to hook some debug stuff, so I guess it
won't be (that) hard to do it.
Well, I've cleaned up a bit the code and here it is:
http://www.esperanto.org.ar/d/descent.ui.zip
Umm... Uncompress everything in the eclipse directory, and everything
should work. In the plugins directory there are three jars (core, ui and
tests... I forgot to mention I made a lot of tests), source code
included, so you can take a look and not feel that scared (the most
important is descent.core).
Before starting you should know the plugin compiles with "dmd" only, and
it searches it in the environment path (I only tried it in Windows). I
put an option in a property page to change it, but I couldn't get to get
it working :-(
Go to File -> New -> Project -> D -> D project, enter a location and hit
it. You should see a "src" folder in the project. There you must create
the d files (File -> New -> File -> foo.d). While you write the file, if
you stop typing you should see error markers appearing, as well as the
outline view being updated. If you save the file you should see *all*
the errors, since I parse dmd output (I will drop these once the plugin
gets all the errors by itself). Also, obj and di files are created when
saving, so compiling is faster.
Well... that's all for now. I know it's less (maybe?) than what DDT has,
but maybe it's a bit more organized, and it uses incremental building
(just for single files, not for projects yet).
The next step would be to understand the semantic routines and add them
to the code. I guess I won't have to copy all the source code since I
only need to get errors, not to compile anything... I wonder if making a
visitor would be easier to get the semantics done...? Any ideas...?
More information about the Digitalmars-d
mailing list