JBoss Tools 4.16.0 and Red Hat CodeReady Studio 12.16 for Eclipse 2020-06 are here waiting for you. Check it out!
Installation
Red Hat CodeReady Studio comes with everything pre-bundled in its installer. Simply download it from our Red Hat CodeReady product page and run it like this:
java -jar codereadystudio-<installername>.jar
JBoss Tools or Bring-Your-Own-Eclipse (BYOE) CodeReady Studio require a bit more:
This release requires at least Eclipse 4.16 (2020-06) but we recommend using the latest Eclipse 4.16 2020-06 JEE Bundle since then you get most of the dependencies preinstalled.
Once you have installed Eclipse, you can either find us on the Eclipse Marketplace under "JBoss Tools" or "Red Hat CodeReady Studio".
For JBoss Tools, you can also use our update site directly.
http://download.jboss.org/jbosstools/photon/stable/updates/
What is new?
Our main focus for this release was a new tooling for the Quarkus framework, improvements for container based development and bug fixing. Eclipse 2020-06 itself has a lot of new cool stuff but let me highlight just a few updates in both Eclipse 2020-06 and JBoss Tools plugins that I think are worth mentioning.
OpenShift
Hibernate Tools
Platform
Text Editors
Support for ligatures on Windows
Eclipse now supports font ligatures on Windows. It was already supported on Linux and macOS. You can specify the font with ligatures to be used by the Text editors using the preference:
General > Appearance > Colors and Font > Basic > Text Font
Screenshot of ligatures rendered in the Java Editor on Windows 10:
Themes and Styling
Native dark scrollbars in Windows dark theme
The Eclipse dark theme now uses the native dark scrollbars and retired the software solution for the editor area.
Eclipse toolbar’s styling on Windows aligned with Win 10
The default Eclipse light theme has been updated to align better with the Windows 10 default theme.
Old:
New:
Preferences
Verify installation operations against current JRE
A new option (on by default) is available in the Install/Update preference page: Verify provisioning operation is compatible with current running JRE. This enables some extra check when installing, updating or uninstalling content using the standard dialogs so the operation will fail with a useful message if the units you’re installing require a newer or incompatible Java runtime than the one that’s currently in use to run the IDE.
Here is how the error message looks like, for example when you’re trying to install a unit that requires Java 14 and you’re running the Eclipse IDE with an older Java version:
'Select All' and 'Deselect All' for Import breakpoints wizard
You can now use Select All or Deselect All buttons to select or deselect all the breakpoint markers during import of breakpoints.
General Updates
Show key bindings when command is invoked
For presentations, screen casts and learning purposes, it is very helpful to show the corresponding key binding when a command is invoked. This was added some releases ago.
It is now possible to enable this feature separately for keyboard interaction and mouse clicks. So you can enable it for mouse clicks only, for keyboard interaction only or for both. Enabling this only for mouse clicks is very helpful for users who want to learn existing key bindings.
You can enable this on the Preferences dialog via the Show key binding when command is invoked group on the General > Keys preference page. To change this setting quickly the command 'Toggle Show Key Bindings' can be used (e.g. via the find actions dialog).
Java Developement Tools (JDT)
Java 14 Support
Java 14
Java™ 14 is available and Eclipse JDT supports Java 14 for the Eclipse 4.16 release.
The release notably includes the following Java 14 features:
-
JEP 361: Switch Expressions (Standard).
-
JEP 359: Records (Preview).
-
JEP 368: Text Blocks (Second Preview).
-
JEP 305: Pattern Matching for Instanceof (Preview).
Please note that preview option should be on for preview language features. For an informal introduction of the support, please refer to Java 14 Examples wiki.
Set JDK Compliance to 14
You can set the JDK compliance to 14 and enable the preview features in Preferences > Java > Compiler:
Template to create new record
You can use the new_record
template to create a record in an empty .java
file:
Record Creation Wizard
You can create a new record using the Record creation wizard that can be opened by:
-
Right Click on the Project > New > Record
-
Right Click on the Project > New > Other and search for Record
-
Right Click on the Project > New > Other > Java > Record
The Record creation wizard comes up as shown below.
Note: In older workspaces the "Record" entry may not appear directly under the "New" menu in the Java perspective. To resolve this, either use a new workspace or launch eclipse with the option -clearPersistedState
for your existing workspace.
Enable preview features
You can now quickly enable the preview features on an applicable Java project by right-clicking on it and selecting Configure > Enable preview features:
You can also change the default severity (warning) of the preview features compile problem in the opened Project properties dialog:
Java Editor
Non-blocking Java code completion
By default, code completions in the Java editor are now configured to be computed (when possible) in a separate non-UI thread in order to prevent UI freezes in case of long computations.
Users can restore the legacy behavior in Preferences > Java > Editor > Content Assist > Advanced by unchecking the enable non-blocking completion checkbox; integrators can change the value of the org.eclipse.jdt.ui.content_assist_noUIThread_computation
to false
.
Merge control workflows
A new clean up has been added that merges conditions of if/else if/else that have the same blocks when it is possible.
The code in the blocks should be the same. An else block may be different and won’t be merged. One condition may be made opposite to allow the merge. The conditions are merged with ||
to keep the control workflow the same. Parenthesis is added to avoid priority issue. Most of the brackets, formatting and comments are kept.
To select the clean up, invoke Source > Clean Up…, use a custom profile, and on the Configure… dialog select Merge conditions of if/else if/else that have the same blocks on the Unnecessary Code tab.
For the given code:
You get this after the clean up:
Local variable type inference
A new clean up has been added that makes use of the var
keyword for the local variable when it is possible and is enabled only for Java 10 and higher.
The clean up replaces the explicit variable type by var
when this type can be known by the variable initialization. It also replaces the diamond operator in instance creation by a parameterized type. Eventually, it adds a suffix to initialization number literal to match the variable type. In any case, the variable type is still exactly the same.
To select the clean up, invoke Source > Clean Up…, use a custom profile, and on the Configure… dialog select Use the local variable type inference on the Code Style tab.
For the given code:
You get this after the clean up:
Prefer lazy logical operators
A new clean up has been added that replaces eager logical operators by lazy operators when it is possible.
The clean up respectively replaces |
and & by ||
and &&
when the following operands can’t make side effect. Any assignments, increments, decrements, object creations or method call may cause side effect. So, in such case, it will keep the eager operator. It also leaves the binary operations as it is.
To select the clean up, invoke Source > Clean Up…, use a custom profile, and on the Configure… dialog select Use the lazy logical operator on the Code Style tab.
For the given code:
You get this after the clean up:
Debug
Synthetic variables inspection
The JDT debugger is now capable of inspecting synthetic variables which are generated by the Java compilers. One such example is debugging the following method ` java.util.stream.ReferencePipeline.filter(Predicate<? super P_OUT>)` and inspecting the predicate variable.
Before:
Now:
And more…
You can find more noteworthy updates in on this page.