<<

Eclipse: A platform for integrating development tools

by J. des Rivie` res J. Wiegand

Modern n-tier applications are developed The Platform was created to address this is- using components implemented in many sue by providing a common platform for diverse IDE- different technologies, including HTML, based products and facilitate their integration. The ™, JavaServer Pages™ (JSP™), first part of this paper introduces and gives an his- Enterprise JavaBeans™, connectors, COBOL torical perspective of IDEs, followed by a description or PL/1 programs, and relational of the technical aspects of the Eclipse Platform. In schemas. Creating an effective integrated the second part, we discuss the efforts of the Eclipse development environment (IDE) for use in community of tool developers to make the Eclipse programming these applications presents Platform ubiquitous. some special challenges because a large number of different tool technologies have to A brief history of commercial IDEs. In the early days be tightly integrated in support of of programming, the only development development task flows. In order to meet tools that really needed were a com- these challenges, the Eclipse Platform was piler for the language they were programming in and designed to serve as the common basis for a link editor and loader to combine the compiled diverse IDE-based products, providing open files into executable form. Programs were composed (application programming interfaces) to offline; debugging was done primarily with output facilitate this integration. This paper describes statements inserted in the code. With the advent of time-sharing, programs started to be written and de- the overall architecture of the Eclipse Platform bugged interactively by using the computer as well. and the www.eclipse.org open source The earliest commercial IDEs were built for the pro- organization and consortium created to 1 2 gramming languages BASIC and APL. The facilitate broad industry adoption of this editor 3 is arguably the first language-neutral, exten- platform. sible IDE, and to this day it maintains a loyal follow- ing who prefer it to the GUI (graphic ) -based IDEs that followed it. Customers developing applications need a variety of different tools from various tool vendors to support The rise of personal computers saw the creation of the full life cycle. Develop- a number of commercial IDEs geared towards pop- ers can be more productive and effective if these tools Copyright 2004 by International Business Machines Corpora- work well together. Integrated development environ- tion. Copying in printed form for private use is permitted with- ments (IDEs) can aid in the integration of tools to out payment of royalty provided that (1) each reproduction is done facilitate the software development process and will without alteration and (2) the Journal reference and IBM copy- succeed in doing so to the extent that the commu- right notice are included on the first page. The title and abstract, but no other portions, of this paper may be copied or distributed nity of tool developers can be influenced to develop royalty free without further permission by computer-based and tools in ways that increase the likelihood of their in- other information-service systems. Permission to republish any teroperation with other tools. other portion of this paper must be obtained from the Editor.

IBM SYSTEMS JOURNAL, VOL 43, NO 2, 2004 0018-8670/04/$5.00 © 2004 IBM DES RIVIE` RES AND WIEGAND 371 ular programming languages, including Pascal (e.g., API. 14 This kind of open-ended extensibility is essen- ** 4), LISP (e.g., Xerox Inter- tial in the commercial IDE because no IDE ven- lisp 5), (e.g., PARCPlace Smalltalk 6), and dor could possibly provide a sufficient set of useful Cϩϩ (e.g., Lucid Energize 7). By the early 1990s, an tools to satisfy all customer needs. Which third party IDE was standard fare for most programming lan- tool will be bundled as an add-in for a particular IDE guages. When the Java** ar- is determined by market forces. rived in 1995, the market was soon flooded with Java 8 IDE products, including Borland JBuilder**, Syman- Some IDEs start from a language-specific base and tec Visual Cafe´, 9 Visual Jϩϩ**, 10 and expand from there. For instance, Oracle JDeveloper 11 IBM VisualAge* for Java. Suite** 15 is a Java-centric IDE which expanded into UML modeling, well beyond a narrow Java focus. Net- The use of IDEs is prevalent for one simple reason: Beans** IDE16 started as Java-specific, but later they make software developers more productive. Be- evolved into a language-neutral, open source IDE that cause of this utilitarian appeal, IDEs continue to is used within commercial IDE products, including evolve as people find new ways to improve produc- Sun ONE Studio. 17 ** .NET 18 tivity. Over time, the set of tools integrated into the supports multiple languages within the same IDE and IDE has expanded from simple editors, , provides extensive language-neutral as well as lan- and to include incremental compilers, guage-specific APIs for use by tools. In the effort to browsers that present the program in meaningful expand their horizons, IDEs must overcome any lan- ways (e.g., classes and methods arranged in a sub- guage-specific biases which may have been built into class hierarchy), automatic code completion, and - them. sual editors for creating graphical UIs (user inter- faces). This trend towards more sophisticated and powerful language-specific tools continues, 12 and Eclipse Platform technical overview nowadays includes facilities like built-in editor sup- port for re-factoring code. In the following section, we give a high-level descrip- tion of the Eclipse Platform. 19 The Eclipse Platform Another way to improve productivity is for the IDE is an open-ended, language-neutral IDE. The open 20 to cover more of the software development life cy- source Eclipse Platform 1.0 was released in late cle. For example, most commercial IDEs include op- 2001 and began appearing in commercial products tional version and configuration management for shortly thereafter, the first being IBM WebSphere* 21 files because this is a concern for Studio Application Developer 4.0. The Eclipse working programmers. IDEs are rapidly expanding Platform is aptly described as “an IDE for anything into the other areas, such as software design with and for nothing in particular.” UML** (Unified Modeling Language) modeling tools (e.g., Rational Rose** 13). Figure 1 shows a screen capture of the main work- bench window as it looks with only the standard ge- In reality, working programmers usually do much neric components that are part of the Eclipse Plat- more than write and debug code in a single program- form. The Navigator view (Figure 1, top left) shows ming language. It is commonplace for a program- the files in the user’s ; the text editor (top mer to create and manipulate many non-code arti- right) shows the contents of a file; the Tasks view facts such as HTML (Hypertext Markup Language) (bottom right) shows a list of to-dos; the Properties pages. This means that the ends up us- view (bottom left) shows various properties of the ing additional tools not integrated with the IDE.In file selected in the Navigator view. order to address these needs, most modern commer- cial IDEs are designed to be open and extensible so Although the Eclipse Platform has much built-in that new tools can be supplied by third parties (i.e., functionality, most of that functionality is very ge- someone other than the IDE vendor). This is done neric. It takes additional tools to extend the platform by providing a mechanism for the IDE to discover to work with new content types, to do new things with add-in tools on start up, and by publishing APIs (ap- existing content types, and to focus the generic func- plication programming interfaces) for use by these tionality on something specific. The Eclipse Platform tools to integrate their functions with the IDE. For is built on a mechanism for discovering, integrating, example, Borland JBuilder has an Open Tools API, and running modules called plug-ins. A tool provider and IntelliJ** IDEA has a product called Plug-in writes a tool as a separate plug-in that operates on

372 DES RIVIE` RES AND WIEGAND IBM SYSTEMS JOURNAL, VOL 43, NO 2, 2004 Figure 1 Eclipse Platform user interface

files in the workspace and surfaces its tool-specific ● Support both GUI and non-GUI-based application UI in the workbench. When the platform is launched, development environments. the user is presented with an IDE composed from ● Run on a wide range of operating systems, includ- the set of available plug-ins. The quality of the user ing Windows** and **. experience depends significantly on how well the ● Capitalize on the popularity of the Java program- tools integrate with the platform and how well the ming language for writing tools. various tools work with each other. The Eclipse Platforms principal role is to provide Platform design goals. The Eclipse Platform was de- tool providers with mechanisms to use and rules to signed and built to meet the following requirements: follow that lead to seamlessly integrated tools. These mechanisms are exposed through well-defined API ● Support the construction of a variety of tools for interfaces, classes, and methods. The platform also application development. provides useful building blocks and frameworks that ● Support an unrestricted set of tool providers, in- facilitate developing new tools. Figure 2 shows the cluding independent software vendors (ISVs). major components and APIs of the Eclipse Platform. ● Support tools to manipulate arbitrary content types (e.g., HTML, Java, , JSP** [JavaServer Pages**], Platform runtime and plug-in architecture. A plug-in EJB** [Enterprise JavaBeans**], XML [eXtensible is the smallest unit of Eclipse Platform function that Markup Language], and GIF [Graphic Interchange can be developed and delivered separately. Usually Format]). a small tool is written as a single plug-in, whereas ● Facilitate seamless integration of tools within and a complex tool has its functionality split across sev- across different content types and tool providers. eral plug-ins. Except for a small kernel known as the

IBM SYSTEMS JOURNAL, VOL 43, NO 2, 2004 DES RIVIE` RES AND WIEGAND 373 Figure 2 Eclipse Platform architecture point for user preferences. Any plug-in can contrib- ute its own user preferences by defining extensions to this extension point.

ECLIPSE PLATFORM On start-up, the Platform Runtime discovers the set of available plug-ins, reads their manifest files, and WORKBENCH HELP NEW TOOL PLUG-IN builds a plug-in registry. The platform matches ex- tension declarations by name with their correspond- JFACE ing extension point declarations. Any problems, such as extensions to missing extension points, are de- SWT tected and logged. The resulting plug-in registry is NEW TOOL PLUG-IN available through the platform API. Plug-ins cannot be added after start-up. WORKSPACE TEAM

Plug-in manifest files contain XML. An extension NEW TOOL point may declare additional specialized XML ele- PLUG-IN ment types for use in the extensions. This allows the plug-in supplying the extension to communicate ar- bitrary information to the plug-in declaring the cor- responding extension point. Moreover, manifest in- PLATFORM RUNTIME formation is available from the plug-in registry without activating the contributing plug-in or load- ing any of its code. This property is critical to sup- porting a large base of installed plug-ins, only some of which are needed in any given user session. Until a plug-ins code is loaded, it has a negligible mem- Platform Runtime, all of the Eclipse Platforms func- ory footprint and impact on start-up time. Using an tionality is located in plug-ins. XML-based plug-in manifest file also makes it easier to write tools that support plug-in creation. The Plug-ins are coded in the Java language. A typical Plug-In Development Environment (PDE), which is plug-in consists of Java code in a JAR (Java archive) included in the Eclipse SDK (software development , some read-only files, and other resources kit), is such a tool. such as images, Web templates, message catalogs, native code libraries, and so forth. Some plug-ins do A plug-in is activated when its code actually needs not contain code at all. One such example is a plug-in to be run. Once activated, a plug-in uses the plug-in that contributes on-line help in the form of HTML registry to discover and access the extensions con- pages. A single plug-ins code libraries and read-only contents are located together in a directory in the tributed to its extension points. For example, the file system. There is also a mechanism that permits plug-in declaring the user preference extension point a plug-in to be synthesized from several separate can discover all contributed user preferences and ac- fragments, each in its own directory. This is the mech- cess their display names to construct a preference anism used to deliver separate language packs for dialog. This can be done by using only the informa- an internationalized plug-in. tion from the registry, without having to activate any of the contributing plug-ins. The contributing plug-in Each plug-in has a manifest file declaring its inter- will be activated when the user selects a preference connections to other plug-ins. The interconnection from a list. Activating plug-ins in this manner does model is simple: a plug-in declares any number of not happen automatically; there are a small number named extension points, and any number of extensions of API methods for explicitly activating plug-ins. Once to extension points in other plug-ins. An extension activated, a plug-in remains active until the platform point may have a corresponding API interface. Other shuts down. Each plug-in is furnished with a subdi- plug-ins contribute implementations of this interface rectory in which to store data specific to the plug-in; through extensions to this extension point. For ex- this mechanism allows a plug-in to retain important ample, the workbench plug-in declares an extension state information between runs.

374 DES RIVIE` RES AND WIEGAND IBM SYSTEMS JOURNAL, VOL 43, NO 2, 2004 The Platform Runtime declares a special extension object that implements an interface or class. For ex- point for applications. When an instance of the plat- ample, workspace resources are adaptable objects; form is launched, the name of an application is spec- the workbench adds adapters that provide a suitable ified through the command line; the only plug-in that icon and text label for a resource. Any party can add gets activated initially is the one that declares that behavior to existing types (both classes and inter- application. faces) of adaptable objects by registering a suitable adapter factory with the platform. Multiple parties By determining the set of available plug-ins for can independently extend the same adaptable ob- start-up and by supporting a significant exchange of jects, each for a different purpose. When an adapter information between plug-ins without having to ac- for a given interface is requested, the platform iden- tivate any of them, the platform can provide each tifies and invokes the appropriate factory to create plug-in with a rich source of pertinent information it. The mechanism uses only the Java type of the about the context in which it is operating. This con- adaptable object (it does not increase the adaptable text cannot change while the platform is running, so objects footprint). Any plug-in can exploit there is no need for complex life-cycle events to in- this mechanism to add behavior to existing adapt- form plug-ins of context changes. A lengthy start-up able objects and to define new types of adaptable sequence is avoided, as are many bugs stemming objects for other plug-ins to use and possibly extend. from unpredictable plug-in activation order. . The various tools which plug in to the The Eclipse Platform is run by a single invocation Eclipse Platform operate on regular files in the us- of a standard JVM** (). Each ers workspace. The workspace consists of one or plug-in is assigned its own Java class loader which more top-level projects, where each project maps to is solely responsible for loading its classes (and Java a corresponding user-specified directory in the file resource bundles). Each plug-in explicitly declares system. The different projects in a workspace may its dependence on the other plug-ins from which it map to different file system directories or drives al- expects to directly access classes. A plug-in controls though, by default, all projects map to sibling sub- the visibility of the public classes and interfaces in directories of a single workspace directory. its libraries. This information is declared in the plug-in manifest file; the visibility rules are enforced A mechanism in the Eclipse Platform allows a tool at runtime by the plug-in class loaders. to tag a project in order to give it a particular per- sonality, or nature. For example, “Web site nature” The plug-in mechanism is used to partition the tags are associated with a project that contains the Eclipse Platform itself. Indeed, separate plug-ins pro- static content for a Web site, and “Java nature” tags vide the workspace, the workbench, and so on. Even are associated with a project that contains the source the Platform Runtime has its own plug-in. Non-GUI code for a Java program. The project nature mech- configurations of the platform may simply omit the anism is open. Plug-ins may declare new project na- workbench plug-in and the other plug-ins that de- tures and provide code for configuring projects with pend on it. that nature. A single project may have as many na- tures as required. This affords a way for tools to The Eclipse Platforms update manager downloads a project without having to know about each other. and installs new features or upgraded versions of ex- isting features (a feature being a group of related Each project contains files that are created and ma- plug-ins that get installed and updated together). The nipulated by the user. All files in the workspace are update manager constructs a new configuration of directly accessible by the standard programs and available plug-ins to be used the time the Eclipse tools of the underlying . Tools in- Platform is launched. If the result of upgrading or tegrated with the platform are provided with APIs for installing proves unsatisfactory, the user can roll back dealing with workspace resources (projects, files, and to an earlier configuration. folders). Workspace resources are represented by adaptable objects so that other parties can extend The Eclipse Platform runtime also provides a mech- their behavior. anism for extending objects dynamically. A class that implements an “adaptable” interface declares its in- To minimize the risk of accidentally losing files, a stances open to third-party behavior extensions. An low-level workspace history mechanism keeps track adaptable instance can be queried for the adapter of the previous contents of any files that have been

IBM SYSTEMS JOURNAL, VOL 43, NO 2, 2004 DES RIVIE` RES AND WIEGAND 375 changed or deleted by integrated tools. The user con- phase save process ensures that the important states trols how the history is managed by means of space- of the various plug-ins are written to disk as an atomic and age-based preference settings. The workspace operation. In a subsequent session, when an indi- provides a marker mechanism for annotating re- vidual plug-in gets reactivated and rejoins the save- sources. Markers are used to record diverse anno- restore process, it is passed a workspace-wide re- tations, such as error messages, to-do list source delta describing the net resource differences items, bookmarks, search hits, and break- since the last save in which it participated. This al- points. The marker mechanism is open. Plug-ins can lows a plug-in to carry forward its saved state while declare new marker subtypes and control whether making the necessary adjustments to accommodate they should be saved between runs. resource changes made while it was deactivated.

The platform provides a general mechanism that al- Workbench and UI toolkits. The Eclipse Platform lows a tool to track changes to workspace resources. UI is built around a workbench that provides the over- By registering a “resource change listener,” a tool all structure and presents an extensible UI to the user. is ensured to receive after-the-fact notifications of The workbench API and implementation are built all resource creations, deletions, and changes to the from two toolkits: contents of files. The platform defers the event no- tification until the end of a batch of resource ma- ● SWT (Standard )—a widget set and nipulation operations. Event reports take the form graphics library integrated with the native window of a tree of resource changes (or “deltas”) that de- system but with an OS (operating system) -inde- scribe the effect of the entire batch of operations in pendent API. terms of net resource creations, deletions, and ● changes. Resource deltas also provide information JFace—a UI toolkit implemented using the SWT, about changes to markers. which simplifies common UI programming tasks.

Resource tree deltas are particularly useful and ef- . The Standard Widget Tool- ficient for tools that display resource trees because kit (SWT) provides a common OS-independent API each delta points out where the tool may need to for widgets and graphics implemented in a way that add, remove, or refresh on-screen widgets (small allows tight integration with the underlying native graphic elements). In addition, because a number window system. The entire Eclipse Platform UI and of semi-independent tools may be operating on the the tools that plug in to it use SWT for presenting resources of a project at the same time, this mech- information to the user. anism allows one tool to detect the activity of an- other in the vicinity of specific files or file types in A perennial issue in widget toolkit design is the ten- which it has an interest. sion between portable toolkits and native window system integration. The Java AWT (Abstract Window Tools like compilers and link checkers must apply Toolkit) provides low-level widgets such as lists, text a coordinated analysis and transformation of thou- fields, and buttons, but no high-level widgets such sands of separate files. The platform provides an in- as trees or rich text. AWT widgets are implemented cremental project builder framework. The input to an directly with native widgets on all underlying win- incremental builder is a resource tree delta captur- dow systems. Building a UI using AWT alone means ing the net resource differences since the last . programming for the least common denominator of Sophisticated tools may use this mechanism to pro- all OS window systems. The Java toolkit ad- vide scalable solutions. The platform allows several dresses this problem by emulating widgets like trees, different incremental project builders to be registered tables, and rich text. Swing also provides look-and- for the same project and provides ways to trigger feel emulation layers that attempt to make applica- project- and workspace-wide builds. An optional tions look like the underlying native window system. workspace auto-build feature automatically triggers However, the emulated widgets invariably lag behind the necessary builds after each resource modifica- the look and feel of the native widgets, and the user tion operation (or batch of operations). interaction with emulated widgets is usually differ- ent enough to be noticeable, making it difficult to The workspace save-restore process is open to par- build applications that compete head-on with appli- ticipation from plug-ins wishing to remain coordi- cations developed specifically for a particular native nated with the workspace across sessions. A two- window system.

376 DES RIVIE` RES AND WIEGAND IBM SYSTEMS JOURNAL, VOL 43, NO 2, 2004 The SWT addresses this issue by defining a common cause these native methods are completely hidden API that is available across a number of supported behind the window system-independent SWT API. window systems. For each different native window system, the SWT implementation uses native widgets JFace. JFace is a UI toolkit with classes for handling wherever possible; where no native widget is avail- many common UI programming tasks. JFace is win- able, the SWT implementation provides a suitable em- dow-system-independent in both its APIs and imple- ulation. Common low-level widgets such as lists, text mentation and is designed to work with SWT with- fields, and buttons are implemented natively every- out hiding it. JFace includes the usual UI toolkit where. But some generally useful higher-level wid- components of image and font registries, dialog, pref- gets may need to be emulated on some window sys- erence, and wizard frameworks, and progress report- tems. For example, the SWT toolbar widget is ing for long-running operations. Two of its more in- implemented as a native toolbar widget on Win- teresting features are actions and viewers. dows** and as an emulated widget on Motif**. This strategy allows the SWT to maintain a consistent pro- The action mechanism allows user commands to be gramming model in all environments, while allow- defined independent of their exact whereabouts in ing the underlying native window systems look and the UI. An action represents a command that can be feel to shine through to the greatest extent possible. triggered by the user through a button, menu item, or item in a tool bar. Each action knows its own key The SWT also exposes native window system-specific UI properties (label, icon, tool tip, etc.), which are APIs in cases where a particular underlying native used to construct appropriate widgets for present- window system provides a unique and significant fea- ing the action. This separation allows the same ac- ture that is unavailable on other window systems. tion to be used in several places in the UI, making Windows ActiveX** is a good example of this. Win- it is easy to change where an action is presented in dow system-specific APIs are segregated into aptly the UI without having to change the code for the ac- named packages to indicate that they are inherently tion itself. nonportable.

Tight integration with the underlying native window Viewers are model-based adapters for certain SWT system is not strictly a matter of look and feel. The widgets. Viewers handle common behavior and pro- SWT also interacts with native desktop features, such vide semantics of a higher level than those available as the “drag and drop” function, and can use com- from the SWT widgets. The standard viewers for lists, trees, and tables support populating the viewer with ponents developed with OS component models, such  as Windows ActiveX controls. Internally, the SWT elements from the client s domain and keeping the implementation provides separate and distinct im- widgets in synchronization with changes to that do- plementations for each native window system. The main. The standard text viewer provides a document Java native libraries are completely different, with model to the client and manages the conversion of each exposing the APIs specific to the underlying win- the document to the information required by the dow system. (Contrast this to the Java AWT, which SWT-styled text widget. Multiple viewers can be open locates window system-specific differences in the C on the same model or document; all are updated au- code implementation of a common set of Java na- tomatically when the model or document changes tive methods.) Because no special logic is buried in in any of them. the native methods, the SWT implementation is ex- pressed entirely in Java code. Nevertheless, the Java Eclipse workbench. Unlike SWT and JFace, which are code looks familiar to the native OS developer. Any both general purpose UI toolkits, the workbench pro- Windows programmer would find the Java imple- vides the UI personality of the Eclipse Platform and mentation of the SWT for Windows instantly famil- supplies the structures for the interaction of the user iar because it consists of calls to the Windows API and the tools. Because of this central and defining that they already know from programming in C; like- role, the workbench is synonymous with the Eclipse wise, for a Motif programmer looking at the SWT im- Platform UI as a whole and with the main window plementation for Motif. This strategy greatly sim- the user sees when the platform is running. The work- plifies implementing, debugging, and maintaining the bench API depends on the SWT API, and to a lesser SWT because it allows all interesting development to extent on the JFace API. The workbench implemen- be done in the Java language. Of course, this is of tation is built by using both SWT and JFace; Java AWT no direct concern for ordinary clients of the SWT be- and Swing are not used.

IBM SYSTEMS JOURNAL, VOL 43, NO 2, 2004 DES RIVIE` RES AND WIEGAND 377 Figure 3 Workbench user interface showing Java perspective

The Eclipse Platform UI paradigm is based on ed- active editor if one is available. A view may augment itors, views, and perspectives. From the users stand- other views by providing information about the cur- point, a workbench window consists visually of views rently selected object. For example, the standard and editors (see Figure 1). Perspectives manifest properties view presents the properties of the ob- themselves in the selection and arrangements of ed- ject selected in another view. Views have a simpler itors and views visible on the screen. Editors allow life cycle than editors: modifications made in a view the user to open, edit, and save objects. They follow (such as changing a property value) are generally an open-save-close life cycle much like file system saved immediately, and the changes are reflected im- tools, but are more tightly integrated into the work- mediately in other related parts of the UI. The plat- bench. When active, an editor can contribute actions form provides several standard views; additional to the workbench menus and tool bar. The platform views are supplied by other plug-ins. provides a standard editor for text resources; more specific editors are supplied by other plug-ins. A workbench window can have several separate per- spectives, only one of which is visible at any given mo- Views provide information about an object that the ment. Each perspective has its own views and ed- user is working with in the workbench. A view may itors that are arranged (tiled, stacked, or detached) assist an editor by providing information about the for presentation on the screen. Some may be hid- document being edited. For example, the standard den at any given moment. Several different types of content outline view uses a JFace tree viewer to views and editors can be open at the same time within present a structured outline for the content of the a perspective. A perspective controls initial view vis-

378 DES RIVIE` RES AND WIEGAND IBM SYSTEMS JOURNAL, VOL 43, NO 2, 2004 ibility, layout, and action visibility. The user can cess user data by means of the underlying file sys- quickly switch perspectives to work on a different task tem. Their integration is therefore very loose, espe- and can easily rearrange and customize a perspec- cially at the UI level. In some environments, the tive to better suit a particular task. The platform pro- Eclipse Platform also supports levels of integration vides standard perspectives for general resource nav- between these extremes. igation, on-line help, and team support tasks. Additional perspectives are supplied by other ● The workbench has built-in support for embed- plug-ins. ding any OLE (Object Linking and Embedding) document as an editor (for Windows only). This Tools integrate into this “editors, views, and perspec- option provides tight UI integration. tives” UI paradigm in well-defined ways. The main ● extension points allow tools to augment the work- A plug-in tool can implement a container that bench by adding new types of editors, new types of bridges the Eclipse Platform API to an ActiveX views, and new perspectives, which arrange old and control so that it can be used in an editor, view, new views to suit new user tasks. The platform’s stan- dialog, or wizard (for Windows only). The SWT pro- dard views and editors are all included by use of these vides the requisite low-level support. This option mechanisms. Tools may also augment existing ed- provides tight UI integration. itors, views, and perspectives by adding new actions ● A plug-in tool can use AWT or Swing to open sep- to an existing views local menu and tool bar, adding arate windows. 22 This option provides loose UI in- new actions to the workbench menu and tool bar tegration but allows tight integration below the UI when an existing editor becomes active, adding new level. actions to the pop-up content menu of an existing view or editor, or adding new views, action sets, and Team support. The Eclipse Platform allows a proj- shortcuts to an existing perspective. ect in the workspace to be placed under version and configuration management with an associated team The platform takes care of all aspects of workbench repository. The platform has extension points and window and perspective management. Editors and a repository provider API that allow new kinds of views are automatically instantiated as needed and team repositories to be plugged in. The function pro- disposed of when no longer needed. The display la- vided by a particular team repository product invari- bels and icons for actions contributed by a tool are ably affects the users workflow; for example, by add- listed in the plug-in manifest so that the workbench ing explicit steps for retrieving files from the can create menus and tool bars without activating repository, for returning updated files to the repos- the contributing plug-ins. The workbench does not itory, and for comparing different file versions. The activate the plug-in until the user attempts to use exact effect on the users workflow varies somewhat the functionality that the plug-in provides. for each kind of repository. Accordingly, the Eclipse Platform takes a hands-off view and allows each team After an editor or view becomes an active part of a repository provider to define its own workflow so that perspective, it can use workbench services for track- users already familiar with the team repository prod- ing activation and selection. The “part service” tracks uct can quickly learn to use it from within Eclipse. view and editor activation within the perspective, re- porting activation and deactivation events to regis- tered listeners. A view or editor can also register with The platform supplies hooks to allow a team the selection service. The selection service feeds se- repository provider to intervene in certain operations lection change events to all parties that have regis- that manipulate resources in a project. These hooks tered interest. This is how, for example, the standard provide good support for both optimistic and pes- properties view is notified of the domain object cur- simistic models. At the UI level, the platform sup- rently selected in the active editor or view. plies placeholders for certain actions, preferences, and properties, but leaves it to each repository pro- UI integration. Tools written in the Java language vider to define these UI elements. There is also a sim- using the Eclipse Platform APIs achieve the highest ple, extendable configuration wizard that lets users level of integration with the platform. At the other associate projects with repositories, which each re- extreme, external tools launched from within the pository provider can extend with UI elements for platform must open their own separate windows in collecting information specific to that kind of order to communicate with the user and must ac- repository.

IBM SYSTEMS JOURNAL, VOL 43, NO 2, 2004 DES RIVIE` RES AND WIEGAND 379 Multiple team repository providers can coexist can extend the Eclipse Platform. The user is pre- peacefully within the platform. The Eclipse Platform sented with an IDE that is customized by the set of includes support for CVS (Concurrent Versions Sys- available tool plug-ins. Tools may also define new tem) repositories accessed via either pserver or SSH extension points and APIs of their own and thereby (Secure Shell) protocols. serve as building blocks and integration points for yet other tools. Help mechanism. The Eclipse Platform help mech- anism allows tools to define and contribute documen- The tools plugged in to the platform supply the spe- tation to one or more online guides. For example, cific capabilities that make it suitable for develop- a tool usually contributes help documentation to a ing certain kinds of applications. The Eclipse proj- user guide and API documentation (if it has any) to ect itself provides a number of optional components  a separate programmer s guide. Raw content is con- that sit atop the Eclipse Platform. The most exten- tributed as HTML files. The facilities for arranging sive of these are the Java development tools (JDT), the raw content into online guides with suitable nav- which add the capabilities of a full-featured Java IDE igation structures are expressed separately in XML to the Eclipse Platform. Figure 3 shows what the files. This separation allows pre-existing HTML doc- workbench normally looks like when the user is writ- umentation to be incorporated directly into online ing a Java program. Comparing Figure 3 to Figure books without the need to edit or rewrite it. 1 gives a sense of how JDT integrates its capabilities into the workbench. The navigation structure presents the contents of the guides as a tree of topics. Each topic can have a link The JDT is implemented by a group of plug-ins, with to a raw content page. A single book may have mul- the UI in one plug-in and the non-UI infrastructure tiple alternate lists of top-level topics allowing some in a separate core plug-in. This separation of UI and or all of the same information to be presented in non-UI code allows the JDT core infrastructure to be completely different organizations; for example, it used in GUI-less configurations of the Eclipse Plat- may be organized by task or by tool. form, and by other GUI tools that incorporate Java capabilities but do not need the JDT UI. The Java UI The XML navigation files and HTML content files are plug-in makes extensive use of workbench extension stored in a plug-ins root directory or subdirectories. points to contribute special editors, views, perspec- Small tools usually put their help documentation in tives, and actions that allow the user to work with the same plug-in as the code. Large tools often have Java programs in Java-specific terms. The Java com- separate help plug-ins. The platform uses its own in- piler and underlying Java structure model can be in- ternal documentation to provide the actual voked programmatically from other tools through Web pages from within the document web. This cus- the Java model API defined by the JDT core plug-in. tom server allows the platform to resolve special in- Both the JDT core and UI plug-ins also declare ex- ter-plug-in links and extract HTML pages from ZIP tension points so that other tools can extend them archives. in predefined ways. When a help system is organized, the creation of a full topic tree is only possible when the set of tools Eclipse in practice to be documented is closed. With the Eclipse Plat- form, the set of tools is open-ended, and conse- The Eclipse Platform provides a solid technical foun- quently the structure of the help documentation dation for integrated tools that support diverse ap- needs to be modular. The platform help mechanism plication domains across the full development life allows tools to contribute both raw content and sets cycle. Yet a technically sound foundation alone is of topics, and to define insertion points to indicate no assurance of success. In this section, we look at where to insert its topics into a pre-existing topic tree. how the Eclipse Platform has gained acceptance in practice, ensuring that useful Eclipse-based tools are Just the foundation. As described above, the Eclipse built. Platform provides a nucleus of generic building blocks and APIs like the workspace and the work- Eclipse open source project. One key factor in the bench, and various extension points through which Eclipse Platforms success is that it is run as an open new functionality can be integrated. Through these source project. The www.eclipse.org Web site, the extension points, tools written as separate plug-ins public base of operations, has the following features:

380 DES RIVIE` RES AND WIEGAND IBM SYSTEMS JOURNAL, VOL 43, NO 2, 2004 ● Free download area—Offers current releases of the munity input and requirements, develops release Eclipse Platform in a ready-to-use (binary) form. plans, and generally coordinates activity across the ● Newsgroups—Provide general discussion about range of platform subcomponents. Eclipse. These lists are open to anyone and are a primary resource for help and advice for anyone The development process is iterative and engages using the Eclipse Platform. the wider Eclipse community. The release schedule ● Source code repository—The source code for the is partitioned into milestone cycles of fixed duration Eclipse Platform is in a CVS repository. Anyone (currently six weeks). Each milestone cycle is like a can browse the contents and revision history of any small release cycle: it includes planning, develop- source file. There are also build scripts that allow ment, testing, and a milestone delivery. The specific anyone to recompile and re-create the Eclipse steps in each cycle evolve based on input from the Platform from the source code. community. Each milestone is shipped with a descrip- ● Bug-tracking database—There is a -based tion of new and noteworthy features in an effort to bug database for tracking defects and problems draw the communitys attention to the most recent with Eclipse Platform releases. Users can use the milestone and to encourage them to use it. By pro- database to discover known problems or to report viding milestones at regular intervals, the Eclipse a new bug they have found (or request a new fea- Platform is effectively in continuous beta. This sets ture they would like). up a positive feedback loop that further encourages ● Development plans, proposals, and developer mail- community participation and growth. ing lists—Development plans and proposals are posted on the Web site, and there are developer Eclipse consortium. The Eclipse open source proj- mailing lists for communication between develop- ect is backed by the Eclipse consortium, a group of ers working on the Eclipse Platform. Although this companies that have made a commitment to releas- information is primarily of interest to the Eclipse ing Eclipse Platform-compatible offerings and to sup- development team (which is distributed around the porting the community of users, researchers, and de- world), it is also available to anyone interested in velopers. The consortium has steadily expanded from following how the next Eclipse Platform release nine founding members in November 2001 to over is taking shape. 40 in the following two years. IBM (a founding mem- ber of the Eclipse consortium) originally developed Eclipse source materials are made available under the Eclipse Platform and contributed it to the open the (CPL), one of the li- source project in November 2001. The team that censes approved by the (OSI). originally developed the Eclipse Platform became This royalty- allows anyone to use and the projects initial set of committers. Besides the redistribute Eclipse for commercial or non-commer- Eclipse Platform, the seed contribution included JDT cial purposes. and specialized tools needed to develop Eclipse plug- ins. Right from the start, the Eclipse open source The Eclipse code base is developed and maintained project was able to be entirely self-sustaining; no pro- by a technical meritocracy. A developer with a proven prietary tool or “special sauce” is required to develop record of valuable contributions is rewarded with in- and maintain Eclipse or to develop new plug-ins for creased responsibility and the opportunity for fur- Eclipse. ther contributions. Interested developers can con- tribute to the project without needing to be an The Eclipse consortium supports other Eclipse-based employee of any particular company; rather, their open source development efforts at www.eclipse.org. ability to contribute is based on their skills and the The Eclipse tools project fosters the creation of a technical merits of their contributions. Key contrib- wide variety of tools and frameworks for the Eclipse utors are visible and recognized by the community. Platform, including a graphical editor framework Committers are the subset of developers responsi- (GEF subproject), a modeling framework (EMF ble for the code and are the only ones allowed to [Eclipse Modeling Framework] subproject), C/Cϩϩ create new versions in the repository. Committers development tools (CDT subproject), and automated are typically full-time employees paid by their com- software quality tools (Hyades subproject). The panies to work on Eclipse. Eclipse technology project provides channels for open source developers, researchers, academics, and The Eclipse project management committee (PMC) educators to participate in the long-term evolution provides technical leadership. The PMC collects com- of Eclipse (and beyond). Current research efforts in-

IBM SYSTEMS JOURNAL, VOL 43, NO 2, 2004 DES RIVIE` RES AND WIEGAND 381 clude aspect-oriented software development (As- in which to embed the unique special-purpose tools pectJ and AJDT subprojects), alternative Eclipse run- that the company is offering. Building the matrix is times (Equinox project), a collaboration framework onerous because it involves writing the frameworks (Koi subproject), advanced software configuration and tool infrastructure that provide services common management (Stellation subproject), XML Schema to all IDEs. The Eclipse Platform provides these com- tools (XSD [XML Schema Definition language] sub- mon services in a language-neutral way. Using the project), and tools for model-driven software devel- Eclipse Platform instead of investing in creating (and opment (GMT [Generative Model Transformer] maintaining) their own comparable IDE infrastruc- subproject). ture lets companies focus their efforts on providing the essential tools that their customers need to work Eclipse community. The Eclipse community is re- with the companies’ main products. For example, IBM markably diverse. We describe some of the constit- WebSphere Studio Application Developer is an uencies to explain why Eclipse appeals to them and Eclipse-based IDE with special tools for creating and to see how their participation enriches the Eclipse debugging J2EE applications; Hewlett-Packard pro- community. vides an Internet usage manager component devel- opment environment based on Eclipse; and QNX A large, ready-made audience for Eclipse consists Momentics** 23 is an Eclipse-based development of Java developers who need a Java IDE to help them suite for the Neutrino** real-time operating system. develop Java programs. Java developers can quickly Comprehensive IDE products built atop the Eclipse have a high quality, ready-to-use, Java IDE for the Platform make salient issues of UI complexity and price of a free download. Naturally, this is a big at- scalability; in time, this pressure allows other devel- traction in the Java community, including computer opers to follow with increased confidence that the science students. These Eclipse users are a valuable edifice will hold up under the load of a large num- source of bug reports, new feature requests, - ber of plug-ins. group traffic (both questions and answers), and beta testers. The companies that produce Eclipse-based IDE prod- ucts also open doors for ISVs to sell their unique tools The transition from Java developer to Eclipse plug-in as Eclipse plug-ins augmenting the IDE product that developer is relatively smooth. Eclipse is written in the customer has already purchased. In some cases, the Java language, and the standard Eclipse down- this allows an add-on tool writer to sell the same load contains the specialized tools needed for de- plug-in for use in several different IDE products. For veloping plug-ins. A segment of these Java devel- example, Instantiations CodePro Studio 24 provides opers go on to “scratch their own itch” and develop additional tools for Java development that augment new tools in the form of Eclipse plug-ins. These tools IBM WebSphere Studio or any Eclipse-based IDE that are often made available by their owners to the gen- also includes JDT. By addressing customer needs not eral Eclipse community in one form or another. An- satisfied by the Eclipse-based IDE product, ISVs en- other segment of these Java developers go on to ap- hance the value of the product in addition to finding ply their Java skills to tracking down and fixing bugs a market for their own tools. Thus, each of the differ- in Eclipse. Again, the built-in PDE support makes it ent constituencies has its own reasons for using Eclipse, easy to work with the source code of the plug-ins that and each gives back to the Eclipse community ei- make up Eclipse, and to produce patches to attach ther directly or indirectly. Like Eclipse itself constit- to the bug report for later consideration by the uencies are open-ended: new constituencies arise Eclipse committer responsible for the affected com- naturally and push Eclipse in hitherto unexplored ponent. Individual developers who are knowledge- directions. For instance, a number of parties would able in the ways of building Eclipse plug-ins are an like to use the Eclipse Platform to build applications important resource. other than IDEs. Indeed, a number of them have mod- ified the Eclipse Platform to meet their needs in this Many software engineering research projects can area. While this was not an original design goal for benefit from building atop a ready-made, commer- the Eclipse Platform, it is equally true that much of cial quality, full source code base such as that pro- the platform is not particularly IDE-specific. One of vided by the Eclipse Platform, allowing the research- the challenges for the next (3.0) release of the Eclipse ers to focus their efforts on their area of expertise Platform is to find a way to directly satisfy this new and interest. On the commercial side, for many com- constituency while continuing to meet the expecta- panies with IDE products, the IDE is just the matrix tions and needs of the existing Eclipse community.

382 DES RIVIE` RES AND WIEGAND IBM SYSTEMS JOURNAL, VOL 43, NO 2, 2004 Conclusion 16. NetBeans IDE, www..org (2000), http://www. netbeans.org/products/ide/. The rosier future that customers are hoping for is 17. Sun ONE Studio, , Mountain View, CA one where they are more effective at developing their (2003), http://wwws.sun.com/software/sundev/. software because they have a wide spectrum of well- 18. Microsoft Visual Studio: Extending Visual Studio, Microsoft integrated tools from diverse tool vendors that sup- Corporation, Redmond, WA (2003), http://msdn.microsoft. com/vstudio/using/building/addin/default.aspx. port all aspects of the software development life cy- 19. This section contains material adapted from Eclipse Platform cle. The Eclipse Platform is a technical solution Technical Overview, which appears on the www.eclipse.org designed to enable such a future. Given the contin- Web site at http://eclipse.org/whitepapers/eclipse-overview. ued active participation of a diverse and growing pdf. community of developers who want Eclipse to evolve 20. Eclipse Platform 1.0, www.eclipse.org (November 2001), http:// eclipse.org. to meet their needs, there is reason to hope that the 21. IBM WebSphere Studio Application Developer Version 4.0, IBM customers will get what they are hoping for. Corporation, NY (2001), http://www.ibm.com/websphere/ eclipse. *Trademark or registered trademark of International Business 22. In Version 2.1 of Eclipse (released in March 2003), this works Machines Corporation. for Windows but not for Linux. 23. QNX Momentics, QNX Software Systems Ltd., Ottawa, Can- **Trademark or registered trademark of Borland International, ada (2003), http://www.qnx.com/products/ps_momentics/. Inc. Corporation, Sun Microsystems, Inc., Borland Software Cor- 24. Instantiations CodePro Studio, Instantiations Inc., Portland, poration, Microsoft Corporation, Rational Corporation, JetBrains OR (2003), http://www.instantiations.com/codepro/default. S. . O. Corporation, , Linus Torvalds, The htm. Open Group, , or QNX Software Sys- tems Ltd. Corporation. Accepted for publication December 5, 2003. Cited references and notes Jim des Rivie` res IBM Software Group, 2670 Queensview Drive, 1. J. G. Kemeny and T. E. Kurtz, BASIC Instruction Manual, Ottawa, Ontario K2B 8K1, (jim_des_rivieres@ca..com) is one Dartmouth College, Hanover NH (June 1964). of the architects of the Eclipse Platform and JDT infrastructure, 2. A. . Falkoff and K.E. Iverson, APL\360, IBM Corporation with a special focus on the overall design of the Eclipse APIs. (November 1966). Prior to Eclipse, Jim was involved with IBM VisualAge/Smalltalk 3. R. M. Stallman, “Emacs, the Customizable, Extensible Dis- and was an of IBM VisualAge Micro Edition. Prior to play Editor,” Proceedings of the ACM SIGPLAN SIGOA Sym- joining OTI (Object Technology International) in 1993, Jim was posium on Text Manipulation, ACM, New York (1981), pp. 147– at Xerox PARC where he co-authored the book “The Art of the 160, http://www.gnu.org/software/emacs/emacs-paper.html. Metaobject Protocol.” His interests include API design and evo- 4. Turbo Pascal v1.0 (IBM PC Version), Borland Software Cor- lution, programming languages, and digital photography. Jim is poration, Scotts Valley, CA (Nov. 1983). with IBM OTI Labs in Ottawa, Canada. 5. W. Teitelman and L. Masinter, “The Interlisp Programming Environment,” Computer 14, No. 4, 25–34 (April 1981). John Wiegand IBM Software Group, 15350 S.W. Koll Parkway, 6. A. Goldberg and D. Robson, Smalltalk-80: The Language and Beaverton, Oregon, 97006, ([email protected]) is the prin- Its Implementation, Addison-Wesley Longman Publishing Co., cipal architect for the Eclipse Platform infrastructure. John played Inc., Boston, MA (1983). a central role in the development of IBM VisualAge/Java, IBM 7. R. P. Gabriel, N. Bourbaki, M. Devin, P. Dussud, D. N. Gray, VisualAge Micro Edition, and Eclipse. His interests are in the and H. B. Sexton, “Foundation for a Cϩϩ Programming Envi- ϩϩ areas of performance, scalability, compilers, and other challeng- ronment,” Proceedings of C at Work-90, ACM, New York ing issues. John is the Eclipse project PMC lead and also leads (September 1990), http://www.dreamsongs.com/NewFiles/ the Eclipse Platform and PDE subprojects. John is with IBM OTI Energize.pdf. Labs in Beaverton, Oregon. 8. Borland JBuilder 1.0, Borland Software Corporation, Scotts Valley, CA (1997), http://www.borland.com/jbuilder/. 9. Symantec Visual Cafe´ 1.0, Symantec Corporation, Cupertino, CA (1997), http://www.symantec.com/. 10. Microsoft Visual Jϩϩ 1.0, Microsoft Corporation, Redmond, WA (1997), http://www.microsoft.com. 11. IBM VisualAge for Java 1.0, IBM Corporation, NY (1997), http://www.software.ibm.com/ad/vajava. 12. S. P. Reiss, “Software tools and environments,” ACM Com- puting Surveys (CSUR) 28, No. 1, 281–284 (March 1996). 13. Rational Rose 2000, Corporation, Cuper- tino, CA (2000), http://www.rational.com/products/rose/ index.jsp. 14. Introduction to IDEA 3.0 Plug-Ins, JetBrains Inc., , Czech Republic (2003), http://www.intellij.com/docs/PlugIns. pdf. 15. Oracle9i JDeveloper, Oracle Corporation, Redwood Shores, CA (2001), http://otn.oracle.com/products/jdev/index.html.

IBM SYSTEMS JOURNAL, VOL 43, NO 2, 2004 DES RIVIE` RES AND WIEGAND 383