Extending iGROM


Generally, programming in the iGROM framework can be divided into two categories:

  • adding support for additional languages,
  • modifying the core framework.

Depending on what you want to do, you need partially different resources. The final two sections of this page list those. But first...

A word of warning by the original author (optional)

Keep in mind that the code contained in this framework is by no means perfect and flawless. This is because:

  • the project had a limited time budget for its initial phase. This is especially a problem due to the fact that
  • the original contributor (Yours Truly) was at a starter level of knowledge on all the underlying technologies (apart from some minimal experience with the Eclipse plugin platform, and writing an ANTLR parser - for Python). Therefore, some errors were made early in the design that caused inefficiencies, for example the large amount of boilerplate XML content. However, due to the time constraints, the API had to be frozen at some point, in order for the iGROM to be released at all.

The problem was especially relevant in the case of the DLTK. Now, don't get me wrong, the developers of that toolkit made a great contribution to the Eclipse platform and I am very thankful for their work (and their help on the mailing list!), but at the time this project started DLTK had a relatively mutable API, that was occasionally incompatible between the qualifier version numbers. Eventually iGROM dependencies were locked with a DLTK 1.0.0 requirement, and a specific version qualifier. The aforementioned API instability caused several delays however, as learning and adapting to a new API while it is changing (slightly, but still) every two weeks is understandably bound to do. Once again, this is not a criticism of DTLK, but a presentation of the development scenario here.

In short: the original author is aware of a number of design shortcomings in the project, but unfortunately had to lock the API at the current form due to time constraints. The priority for the first version, quite frankly, was functionality, and this has been achieved.

As a corollary - if you see something weird in the structure or design of the project, don't assume it's for a reason - instead, feel free to ask away!

OK, guilt-driven rant is done, now for the useful stuff.

Development environment

The recommended environment is the Eclipse for RCP and RAP Developers edition, either 3.5 (Galileo), or 3.6 (Helios), with the following plugins:

  • ANTLR IDE - currently 2.0.2, for compatibility with DLTK 1.0, including the org.deved.antlr project,
  • the DLTK 1.0 SDK (which you will download as a dependency for ANTLR IDE - note that at the moment you need a specific version which you can find in the iGROM plugin manifests),
  • Subversive, for SVN access. I recommend Subversive over Subclipse, because it uses the generic Team Provider user interface, which matters if we switch to another SCM.

Adding support for a new language

To add support for a new language, you will find the following resources useful:

  • The PDF tutorial provides you with a complete description of what to supply to create plugins for new language support,
  • the Core Javadoc will give you additional insight into the base classes, finally,
  • the actual implementations provide a source of "learn by example". They're accessible via the repository. Direct access is via https://igrom.svn.sourceforge.net/svnroot/igrom (no login required, read-only).

Using the above, you should be able to create a new language editor from scratch. If you run by any problems use our forums, specifically, this one.

Extending the iGROM framework

For this task, it is recommended, it is strongly recommended to contact the developer on the forums with your proposal for changes, as your idea may be already worked on.

Here are the resources needed for tasks in this category:

  • The source code repository (direct access: https://igrom.svn.sourceforge.net/svnroot/igrom), first and foremost,
  • the Core Javadoc will give you an at-a-glance view of the base classes in the framework,
  • the Complete Javadoc contains all the framework classes,
  • the DLTK framework page - since it the library for the iGROM framework, it is strongly recommended to get acquainted with it for development purposes.

For questions, comments relating to framework extension, please use the General Discussion forums... and thank you for your willingness to contribute :). Below you will find some ideas you can start with.

Ideas for iGROM development

Here's a list of ideas to get you started.

  • Administrative: automate release management (Javadoc, RCP application creation, etc.).
  • Update to DLTK version 2.
  • Add proper AST support to iGROM Core, and to the implemented languages. This is required to...
  • Add refactoring support, renaming of identifiers in particular.
  • Update the DLV parser to the current version.
  • Add support for other languages, such as CLASP.

Of course, getting completely creative is also welcome!