Tuesday, January 29, 2008

Gengetopt Eclipse

I finally made it to create my very first eclipse plugin! :-)

Since I'm using eclipse for most of the time I wanted to get my hands dirty also with eclipse programming!

The eclipse plugin architecture and framework is very powerful, but I can't say it's quite easy to understand... at least at the very beginning. But probably this is only the main drawback of every framework (e.g., all the GUI frameworks...) and with the right documentation, the learning curve gets better every day.

Besides the documentation you find on-line, I've been using the book Eclipse: Building Commercial Quality Plug-ins, Second Edition, by Eric Clayberg and Dan Rubel (Addison-Wesley, Second Edition, 2006), which really does a very good job in explaining the eclipse plugin architecture in many details and providing a lot of code (without which, it would be otherwise quite hard to get acquainted with eclipse programming).

The plugin I decided to develop was an editor for GNU Gengetopt files, so that I could easily write those files in all my GNU projects (which are in C++, and I'm using eclipse also for them).

As for eclipse editor programming, the book above did not help a lot... fortunately, I found some more information in the book Eclipse in Action, which is a little bit out of date, but it still contains valueable information.

Here's some more info:

You can find Gengetopt Eclipse here: http://ggoeclipse.sourceforge.net

Gengetopt Eclipse is an Eclipse plugin providing an editor for GNU Gengetopt input files.

For the moment, this editor provides syntax highlighting and code completion (new features will be added in the future).

There is currently no associated builder, since it is assumed that gengetopt files are used in projects using makefiles.

Gengetopt eclipse is free and open source, under the GNU GPL License.

Installation

As with most eclipse plugins, the easiest way to install gengetopt eclipse is via the eclipse update manager:
  1. Help -> Software Updates -> Find and Install
  2. Search for new features to install
  3. New Remote Site
  4. Name: Gengetopt Eclipse, URL: http://ggoeclipse.sf.net/update
Alternatively, you can download the zip file containing the plugin and unzip it inside the eclipse directory. The zip can be downloaded from here: http://sourceforge.net/projects/ggoeclipse.

Sources

The sources of gengetopt eclipse can be obtained via CVS (you can find the instructions here: http://sourceforge.net/projects/ggoeclipse)

Screenshot


4 comments:

Eric Clayberg - Instantiations said...

Thanks for the kind words about our book. I just wanted to let you know that a 3rd edition (based on Eclipse 3.3 and 3.4) is currently in the works and will be available later this year.

betto said...

Hi Eric!
I'm glad you read this post!
I'm really enjoying your book and it helps a lot in understanding eclipse programming.

I wish there could be a chapter about editors for programming languages also :-)

I hope the errata I sent you could help for the new edition.

I look forward to the new edition.

Lorenzo

Lynn Gayowski said...

You should consider posting your plug-in to http://www.eclipseplugincentral.com.

-Lynn from Eclipse

betto said...

Thanks for the suggestion!

I've done that: http://www.eclipseplugincentral.com/Web_Links-index-req-viewlink-cid-1177.html