Highlights from the latest Eclipse release (4.12)

Diffblue
2 min readSep 6, 2019

--

Source: Unsplash

The latest version of Eclipse (4.12, released in June) has a number of new features that might be useful for Java developers. The features most worth highlighting are related to the new switch statements and switch expressions, which are preview features, and improvements to the UI for modules, which make it easier to maintain your large projects.

Switch Expressions

Switch expressions are a preview feature added in Java 12. Eclipse now provides several quick fixes to automatically fix several common simple errors, such as a missing default case (see a full list here). Additionally, there are several new templates for inserting common code patterns using the new switch statements/expressions.

The new switch statements/expressions are a preview feature and need to be explicitly enabled. Preview features are a new concept that were introduced into the Java development process, and describe new Java features that are fully implemented and production-quality, but impermanent (i.e. they could be changed or removed, partially or fully, in a future Java version). The new switch statements/expressions are the first preview feature added to Java. Eclipse now also provides a way to enable preview features via its UI.

Modules

Modules were added in Java 9. In this release, Eclipse now has a new UI for configuring dependencies between modules, which is more intuitive to use and easier to navigate. At some point, the new Module Dependencies tab added in this release will become the primary tab for the options that are currently accessible via the ‘Is Modular’ node.

Though not a huge change, these updates look like they’ll be useful for Java developers who prefer Eclipse.

Resources

  1. https://www.eclipse.org/eclipse/news/4.12/jdt.php

2. https://www.vojtechruzicka.com/java-enhanced-switch/

3. https://help.eclipse.org/2019-06/index.jsp?topic=%2Forg.eclipse.jdt.doc.user%2Freference%2Fref-java-editor-quickfix.htm&resultof=%22quick%22%20%22fix%22%20

4. https://openjdk.java.net/jeps/12

--

--

Diffblue
Diffblue

Written by Diffblue

Diffblue Cover is an AI agent for automating the generation, maintenance and management of java unit tests in the IDE and CI Pipelines.

No responses yet