Java development tools
Java™ 18 Support
Java 18 is out and Eclipse JDT supports Java 18 in 4.24.
The release notably includes the following Java 18 features:
|JUnit 5 'Rerun failures first' support||
Support for rerunning a test with failures first from the JUnit View is now supported for JUnit 5 tests. This support already existed for JUnit4 tests but was previously disabled for JUnit5 testing.
To run, click on the Rerun Test - Failures First button in the JUnit view.
After pressing the button:
|Remove unused private method parameters||
A new cleanup and quick-assist has been added to remove unused parameters of private methods. If removing parameters might
lead to a conflict with an another method, the private method is renamed to be unique. The cleanup is not available if there
is a method reference to the method, as in
To apply the cleanup, select the Remove unused private method parameters checkbox on the Unnecessary Code tab in your cleanup profile:
With the cleanup, the following code:
To remove a single parameter, a quick-assist has been added that can be activated with CTRL+1 with the cursor located anywhere on the parameter.
A new quick-assist has been added to extend an Interface. When selected, the new Interface wizard opens up.
|Extend Replace System.getProperty() calls clean up||
The existing clean up has been extended to replace more
For the given code:
|Create sub type for sealed super type||
A new set of quick-fixes has been added to create sub-type for a sealed type which does not have any permitted types. When selected, the appropriate new Class/Record/Interface wizard opens up.
These quick fixes have been added to fix the error :
As shown below, two new quick fixes have been added to create sub-type for a sealed super class.
As shown below, six new quick fixes have been added to create sub-type for a sealed super interface.
|Console support for stack from Debug view||
Surprisingly enough, Java Stack Trace Console never supported navigation to
Java types for Java stack traces copied from Debug view via Copy Stack action.
Now, the console will underline type names and line numbers and clicking on links will jump to the corresponding source code. If the type name is not unique, default Select type dialog will appear to allow selection of the right type.