Eclipse Project Photon (4.8) M2 - New and Noteworthy

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

Associate content type with a file name pattern From the Preferences > General > Content Types preference page, you can now associate a content type with a file name pattern and use ? or * wildcards at any place in that pattern (respectively to match any character or any string).
Dark buttons on Mac The background color of a button can now be styled on the Mac. This is used to style the buttons in the dark theme.

Improved caret performance on GTK3 Caret performance on the SWT GTK3 port has been enhanced to allow for smoother drawing. Previously the caret stuttered when moved or when other controls in the same shell were manipulated. Now the caret moves smoothly and blinks at a consistent rate.
Improved Java syntax coloring in the dark theme To improve readability in the dark theme, bold style usage has been reduced and some colors that were too close to each other have been altered.

Eclipse support for JUnit 5 JUnit 5 support is now available in Eclipse. Try it out with Eclipse Photon (4.8) M2 build or any of the available options from Eclipse Marketplace.
  • Create a new JUnit Jupiter test via New JUnit Test Case wizard:

  • Add JUnit 5 library to the build path:

    • New JUnit Test Case wizard offers to add it while creating a new JUnit Jupiter test:

    • Quick Fix (Ctrl+1) proposal on @Test, @TestFactory, @ParameterizedTest and @RepeatedTest annotations:

    • Add JUnit library in Java Build Path dialog:

  • Create a JUnit Jupiter test method with the new test_jupiter template:

  • Create a @TestFactory method with the new test_factory template:

  • JUnit Jupiter’s Assertions, Assumptions, DynamicContainer and DynamicTest classes are now added to Eclipse Favorites by default:

    This allows you to quickly import the static methods from these classes in your code via Content Assist (Ctrl + Space) and Quick Fix (Ctrl + 1).

  • View all the failures from grouped assertions in the same Result Comparison dialog opened from JUnit view:

  • View the number of disabled tests and tests with assumption failures on hover in JUnit view:

  • Use Go to File action or just double-click to navigate to the test from JUnit view even when the test is displayed with a custom name:

  • (Re-)Run a single @Nested test class by using the Run action in JUnit view or Outline view. You can even right-click on a nested test class name in the editor and use the Run As action:

  • The Test Method Selection dialog in JUnit launch configuration now shows the method parameter types also:

  • Note: This functionality has been replaced with the new Configure Tags dialog in M3.

    You can provide tags to be included in or excluded from a test run via Program arguments in the Arguments tab of JUnit launch configuration. The options are:

    • --include-tag <String>
    • --exclude-tag <String>

    where <String> is a tag to be included in or excluded from the test run. These options can be repeated with newline separation:


  • If you are using an Eclipse workspace where you were running your JUnit 5 tests via @RunWith(JUnitPlatform.class) in Eclipse without JUnit 5 support then you will have JUnit 4 as the test runner in their launch configurations. Before executing these tests in Eclipse with JUnit 5 support, you should either change their test runner to JUnit 5 or delete them so that new launch configurations are created with JUnit 5 test runner while running the tests:

  • We do not support running tests in a setup where an old Eclipse build (not having JUnit 5 support) is using a new Eclipse build (having JUnit 5 support) as target. Also, developers who have the JDT JUnit runtime bundles (org.eclipse.jdt.junit.runtime, org.eclipse.jdt.junit4.runtime) checked out and pull the latest changes will run into the above issue. You are expected to use a new Eclipse build for the development.
Source tab added to target definition editor Within the current default Target Definition Editor, a 'Source' tab has been added which contains the Extension Based Text Editor's Target Definition Editor. The editor is concurrent with the other tabs and the update made will be mirrored between the tabs.
Platform Developers
Lambda as Listener Listener interfaces in SWT were enhanced to provide static helper methods that accept lambdas and method references as listeners. These methods are alternatives to using Adapter classes.
  • org.eclipse.swt.custom.ControlListener
  • org.eclipse.swt.browser.LocationListener
  • org.eclipse.swt.browser.ProgressListener
  • org.eclipse.swt.browser.VisibilityWindowListener
Transparent color support on GTK3 The SWT GTK3 port now includes support for transparent colors. Previously, SWT Color on GTK only supported Red, Green and Blue (RGB) values (all colors were opaque by default). Now, users can set alpha values to manipulate the transparency property of SWT colors on GTK3.

The image below shows a red Canvas widget that is half transparent (alpha set to 0.5).

Set Button background color on Mac Button.setBackground() can now set the background color for a Button on Mac.

Generic Editor aggregates hover from multiple sources The hover included in Generic Editor now aggregates the hover content from multiple sources instead of picking only one.

This allows for example to contribute 3 distinct hovers for Problem details, code documentation and Debug details via the org.eclipse.ui.genericeditor.hoverProviders extension point, and to get those 3 contributions shown simultaneously when hovering in the Generic Editor.

Hovers that return null as hover range or hover info for a given location would be ignored.

CSS Engine upgraded to use Batik 1.9 instead of 1.8 The theme engine in Platform UI was upgraded to use Batik 1.9 instead of 1.8.

The following Orbit bundle changes happened:

  • org.apache.batik.css was upgraded to version 1.9.0
  • org.apache.batik.util was upgraded to version 1.9.0
  • org.apache.batik.i18n version 1.9.0 was added
  • org.apache.batik.util.gui version 1.8.0 was removed

No code change is needed to adopt to the migration.

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