PIMP your Eclipse: Building an IDE using IMP
So your favorite programming language has no Eclipse-based IDE. What to do? Spend months or years hacking on the Eclipse Java Development Toolkit (JDT) to make it understand your language? Spend months or years learning enough about the Eclipse platform to write your own from scratch? If you think neither alternative sounds too appealing, you’re not alone. The good news: you’re not out of options, either.
Enter IMP: the IDE Meta-tooling Platform, an Eclipse Technology project (http://www.eclipse.org/imp/). IMP facilitates the creation of language-specific IDEs in Eclipse. It simplifies and speeds the IDE development process through the combination of a language-independent runtime framework, automated generation of skeletons for language-specific service implementations, and support for the completion of service implementations by declarative specification or focused imperative programming. The IMP IDE development process is not a “big bang,” in which only after a lengthy development period does anything work properly (a problem that plagues those who attempt to repurpose existing IDEs that were not designed for reuse). Instead, the IMP process is both selective and iterative: it allows the IDE developer to select the features s/he wants, and it allows for the incremental customization of IDE services. Moreover, IMP-based IDEs aren’t the “lowest common denominator” - there’s ample opportunity to customize the look and feel of your IDE to suit your language and your purposes.
This tutorial will give participants an overview of IMP and take them through the hands-on development of a working Eclipse-based IDE for a simple (but nontrivial) programming language. The process will address language syntax definition; editor services such as token coloring, text folding, reference resolution, hover help, documentation providers, content assist, and hyper-linking; the outline view; a builder; preferences and preference pages; and text formatting (subject to time constraints). Time permitting, we may also take a brief look at the IMP framework architecture and runtime, for those who may be interested in contributing to the development of IMP itself. Participants will also use IMP-based IDEs for specification languages as part of the IDE development process.
- intermediate Java programming experience
- comfort working within the Eclipse Java IDE
- familiarity with the concepts of grammars and parser generators (like Antlr, LPG, or SDF), and at least some prior experience building a parser using such tools. Participants will use the LPG parser generator during the tutorial.
- experience in building Eclipse plugins
- knowledge of plugin development in general
The basic structure of the tutorial:
- Basic introduction to IMP and what IMP-based IDE's can do
- Brief description of the target language we'll be using for the tutorial
- Creation of the language descriptor meta-data
- Creation of the language's syntactic specifications
- A series of sections, one per "IDE service", in which we:
- Describe the service and the functionality it enables, and relate it to the language concepts and/or grammar constructs.
- Have the participants perform the relevant steps to create the initial implementation of the service.
- Ask the participants to enhance the implementation of the service in some straightforward (but representative) way, and observe the effect on the IDE they're building by executing the result.
- [for some services, but perhaps not all] Describe other aspects of how the service might be extended to handle other kinds of languages or language constructs, or to further customize the IDE's appearance or behavior in interesting ways.
- Overview of other IMP-supported services
- Wrap-up (pointers to further info, e.g. IMP mailing lists, newsgroups, call for participation, etc.)
Preparing for the Tutorial (Updated 21 March, 2009)
Please install a fresh
copy of either Eclipse for RCP/Plugin-Developers 3.3.2 or Eclipse Classic 3.4.2, and install IMP into that from the IMP update site (http://download.eclipse.org/technology/imp/updates).
If you're using 3.4.2, please don't try to install anything else before or after IMP; we've been seeing some very strange behavior with Equinox/p2 on 3.4.* when installing features in multiple install/update sessions.
Robert is project lead for the IMP Eclipse Technology Project (http://www.eclipse.org/imp), whose aim is to greatly simplify and accelerate the IDE development process. Before starting that project, Robert spent several years developing static analyses and advanced refactorings for Java in Eclipse, some of which are part of the Eclipse JDT since version 3.1, including generics-related refactorings ("Infer Type Arguments" and "Introduce Type Parameter"), type-related refactorings ("Extract Interface" and "Generalize Type") and others (e.g. "Introduce Factory"). Robert is also currently working on refactoring for concurrent programs. He also developed a smell detection framework for Java in Eclipse, demoed at ECOOP and OOPSLA in 2004, which includes a code duplication detector. Prior to that, Robert worked on a diverse set of projects, including two visual programming languages, a film scoring system, manufacturing optimization algorithms, and hardware synthesis and verification for asynchronous circuits. When not writing code or papers, Robert spends his spare time playing jazz, fusion and progressive rock in his home studio.