## What's New in Eclipse 4.25 (JDT)

Here are descriptions of some of the more interesting or significant changes made to the Java development tools (JDT) for the 4.25 release of Eclipse. They are grouped into:

- JUnit
- Java Editor
- Debug

See also the Eclipse Platform What's New document for changes in the Platform.

We also recommend to read the Tips and Tricks.

## JUnit

Test Suite wizard supports JUnit 5 | The New JUnit Test Suite Wizard has been enhanced to now allow the creation of a JUnit 5 test suite using the @Suite annotation. To open the New JUnit Test Suite Wizard for the current package, go to New > Other > Java > JUnit > JUnit Test Suite. The following shows what the wizard now looks like: The result of this is:

## Java Editor

Convert while loops to enhanced for loops

The clean-up to convert to enhanced 'for' loops where possible has been enhanced to convert eligible while statements that use an iterator into enhanced for loops. The current clean-up already supports converting 'for' loops using an iterator into an enhanced 'for' loop.

To apply the cleanup, select the Java 5 Convert to enhanced 'for' loops checkbox on the Java Feature tab in your cleanup profile.

With the cleanup, the following:

Is changed to:

The secondary option: Only if loop variable used applies as normal with loops that do not access the loop variable being ignored.

Convert to switch expression

The clean-up to convert to a switch expression where possible has been enhanced to recognize switch statements that have every case either end in a return statement or a throw of an exception. In such a case the switch statement is converted into a return of a switch expression.

To apply the cleanup, select the Java 14 Convert to switch expression where possible checkbox on the Java Feature tab in your cleanup profile.

With the cleanup, the following:

is changed to:

## Debug

Double click in "All References and "All Instances" pop-up to navigate to Type | Previously, clicking on any of the shown items in the "All References" and "All Instances" popup wasn't acted upon. This is now improved - if the selected variable or field type's source code is available, the editor tries to open it, and navigate to the declaration.