Platform and Equinox API
Platform Changes |
|
Job groups API |
A JobGroup API (org.eclipse.core.runtime.jobs.JobGroup ) has been added that makes it
easier to implement parallel algorithms in Eclipse.
Job groups provide a simple way to manage a set of Eclipse Jobs that are responsible for pieces of the same large task. The API supports throttling, joining, cancellation, combined progress and error reporting for all of the jobs in the group. The job grouping functionality can be used to implement performance critical algorithms using cooperating jobs. More information can be found in bug 432049. |
Direct access to structured selection of a JFace Viewer |
The JFace StructuredViewer class now has an API to access the IStructuredSelection directly.
Examples:
IStructuredSelection sel = viewer.getStructuredSelection(); ITreeSelection treeSel = treeViewer.getStructuredSelection();Bye bye (IStructuredSelection) viewer.getSelection() , we won't miss you!
|
New API: AbstractSelectionDialog |
org.eclipse.jface.dialogs.AbstractSelectionDialog is an enhanced version of the existing
org.eclipse.ui.dialogs.SelectionDialog .
It has been added to the org.eclipse.jface bundle, where it is also available for Eclipse 4 RCP applications.
The AbstractSelectionDialog API supports generics and varargs. |
Ant 1.9.4 | Eclipse has adopted Ant version 1.9.4. |
New stepFilters extension point |
The new stepFilters extension point allows clients to provide new step filters for existing debug models without having to extend those models.
To use the new extension point, clients will require a dependency on An example of the new extension point: <extension point="org.eclipse.debug.core.stepFilters"> <stepFilter class="com.example.ExampleStepFilter" modelIdentifier="com.example.debug.model"> </stepFilter> </extension> |
New debug option for resource change notifications |
In order to help troubleshooting problems with resource change listeners,
a new debug option was added to print information about which event triggers which
listener. This option gives a better picture of the flow of all workspace
change events and how other plugins react to those changes. To enable the new
option, add
org.eclipse.core.resources/debug=true org.eclipse.core.resources/notifications=truein your .options file or use the General > Tracing preference page to enable it. |
I18n support for CSS bridge |
Internationalization and localization support for the CSS bridge has been added. More information can be found in bug 437902
Example: 1. Modified files needed to enable the i18n support in the CSS bridge for the Polish locale: ![]() 2. Launch the Eclipse instance with the '-nl pl' command line arguments. Running CSS bridge with Polish locale: ![]() |
Changed type of TranslationService.LOCALE |
The type of the LOCALE value in the application context was changed from
String to Locale (for performance reasons).
If you are injecting |
CSS support for new COLOR-TRANSPARENT constant | The CSS engine now supports the COLOR-TRANSPARENT property. The implementation uses SWT's new SWT#COLOR_TRANSPARENT pseudo-color. COLOR-TRANSPARENT allowed to simplify the dark theme significantly. |
New 'inherit' value for CSS properties |
When CSS property gets 'inherit' value then the parent's value will be applied. See more in bug 419377
|
New CSS properties for the Section title bar |
The Forms Section title bar can now be styled with special CSS properties for a Section:
By using the same color for the background-color-titlebar and background-color-gradient-titlebar CSS property, like in the sample above, you get a solid background color. For more information see bug 431635. |
Support for multiple style sheet rules for the same selector |
The CSS engines now scans all style sheets and combines all matching rules into a common style. This allows plug-ins to override previously defined styles:
For more information see bug 458342. |
Provisional EHelpService service |
Eclipse now provides the provisional help service EHelpService in the IEclipseContext .
EHelpService is a thin wrapper to the WorkbenchHelpSystem in the Eclipse IDE and allows customers to
provide their custom implementation in Eclipse RCP applications.
|
Message registry |
Added support for binding control attributes for localization to a value of a messages class.
By using such a binding, the dynamic update of widgets due to locale changes at runtime (Eclipse Translation Pattern)
gets easier to implement, since the localized widgets (e.g. Labels , Buttons , etc.)
are managed by the message registry.
To use the message binding for a messages class named @Creatable public class MyMessageRegistry extends BaseMessageRegistry<MyMessages> { @Override @Inject public void updateMessages(@Translation MyMessages messages) { super.updateMessages(messages); } } It can then be used like this: @Inject MyMessageRegistry registry; @PostConstruct public void init(Composite parent) { Label myFirstLabel = new Label(parent, SWT.WRAP); Label mySecondLabel = new Label(parent, SWT.NONE); Label myThirdLabel = new Label(parent, SWT.NONE); // bind myFirstLabel via method reference registry.register(myFirstLabel::setText, (m) -> m.firstLabelMessage); // bind mySecondLabel via method name registry.register(mySecondLabel, "setText", "secondLabelMe ssage"); // bind myThirdLabel via property name registry.registerProperty(myThirdLabel, "text", "thirdLabelMessage"); }
The |
e4 tools integrated into Eclipse platform |
Parts of the e4 tools have been integrated into the Eclipse platform project. Mainly the Eclipse 4 application
model editor and related wizards are now directly available via the Eclipse update site. The e4 project wizard has been
integrated into PDE, see the PDE section for more information.
|
XPath expressions for parent element ID in Model Fragments |
When specifying the target for a fragment contribution, you can now use an
XPath expression or a comma-separated list of element IDs instead of a single
element ID.
The XPath expression uses JXPath internally, so it should reference attributes of the model object, not the XML file. These 2 samples are equivalent: parentElementId="MyMenu1, MyMenu2"
parentElementId="xpath://*[@elementId='MyMenu1' or @elementId='MyMenu2']"
This feature opens up the possibility to:
|
Icons are displayed in model editor and model spy |
If an Icon URI is defined, it is now displayed in the model editor and in the model spy:
|
Better CSS support for Forms-based editors |
CSS support for Forms-based editors has been improved. The dark theme included in the Eclipse SDK
takes advantages of that, as depicted in the following screenshot:
|
Heap Monitor can be styled, dark theme uses that |
The heap monitor has been extended to allow to set its background color, and the dark theme uses that. The following
screenshot show the heap monitor after the change.
|
Equinox Changes |
|
IAdaptable#getAdapter(Class) generified |
The org.eclipse.core.runtime.IAdaptable interface has been enhanced to return the requested type from
its getAdapter method:
public <T> T getAdapter(Class <T> adapter); Implementations of this method should also be updated. This has already been done
for some platform APIs like For more information, see bug 442021. |
Updated to Jetty version 9 | Updated to the Jetty version 9.2.3 to provide the servlet container for the Equinox Http Service implementation. Jetty 9 implements the Servlet 3.1 specification. Both Jetty 9 and Servlet 3.1 require Java 7. Java 7 is now required in order to run the Equinox Http Service and the Eclipse Help system. |
New Http Whiteboard implementation |
|
Prompt for native dependencies |
It is now possible with p2 to express dependencies on OS packages and prompt the user to install those when they are not installed.
This functionality can be enabled by a new touchpoint instruction. For example: org.eclipse.equinox.p2.touchpoint.natives.checkAndPromptNativePackage(distro:debian,package:handbrake,comparator:ge,version:0.9); At this point, the support is limited to Ubuntu. Contributions to add this support for other OS are welcomed. Integration with Tycho is available from 0.23.0-SNAPSHOT and above. |
SWT Changes |
|
Added API to set tooltip for MenuItem |
SWT now supports setting a tooltip on menu items via MenuItem.setToolTipText() .
For an example, see the Menu tab in the ControlExample.
|
The DateTime widget now uses GtkSpinButton on UNIX/Linux platforms |
The DateTime widget has been re-implemented to use the GtkSpinButton widget for
SWT.DATE and SWT.TIME styles. The new look and feel is as illustrated below:
GTK+ 2:
GTK+ 3:
|
New monitoring events added in place of SWT.Sleep and SWT.Wakeup |
The SWT.Sleep and SWT.Wakeup events have been deprecated
in favor of the more generic events SWT.PreExternalEventDispatch and
SWT.PostExternalEventDispatch , respectively. Clients that were written
using the old event names should be updated to refer to the new events.
|
Transparent background for Control |
SWT has added support to set a Control 's background as transparent. The Color class now supports specifying an alpha value (integer: 0 to 255) for transparency.
Calling Control#setBackground(Color color) with a transparent color (color with alpha value '0'), sets the control's background as transparent.
List of new classes and APIs:
Note:
Snippet365 in action (Controls with
|
APIs for high-DPI monitor support |
New APIs have been added to provide support for rendering high-resolution images on high-DPI monitors.
Two constructors have been added to the public interface ImageDataProvider { public ImageData getImageData (int zoom); } public interface ImageFileNameProvider { public String getImagePath (int zoom); } Depending on the user's monitor configuration, SWT will request images with the corresponding zoom level. Here's an example that displays 3 original images, followed by variants whose resolution changes depending your monitor's resolution: Snippet367.java.
Note that this is just the first step to support high-resolution images in
SWT and Eclipse-based applications. Work is underway to adopt the new APIs in
the platform. Futhermore, more work in SWT is required to properly
support drawing into high-resolution images via |
API to choose security context in Browser#evaluate() |
A new API Browser#evaluate(String script, boolean trusted) has been added that allows the client to run
Javascript code in the Chrome security context or in the normal security context for SWT.MOZILLA
style browsers.
|
BIDI: SWT Controls now support AUTO text direction |
The auto (a.k.a. "contextual") text direction implies that the base text direction is derived from the direction
of the first strong (either LTR or RTL) bidi character. Auto text direction is the most appropriate choice when
the text content is not known in advance and, hence, it is not yet possible to decide which base direction value,
LTR or RTL, would be most suitable at run time.
Support for auto text direction has been introduced at the SWT Control level. Auto text direction can be applied through the existing Control#setTextDirection API. The new value for auto direction is expressed as
the bitwise disjunction of (SWT#LEFT_TO_RIGHT | SWT#RIGHT_TO_LEFT ) bit fields. When
applied onto a Composite control, the auto base direction (similarly to LTR and RTL ones) is inherited by the
child components.
For example:
|
SWT Tools | SWT Tools are now available in the Eclipse Platform p2 repository. SWT Tools provides tools for developing SWT itself (JNIGen) but also general purpose tools like Sleak (monitors the creation and disposal of SWT graphics resources) and SWT Spy (prints out information like style, layout and parent about the widget under the cursor). |