Eclipse 4.9 marks the beginning of the Eclipse Foundation’s quarterly Simultaneous Release
The Eclipse Foundation just released the Eclipse SDK project, which is part of the 2018-09 release. Let’s have a look at the new features for Java developers.
As you might already know, it’s part of the 2018-09 release, which marks Eclipse Foundation’s first quarterly Simultaneous Release. You can download the Eclipse SDK and related resources from the Eclipse Project downloads page. The Eclipse installer and other packages can be downloaded from the Eclipse Installer page.
What’s new and noteworthy in the Java Editor? For starters, the Breadcrumb in the Java Editor now uses a dark background in the Dark theme. If you prefer the Light theme, you should know that the Breadcrumb uses a flat look style instead of a gradient.
The existing quick fix to create missing methods has received a notable improvement: it now creates abstract method declarations but there’s a catch: it only appears when the target class is an abstract class.
Last but not least, there’s a new quick fix which allows you to convert static field accesses and static methods to use a static import. You should also know that it’s possible to replace all occurrences at the same time.
Java Code Generation
Eclipse 4.9 brings a new option [which you’ll find in the Source > Generate hashCode() and equals()… tool] which allows you to create implementations using the Java 7
Learn more about it here.
Java Views and Dialogs
A new quick fix is provided on the JRE Compiler Compliance problem marker which is created when the compiler compliance does not match the JRE being used. Thanks to the new quick fix, you now have the option of opening the Compiler Compliance page of the project to fix the issue.
Also, you should be happy to know that the Open Type dialog always shows the full path of all the matching items.
New formatter settings alert! It’s now possible to keep the bodies of simple loops (without braces) in the same line as their headers, similar to the previously existing setting for simple ‘if’ statements. You can control different kind of loops (‘for’, ‘while’, ‘do while’) independently.
You’ll find the settings in the profile editor under New Lines > In control statements > Simple Loops.
Speaking of new settings, there’s one to help control how these loops should be handled if they exceed the maximum line width. You’ll find it under Line Wrapping > Wrapping settings > Statements > Compact loops (‘for’, ‘while’, ‘do while’).
If you’re familiar with align fields in columns, you should know that it has been expanded and can also be used for variable declarations and assignment statements. always align with spaces has received an option [even if tabs are used for general indentation] that’s very similar to the Use spaces to indent wrapped lines. It will come in handy if you want to make the code look good in editors with differing tab width.
You’ll find the settings related to aligning in the new preferences subsection: Indentation > Align items in columns.
Observing the result of step operations may affect the speed of execution, which may become unusable if this takes too long. To solve this problem, a timeout (default: 7000 ms) has been introduced after which the observation mechanism is disabled until the end of the step operation.
There’s a new option in the Debug view to show or hide running threads. This is helpful when debugging heavily multithreaded application when you have to find threads stopped at breakpoints among hundreds or thousands of running threads.
Speaking of new and newsworthy, there’s also a new button Show Command Line which has been added in the Java Launch Configuration dialog. If you click the button, a dialog which shows the command line used for launching the application will open.
You should also know that thread name changes in the debuggee JVM are reflected in the Debug View. You can use a VM option to disable this behavior if the JVM communication necessary for the name updates is not desired. You can, of course, disable this functionality by specifying the following VM option.
Last but not least, if classpath and/or modulepath are longer than current operating system limits, they are automatically shortened. If you need a temporary jar to shorten the classpath (Java 8 and previous versions), you’ll see a dialog asking for confirmation.
Find out more about Eclipse 4.9 here.