Skip to main content

Java development tools

Java 12 Support

Java 12 Java 12 is out and Eclipse JDT supports Java 12 for 4.11 via Marketplace. The release notably includes the following Java 12 feature: JEP 325: Switch Expressions (Preview). Please note that this is a preview language feature and hence enable preview option should be on.
For an informal introduction of the support, please refer to Java 12 Examples wiki.


JUnit 5.4 JUnit 5.4 is here and Eclipse JDT has been updated to use this version.
Test factory template JUnit Jupiter now allows test factory methods to return a single DynamicNode. The test_factory template has been updated to include DynamicNode in the return type.

Java Editor

Default and constant values in content assist information pop-up The additional information pop-up of a content assist proposal now shows the default value of an annotation type element:

and the value of a constant:

Create service provider method If a service defined in a file has an invalid service provider implementation, a Quick Fix (Ctrl + 1) is now available to create the new provider method:

Java Formatter

Line wrapping settings for binary operators Instead of a single line wrapping setting for binary expressions, there's now a whole section of settings for various kinds of binary operators (multiplicative, additive, logical, etc.). There are settings for relational (including equality) and shift operators, which were not covered by the old setting. Also, string concatenation can now be treated differently from arithmetic sum.

The settings can be found in the Profile Editor (Preferences > Java > Code Style > Formatter > Edit...) under the Line Wrapping > Wrapping settings > Binary expressions subsection.

White space settings for binary operators The white space around operators in binary expressions can now be controlled separately for different groups of operators, consistent with the line wrapping settings.

The new Binary operators sub-section has been added under White Space > Expressions in the Formatter profile editor.

Wrapping setting for chained conditional expressions A chain of nested conditional expressions (using ternary operator) can be now wrapped as a single group, with all of them indented at the same level. It's only possible for right-sided nesting.

Find the Chained conditionals setting in the Profile Editor under the Line Wrapping > Wrapping settings > Other expressions subsection.

Indent Javadoc tag descriptions The Formatter Profile has a new setting that indents wrapped Javadoc tag descriptions. It's called Indent other tag descriptions when wrapped, in contrast to the preexisting Indent wrapped @param/@throws descriptions setting. It affects tags like @return or @deprecated.

The settings can be found in the Profile Editor (Preferences > Java > Code Style > Formatter > Edit...) under the Comments > Javadocs section.


History for expressions in the Variables view The Variables view now stores a history of the expressions used in the Detail pane. You can choose a previously entered expression for a variable from the new drop-down menu. The expression will be copied to the Detail pane where you can select it to perform various actions present in the context menu.

Previous Up Next

Back to the top