What's New in Kepler

Here are descriptions of some of the changes of interest to plug-in developers made to the Eclipse Platform and SWT for the Kepler (4.3) release of Eclipse.

New features oriented towards end-users of the platform can be viewed in the What's new section of the Workbench User Guide.

Platform Changes

Initial Eclipse 4 API released The first set of official API based on the new Eclipse Platform 4 architecture is now available. This is the first step in allowing developers to use the new simpler and more powerful mechanisms to build Eclipse plug-ins and applications.

This API is comprised of two basic concepts:

The user interface model: The content of this model describes the structure of the user interface. The Eclipse Platform reacts to changes in this model by updating the presentation, and the complete model is now available through the new API.

Note that the model represents everything on the screen and these elements can be modified by your code (see the example below).

IEclipseContext / Dependency Injection (DI): Contexts are containers of UI runtime state including all the available services. The typical Eclipse Platform 4 pattern is that contributions are created and configured through dependency injection based on state and services found in the local context for that model element.

Here are a few links to more information about the UI Model, the services and DI (the Javadoc and supporting Eclipse documentation will be available before Kepler is released):

There is quite a lot of information already available for Eclipse Platform 4. While parts of the API are just being formalized now, most of the concepts and API existed in provisional form in previous Eclipse 4 releases.

Just to give a taste of what working in a modeled UI is all about, here's a code snippet showing how to get a 'standard' Command handler to toggle the visibility of the 'Quick Access' text field that appears in the top trim. First we gain access to the model by getting the MApplication as a 'service'. Form there we can access the EModelService and use it to find the model element representing the search in the UI. Then it's just a simple matter of toggling the element's 'toBeRendered' flag to get it to (dis)appear.

public Object execute(ExecutionEvent e) throws ExecutionException {
  IWorkbenchWindow window = HandlerUtil.getActiveWorkbenchWindowChecked(e);
  MApplication theApp = (MApplication) window.getService(MApplication.class);
  MWindow activeWin = theApp.getSelectedElement();
  EModelService ms = activeWin.getContext().get(EModelService.class);
  EPartService ps = activeWin.getContext().get(EPartService.class);
  MToolControl search = (MToolControl) ms.find("SearchField", activeWin);
  if (search != null) {
    window.getShell().layout(true, true);
  return null;
Migrated to Lucene 3.5 The Eclipse platform help system has migrated from Lucene 2.9.1 to Lucene 3.5. This change brings improved performance and many bug fixes in help search. Some old help system API related to Lucene has been changed or removed as part of this fix. Refer to the platform 4.3 migration guide for more details.
Platform updated to Ant 1.8.4 The platform has been updated to use Apache Ant version 1.8.4. To see what is new in version 1.8.4 you can check the Apache Ant what's new.

SWT Changes

XULRunner on 64-bit Windows The browser widget now supports the embedding of XULRunner on Windows x86_64.
New SWT color constant for hyperlinks A new constant (SWT_COLOR_LINK_FOREGROUND) has been added that returns the native color of hyperlinks on all platforms.

BIDI Text Direction New API has been added to allow text direction to be set independent of the widget orientation. Note that this API is currently only implemented on Windows.

For more info see Snippet 364.