Skip to main content

Platform and Equinox API

Platform Changes

Error Log view moved to Platform The Error Log view has been moved from the PDE project to the Platform project. ISVs should examine their build infrastructure for inclusion of the org.eclipse.ui.views.log plug-in. The inclusion in your own features and/or products may be redundant because this view now ships with the base platform. See bug 50517 for details.
Transient UI Elements UI model elements can be marked as transient, which means they do not get persisted when the application is closed. This allows to create views and other UI elements dynamically from code without the need to clean them up properly before the workbench is closed. It also allows to contribute static model fragments which are not persisted and therefore removed once the plug-in gets uninstalled.

To mark an element as transient simply call uiElement.getPersistedState().put(IWorkbench.PERSIST_STATE, "false");

CSS value 'unset' The value unset is now supported as CSS value and is mapped to the Java value null.

For example, when used for the background-color property, the widget will revert to the specific native look, if it has one, or inherit the background from the parent widget.

Widget factories New widget factories have been created for some SWT widgets. They follow the same approach as GridLayoutFactory and GridDataFactory i.e. a fluent, re-usable API.

The entry point is WidgetFactory.

For example, to create a button:

WidgetFactory.button(SWT.PUSH).text("Click me!").onSelect(event -> buttonClicked(event).create(parent);

This is a work in progress and more factories will follow soon.

Contribute dynamic marker help The org.eclipse.ui.ide.markerHelp extension point now allows to specify a help context provider instead of a static help context.

This example shows how to specify such a help context provider

<extension
      point="org.eclipse.ui.ide.markerHelp">
   <markerHelp
         helpContextProvider="org.eclipse.ui.ExampleContextProvider"
         markerType="ExamplePlugin.custom_marker">
   </markerHelp>
</extension>
      
The class needs to implement org.eclipse.ui.IMarkerHelpContextProvider.

SWT Changes

Mouse navigation support for StyledText The StyledText widget now supports mouse navigation scrolling similar to most web browsers. When enabled, a StyledText widget can be scrolled by clicking the mouse's scroll wheel, and then moving the mouse. Clicking the scroll wheel again cancels the scrolling, and returns the widget to its default state.

To enable mouse navigation, simply call: StyledText.setMouseNavigatorEnabled(true);

Previous Up Next

Back to the top