The Eclipse Foundation has released the latest version of the Eclipse IDE. Eclipse Photon brings support for both Java 10 and Java EE 8, improvements for PHP development tools, dark theme UI improvements, and more.
Java 10 is completely supported for Eclipse Java Development Tools (JDT), and enables developers to use local variable type inference (JEP 286), such as suggesting code completion where var
is allowed and Quick Assist to convert from type to var
.
Eclipse Photon has also added a feature to convert a non-modular Java project to a module by creating a module.info.java
. Developers can also create a module by pasting a code snippet that represents module-info.java directly into a source folder to create a module-info.java file. The following code can be copy-pasted to demonstrate this:
import java.sql.Driver;
module hello {
exports org.example;
requires java.sql;
provides Driver with org.example.DriverImpl;
}
The Java Editor has been improved in Eclipse Photon in several ways. The Java syntax coloring has been improved when using the dark theme by reducing bold style usage and changing some colors that were too close to each other. Furthermore, now it is possible to escape non-ASCII characters when pasting into a string literal. To enable it, click Java > Editor > Typing > Escape text when pasting into a string literal and check Use Unicode escape syntax for non-ASCII characters. Below is a sample of characters replaced by unicode escape sequences when pasted into a string:
Eclipse Photon enables developers to sort library entries alphabetically in Package Explorer; to enable it, open Java > Appearance preference page, and check Sort library entries alphabetically in Package Explorer. The libraries will be presented as follows:
The Java Compiler in Eclipse Photon contains a new preference named "Compiler Compliance does not match used JRE", which indicates the severity of the problem reported when a project uses a JRE that does not match the compiler compliance level selected (e.g. a project using JRE 1.8 as JRE System Library, and the compiler compliance is set to 1.7). In addition, there is new support for running Java annotations on test sources, and an experimental feature was added to allow regex usage when searching for module declaration.
The Java Formatter profile preference was simplified, with all preferences presented in an expandable tree instead of multiple tabs. To see it, open Java > Code Style > Formatter > Edit. There is a new option "align Javadoc tags in columns" under Comments > Javadoc.
Below an example of Align descriptions, grouped by type in usage:
Debugging with Eclipse Photon has become more productive, thanks to a series of new features:
- Advanced source lookup provides correct source lookup when runtime class path is not known in advance
- Launch configuration prototype for Java launch configurations
- The debugger now listens to thread name changes, which means that the Java debugger adds a news breakpoint in the JVM and notifies Debug view on a breakpoint hit
- Valued displayed for method exit and exception breakpoints, the last method result (per return or throw) that was observed during Step Into, Step Over or Step Return, is now shown as first line in the Variables view
- In the breakpoints view, a new sort by option has been added to sort by age
The PHP Development Tools has received a series of enhancements, such as validation support for variable unused/unassigned, validation for scalars in break/continue, validation for static operation for PHP 7 or higher. Additionally, the PHP Explorer has been replaced by the Project Explorer. A complete list of PHP features is available in the PHP section on the Eclipse Photon New and Noteworthy page.
According to the Eclipse Foundation, this release includes 85 projects with more than 73 million lines of code, with contribution by 620 developers, 246 of whom are Eclipse committers. More information about the Eclipse Photon can be found on Eclipse Photon New and Noteworthy page. Eclipse Photon can be downloaded from the Eclipse downloads page.