Re: I need some advice on writing an eclipse plugin

"Philippe Ombredanne" <[email protected]> Thu, 23 Nov 2006 18:50:06 -0800
Newsgroups gmane.comp.ide.eclipse.phpeclipse.devel
Message-ID <033801c70f73$4424da30$6800a8c0@computer>
Hi Larry:
Do you know about those two projects ? (Just asking of course, you must
know :-) )
http://www.dsource.org/projects/ddt
and
http://www.dsource.org/projects/descent

About JDT reuse, here are some thoughts. (I was not the original
committer that did that.)
- modify as little as possible, and avoid reformatting or refactoring
things if possible, ideally limiting yourself to plugin id changes.
Changing packages names and classes names is evil if they are no other
changes.
We did that on phpeclipse and that is a problem imho.
- if you can , try to reuse some plugin as is (which is hard with the
jdt which is so monolithic)
- keep a precise track of the changes you do. A good way to do that
(with CVS but any VCS has similar capabilities) is to make an import of
a specific recent and working JDT version from a tag in a vendor branch,
and start making modifications based on that.  

The whole goal is to be able to track changes to the JDT, as much as
possible, so you can benefit from enhancements as they come. (Of course
we did not do that for PHPEclipse :-\!  and that is an issue today)

Beware also that many feature in JDT have a complex implementation for
many reasons:
-- legacy, and frozen accidents once API were publised
-- specific Java needs
So not everything is good to take.

Also the JDT as a sophisticated builtin incremental java compiler. This
si something that is real hard to reproduce for your plugin.

If I were to do it from scratch, I would probably make a lot of use of a
parser generator, and try mix that with JDT code. My preferences would
go to antlr.

--
Cheers
Philippe

philippe ombredanne | 1 650 799 0949 | pombredanne at nexb.com
nexB - Open by Design (tm) - http://www.nexb.com
http://easyeclipse.org  -  irc://irc.freenode.net/easyeclipse
http://phpeclipse.net  -  irc://irc.freenode.net/phpeclipse


-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Ary
Manzana
Sent: Tuesday, November 21, 2006 3:23 PM
To: [email protected]
Subject: [Phpeclipse-devel] I need some advice on writing an eclipse
plugin


Hello.

I'm writing an Eclipse plugin for the Digital Mars D programming
language. I'll try to copy what is done in JDT by looking at the source
code. I also thought it should be a good idea if I look at PHPEclipse
source code.  Well I did, and find out you also copied JDT structure...
almost identicaly :-D 

I'd like to know how you did it, if you could give me some advice on
where starting, what to do... I currently have a parser, I don't know if
I should use some particular parser (like Jikes).

Thanks in advance, 
Ary



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV