Eclipse Project 4.4 M6 - New and Noteworthy

Here are some of the more noteworthy things available in milestone build M6 (March 7, 2014) which is now available for download.
We also recommend to read the Tips and Tricks, either via Help > Tips and Tricks... or online for Platform, JDT, and PDE.

Experimental support for WebKit2 added to the SWT Browser The SWT Browser now has preliminary support for WebKit2. To try it out, create a browser widget with style SWT.WEBKIT, and set the environment variable SWT_WEBKIT2 to 1. This is only supported with GTK+ 3.x; if GTK+ 3 is disabled the browser will fallback to WebKit1.
SWT does not work on Linux with GTK+ 3 version > 3.8.x The Linux GTK+ 3 port of SWT is currently broken for GTK+ versions above 3.8.x. This primarily affects users running Fedora 20, Ubuntu 14.04 (Alpha builds), openSUSE 13.1 and any other Linux distributions that bundle GTK+ 3.10.x. In those setups, the launcher will automatically switch back to GTK+ 2. For more details see bug 421127.
BIDI segments support for Combo on Windows The Combo widget now supports the same SegmentListener API as Text. This allows an application to specify segment boundaries and Unicode Control Characters to use in the segment boundaries.

Snippet332 shows how to accomplish RTL override in a Combo.

JFace clients can use BidiUtils#applyBidiProcessing(...) to set pre-defined text types.

Dark theme A new experimental CSS theme based on a community contribution has been added. This popular community theme demonstrates the capabilities of the current CSS styling. This new theme helps the Platform team to continue to improve these capabilities.

CSS theming in Eclipse 4 does currently not allow to configure the syntax highlighting in text editors (e.g. the Java editor), so it is recommended to use the dark theme together with additional settings as for example provided by the Eclipse color theme project.

Open as project In the Project Explorer, a folder that contains a .project file and whose related project isn't already in the workspace now shows an Open As Project context menu entry that imports the folder as existing project into the workspace.

Updated launch options The default preference for the fall-back behavior of context-sensitive launching has been changed to launch the previous application.

Existing workspaces that use the "Always launch the previously launched application" option are not affected by this change.

MLocalizable mixin interface Changed the way in which localization is done in the application model. While before EOperations (methods) where used to get a localized value, now volatile, transient, derived, unchangeable EStructuralFeatures are used. Doing this enables to send notifications if a localizable value has changed. To mark EClasses who hold localizable informations and to inform them externally about a changed Locale, the MLocalizable mixin interface is introduced, which contains the single method updateLocalization(). This enables to generically search the model for model elements affected by a Locale change and force them sending out updates.
Locale change propagation Introduced the ILocaleChangeService which need to be used to change a Locale at runtime. Using this service will:
  1. Update the Locale in the application context.
  2. Inform all model elements of an application that implement MLocalization about the change.
  3. Post an event via event broker.
Locale change consumption There are now three ways to get informed about a Locale change:
  1. Via event broker by listening to the topic org/eclipse/e4/core/NLS/LOCALE_CHANGE
  2. Via dependency injection by getting the value for TranslationService.LOCALE injected (e.g. via method injection)
  3. Via attaching to the model events listening to the newly introduced LOCALIZED-Features
Note: The renderers need to be modified to listen to the LOCALIZED-Features, otherwise the Locale change at runtime isn't supported!
ResourceBundleProvider Introduced the ResourceBundleProvider service to abstract out the reference to BundleLocalization OSGi service. This way users are able to change how ResourceBundles should be looked up within their Eclipse application, e.g. using class-based ResourceBundles, loading translations out of a database, loading ResourceBundles from a server by using a different ResourceBundle.Control. The default implementation DefaultResourceBundleProvider is internally using BundleLocalization to keep the known default behaviour.
TranslationService update The TranslationService, that is used to localize the application model, had several downsides regarding extensibility. A lot of code needed to be copied in order to create a custom TranslationService that retrieves translations from a different location than the OSGi-ResourceBundle. To make it easier for users to implement a custom TranslationService, the API was modified. The method getResourceString(String, ResourceBundle) is moved from BundleTranslationProvider to TranslationService with protected visibility, as it contains the logic to retrieve and transform the translation key that is set in the application model. The default implementation BundleTranslationProvider is now using the ResourceBundleHelper in combination with the ResourceBundleProvider. This way the localization of the application model and the localization via new message extension are using the same mechanisms. As a small enhancement, this also enables the usage of dot separated keys for translating the application model.

Also with M6 the package is released as API.

CSS includes CSS files for Eclipse can now include other CSS files via the @import url("platform:/plugin/Bundle-Symbolic-Name/path/file.extension"); statement. This allows easy reuse of existing style sheets.
CSS bridge The CSS support for the 3.x theme element definitions is now available (the CSS bridge), for more details see the following bugs: The use cases for the bridge:
  • Using the Color and FontDefinitions in the CSS style sheet:

  • Overriding of the definitions in the CSS style sheet:

  • Adding the new definitions with the CSS style sheet:

The 3.x theme definitions overridden or added in the CSS style sheet are merged with the current 3.x theme.
After switching the 3.x theme they are re-merged with the new theme.

The new definitions added with the CSS file (the last use case) are available in the CSS theme that provides it.
After switching the CSS theme the definitions can be unavailable in the theme registries when the new theme doesn't re-define it. So using such definitions out of the CSS files, we have to be prepared for such situation and use proper default values in the case when some definitions are missing.
New 'themeAssociation' element of the 'org.eclipse.e4.ui.css.swt.theme' extension point Currently the user is able to connect the CSS theme with proper 3.x theme. After defining the proper association between themes, when user changes the CSS theme with the combo in the preference dialog, the proper 3.x theme will be set automatically.

Print debug trace to the standard output stream On the General > Tracing preference page you can now choose to have the output of debug trace statements being sent to the standard output stream.

The tracing preference page with output to standard output stream option

Products can specify OS/arch system properties In the Product Editor you can now add system properties that will only apply to a single OS, a single architecture or a an OS/architecture combination.

The product editor showing os/arch system properties

Products can specify OS/arch launch arguments In the Product Editor you can now add program and VM arguments to all platforms, a specific operating system or a specific architecture/OS combination. A preview area shows the complete list of arguments that will apply to the selected OS and architecture.

The product editor showing os/arch vm arguments

The above features are just the ones that are new since the previous milestone build. Summaries for earlier Luna milestone builds: