Eclipse Project Oxygen (4.7) M3 - New and Noteworthy

Here are some of the more noteworthy things available in the Oxygen milestone build M3 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.

Copy Details submenu for Problems and Tasks views You can copy the description or the resource qualified name of an error, warning, or task into the clipboard using commands in the Copy Details context menu.

Show Annotation renamed to Show Revision Information For files checked out from CVS, the Show Annotation command in the text editor's vertical ruler and in the Team menu has been renamed to Show Revision Information.

This change has been synchronized with the Eclipse Git team provider, so future versions of EGit will use the same name.

"Other Projects" working set in Project Explorer If you're using the Project Explorer and working sets as top-level elements, the Top Level Elements view menu now provides a way to show an Other Projects group for projects that are not in one of the currently active working sets.

"Recently used filters" feature in Project Explorer The Project Explorer view now has a Recent Filters menu that shows the most recently used filters.

Reduced window margins The window margins have been reduced to provide more space in the IDE.

Old style:

New style (see the reduced space below the Quick Access box).

External browsers on Linux On Linux, the list of recognized external browsers has been updated to include:
  • Firefox (/usr/bin/firefox)
  • Chrome (/usr/bin/google-chrome)
  • Chromium (/usr/bin/chromium-browser)
  • Epiphany/Gnome Web (/usr/bin/epiphany)
  • Konqueror (/usr/bin/konqueror)

GTK theme system property SWT now stores the GTK theme used at launch time in a system property, org.eclipse.swt.internal.gtk.theme. This property can help with troubleshooting issues that are specific to certain themes. It can be viewed in About > Installation Details > Configuration.
Ctrl+E command improvements You can use the Quick Switch Editor (Ctrl+E) command to list and filter all the open editors. This works now also if you have selected a view in the editor area. You can filter the list using wildcards, and select editors using mouse or keyboard.

Now you can also cycle through the list by pressing Ctrl+E again. Or use Arrow Up/Down as before.

Perspective descriptions in Open Perspective dialog You can now see the description for a perspective (if provided by the contributing plug-in) by pressing F2 in the Open Perspective dialog.

Remote Java Application "Socket Listen" type supports multiple incoming connections The Remote Java Application debug configuration's Standard (Socket Listen) connection type now supports incoming connections from multiple VMs. This is useful for debugging distributed systems. The connection limit may be set to a fixed number, or 0 for unlimited connections.

New option to disable HCR You can now disable Hot Code Replace (HCR) if it causes any trouble or if you want to avoid code changes in a debug target. HCR is enabled by default but can be disabled in Preferences > Java > Debug.

Escape text when pasting into a string literal The Java > Editor > Typing > Escape text when pasting into a string literal preference option is now enabled by default. This will escape the special characters in pasted strings when they are pasted into an existing string literal.

To paste without escaping, you can either paste outside of a string literal, or you can disable Edit > Smart Insert Mode.
Set colors for Javadoc You can use the new color preferences to set the foreground text color and the background color in the Javadoc view and hovers:

Hide inherited members from java.lang.Object You can hide all inherited members from java.lang.Object in the Quick Outline (Ctrl+O) by using the new filter from the drop-down menu (Ctrl+F10):

New Java index Eclipse 4.7 M3 contains an experimental new Java index which is enabled by default. If you suspect an index-related problem, you can disable the new index from Preferences > Java:

Currently, the new index shouldn't affect your experience. Once the work is finished, we expect big performance improvements for type hierarchies and in scenarios with many JARs.
Validate launch configuration activated by default When you create a new Eclipse Application launch configuration, PDE will now by default enable the option to Validate Plug-ins automatically prior to launching. This helps you to identify missing plug-in dependencies before the actual start of the application and makes it easier for new plug-in and RCP developers to identify common problems. You can disable this validation in the launch configuration dialog, on the Plug-ins tab.

Severity of default method addition in API tooling On the Plug-in Development > API Errors/Warnings preference page in the API Compatibility tab, there is a new option in the Interface section to control the severity of a "default method addition" API change.

By default, the option is set to "Error" because adding the same method in multiple interfaces can break existing clients at run time (JLS8 13.5.6).

Added a PDE plug-in project template for the Generic Text Editor A plug-in template was added to show off the new extensible generic editor functionality. It will kick-start you with a sample .target file editor with syntax highlighting.

Platform Developers
Lambda as SelectionListener The SelectionListener interface in SWT was enhanced to provide the SelectionListener#widgetSelectedAdapter(Consumer<SelectionEvent> c) and SelectionListener#widgetDefaultSelectedAdapter(Consumer<SelectionEvent> c) static helper methods that accept lambdas and method references as listeners.

Example for adding a selection listener to a button:

import static;
// ...

Button button = new Button(parent, SWT.PUSH);
button.addSelectionListener(widgetSelectedAdapter(e -> {System.out.print("Hello");}));
SWT Button widget background and foreground color can be styled on Windows You can now style the background and foreground color of the SWT Button widget on Windows:

Note: Above implementation is a custom paint operation that applies to all Button types except SWT.ARROW on Windows.
Composite#changed(Control[]) deprecated The Composite#changed(Control[]) method has never been used in the Eclipse Platform, and the method never had a well-defined purpose. It is now deprecated. Calling it is now equivalent to calling Composite.layout(Control[], SWT.DEFER).
SWT spies separated from Tools plug-in The Sleak and Spy views are now available in a new plug-in, They were previously part of, which depends on JDT. With the new spies plug-in, it is now possible to use the spies without depending on JDT. This makes it especially suitable for inclusion in target definitions and Eclipse RCP applications.
Added an easily-extensible Generic Text Editor With this new editor it is now much easier to enrich a new generic editor so you can add support relatively easy for new languages. It is reusing the existing Eclipse editor infrastructure but with the generic editor you don't need to implement an editor to supply functionality for a new file content-type. Instead you make the generic editor smarter by extension points.

The following example shows how to contribute features to the generic editor via extensions:

<extension point="org.eclipse.ui.genericeditor.contentAssistProcessors">
<extension point="org.eclipse.ui.genericeditor.hoverProviders">
<extension point="org.eclipse.ui.genericeditor.presentationReconcilers">

Those new extension points receive as arguments regular Platform classes (IPresentationReconcilier, ITextHover, ICompletionProposalComputer) to add behavior to the generic editor. No new Java API is necessary.

Here is a simple example of adding some minimal Gradle syntax highlighting support:

public class GradlePR extends PresentationReconciler {

	private IToken quoteToken = new Token(new TextAttribute(new Color(Display.getCurrent(), new RGB(139, 69, 19))));
	private IToken numberToken = new Token(new TextAttribute(new Color(Display.getCurrent(), new RGB(0, 0, 255))));
	private IToken commentToken = new Token(new TextAttribute(new Color(Display.getCurrent(), new RGB(0, 100, 0))));

	public GradlePR() {
		RuleBasedScanner scanner = new RuleBasedScanner();

		IRule[] rules = new IRule[5];
		rules[0] = new SingleLineRule("'", "'", quoteToken);
		rules[1] = new SingleLineRule("\"","\"", quoteToken);
		rules[2] = new PatternRule("//", null, commentToken, (char)0, true);
		rules[3] = new NumberRule(numberToken);
		rules[4] = new GradleWordRule();

		DefaultDamagerRepairer dr = new DefaultDamagerRepairer(scanner);
		this.setDamager(dr, IDocument.DEFAULT_CONTENT_TYPE);
		this.setRepairer(dr, IDocument.DEFAULT_CONTENT_TYPE);

Above you see it is relatively simple to supply the rules for syntax highlighting. The generic editor picks those up through the extension points and here is the editor in action:

An extension point to associate existing editors and content-types The extension point org.eclipse.ui.editors can now receive a new editorContentTypeBinding child element which allows to define binding of an existing editor for an existing content-type.

Here is an example:

<extension point="org.eclipse.ui.editors">
Application model allows toolbar definitions for parts and perspectives The application model has been extended to support the definition of toolbars (via trimbars) for parts and perspectives. This simplifies the implementation of a common requirement in RCP applications. You can now define toolbars specific to a perspective and toolbars rendering within the part area via your custom renderer.

Currently, the default Eclipse renderers do not use these new elements.

Dependency injection for Eclipse 3.x views available You can now use dependency injection (di) in your Eclipse 3.x. views. You can enable this for a view via the new inject flag in the org.eclipse.ui.views extension.

Example usage:

public class SampleView extends ViewPart {

	@Inject IWorkbench workbench;

	private TableViewer viewer;

	public void createPartControl(Composite parent) {
		viewer = new TableViewer(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);

		viewer.setInput(new String[] { "One", "Two", "Three" });
		viewer.setLabelProvider(new ViewLabelProvider());

		// Create the help context id for the viewer's control
		workbench.getHelpSystem().setHelp(viewer.getControl(), "test7.viewer");
	// more stuff
Debugging test timeouts In bundle org.eclipse.test.performance, there's a new API that helps debugging those pesky tests that are freezing / hanging / DNF ("Did not finish") in a remote Hudson build, and you have no clue why, because they always pass locally.

If your tests are organized in a JUnit-4-style test suite using the


annotation, you can just replace that line by


This will log the start of each atomic test contained in the suite to System.out, and it will try to collect more information after a timeout (stack traces, screenshot). And it will even try to throw an exception in the main thread, so that other tests can proceed. See the Javadoc for configuration options.

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