Mars New and Noteworthy
Here are some of the noteworthy features in Eclipse Mars.
Eclipse Mars includes numerous bug fixes and improvements in the Java 8 support, along with a lot of other useful features.
Add and Remove Parentheses Quick Assist
Use this Quick Assist (Ctrl+1) to add or remove optional parentheses around lambda parameters.
Add Inferred Types Quick Assist
This Quick Assist (Ctrl+1) will make inferred types of the parameters explicit in a lambda expression.
Convert From Method Reference to Lambda expression Quick Assist
This Quick Assist (Ctrl+1) converts a method reference to a lambda expression.
In cases where it is possible, it can be used to convert a lambda expression into a method reference.
New Java editor templates
New templates (try_finally, finally, lock) have been added to insert commonly occurring patters in concurrent programming:
Recommendations Engine Enabled by Default
The recommendations engine, which provides content assistance based on common usage patterns is now turned on by default, and features new subtype aware constructor and types completion.
The code recommendations engine bases content assist recommendations on common API usage patterns expressed in other code bases.
The Constructor Completion engine provides you with recommendations for constructors that you are likely to use to instantiate objects of a particular type.
The Override Completion engine provides you with recommendations which methods you are most likely to override when triggering code completion in the body of class.
More precise flow analysis
Flow analysis, as performed by the compiler to warn the user about
potential programming problems, has been made smarter. Some examples are:
Leverage knowledge that auto-boxing always produces a non-
Leverage knowledge that certain compiler-generated methods—like
values() on enum types—provide non-
Various improvements in resource leak analysis.
Improved flow analysis for loops
Flow analysis has been improved to more precisely capture the flow of
null values in loops. This mainly achieves a reduction of false
positive reports from null analysis.
Previously, example method "test1" would raise a potential
warning at point (3). To correct this issue the merging of information
leading towards point (3) has been improved to correctly see that the
null value from point (1) can never reach point (3).
In example method "test2" JDT previously reported a redundant
at (3), because analysis didn’t see that the assignment directly above
could indeed assign a non-
In example method "test3" it was reported that "o can only be
(3), because the information from the two
overruled the one assignment from non-
null. With improved analysis
this is now softened to saying "o may be
The graph on the right hand side illustrates the new composition of flow information: for each relevant point (3) inside a loop, the analysis first merges the flows that lead into (1). This result is concatenated with the partial flow (b.c), which leads from the loop start to point (3). Improved precision has thus been achieved within the design limits of a single AST traversal in order to minimize impact on compiler performance.
Show skipped tests only in JUnit view
The JUnit view now has a filter to show only the skipped (ignored or assumption failed) tests:
Re-run parameterized JUnit tests
The JUnit view now allows you to re-run groups of parameterized tests, or actually any kind of tests that are run by a specialized runner and add another level of grouping in the JUnit view.
Shortcut for Skip All Breakpoints
A key binding (Ctrl+Alt+B) has been added as the shortcut for Skip All Breakpoints.
Add Watchpoint for final variables
You can now add a watchpoint for non-constant final variables:
|This cannot be implemented for final variables with compile-time constant values because Java compiles the constant value into class files and leaves no trace of a field access at points where the final field is read.|
Assigning stdin to a file
Stdin can now be assigned to a file in the Common tab of launch configuration dialogs.
Word wrap in the Console
A new formatting option has been contributed to the Console view for all I/O consoles: Word Wrap.
The new option is available on the Console view toolbar and in the content popup menu within the Console view.
Improved compiler performance
Significant performance improvements have been made to the Java compiler on generics-heavy code.
Unused exception parameters
A new compiler option to report unused exception parameters in try-catch statements has been added. The option is set to Ignore by default.
Annotation-based null analysis can now leverage externally defined annotations that are attached to a library.
Previously, annotation-based null analysis was significantly limited
by the fact that many 3rd party libraries have no
in their API. This implied that any errors caused at this interface
could not be detected by the analysis, and even worse, implementors
of library-defined interfaces could not use any intended contracts,
null annotations in overriding methods were flagged as
incompatible with the super version.
JDT now supports the concept of "external annotations". A user can
null annotations in separate files and attach these to a
given library. The compiler will take external
null annotations into
consideration for its null analysis.
External annotations can be provided as a directory tree of individual text files or as a zip file. External annotations can be attached to a JRE (per workspace) and to arbitrary libraries (per project).
A new command Annotate is provided when browsing attached source code of a library using the class file editor. Two pre-requisites must be met for using this command:
The project is configured to use annotation-based null analysis.
An existing workspace folder has been specified as the external annotation location for a given library.
Users may select any type in the signature of a library method or
field, and invoke Annotate: either using the context menu, or by
pressing Ctrl+1. Proposals will be offered for marking the selected
@Nullable. All method parameters, return types
and field types can be annotated. Additionally when Java 8 is
used, details like type arguments and type bounds etc. can be
After selecting a proposal, the compiler will immediately leverage the new annotation for its null analysis.
Java 9 Beta
Java™ 9 support has not yet landed in our standard download packages. But you can add an early access preview to your existing Eclipse Mars install.
The Eclipse Java™ 9 Support (BETA) contains the following:
ability to add JRE and JDK 9 as installed JRE
support for JavaSE-1.9 execution environment
ability to create Java and Plug-in projects that use a JRE or JDK 9
|At the moment Eclipse must be run with Java™ 9 if you want to use Java™ 9 in your workspace. You can download from from http://www.oracle.com/technetwork/articles/java/ea-jsp-142245.html.|
This is an implementation of an early-draft specification developed under the Java Community Process (JCP) and is made available for testing and evaluation purposes only. The code is not compatible with any specification of the JCP.
Install the Java 9 Beta via the Eclipse Marketplace:
Java EE support is provided by the Eclipse IDE for Java EE Developers.
Async support option in the New Servlet and Filter wizards
Selecting this option will generate an annotation with the asyncSupport option enabled.
EJB 3.x Support
An asynch support option has been added to the session bean wizard. A non-persistent support option has been added to the timer callback wizard
Apache Tomcat 8 support
In anticipation of Apache Tomcat 8.0 stable releases becoming available in the near future, support has been added to create Apache Tomcat 8.0 runtimes and servers. In addition, support for the Serve modules without publishing feature is available for this version, but requires Apache Tomcat 8.0.5 or later to work correctly.
Generate Web Services targeting Tomcat 8
Support for generating Web services targeting the Tomcat 8 Server.
Validation Filters for HTML Attributes
HTML validation can now be configured to ignore specific attributes or attribute patterns. This can be useful for attributes that are used throughout a document but are not defined by the specification. A comma-separated list of attribute patterns can be configured at the workspace level on the Web > HTML Files > Validation preference page.
In addition, quick fixes have been added that will make it easy to add attribute patterns to this list.
Import Declarations for Unresolved Java Types in JSP Editor
The JSP editor can now add import declarations for unresolved types in scriptlet regions. Select the unresolved type in the editor and choose Add Import (Ctrl+Shift+M/Cmd+Shift+M) from the Source menu.
Pick Colors from Preview in CSS Editor
When hovering over a color value in the CSS editor, a preview of the color is presented. The Edit Property Color toolbar action will open the system color dialog to edit this color.
C/C++ support is provided by the Eclipse IDE for C/C++ Developers.
C/C++ Stand-alone Debugger as separate package
The C/C++ Stand-alone Debugger is now available in the form of a separate, lightweight download in addition to being also part of the complete Eclipse IDE for C/C++ Developers package. Once extracted, it can be started by launching the cdtdebug executable. This new package can be obtained from the CDT downloads page.
Use the Run As > C/C++ Container Application or Debug As > C/C++ Container Application menu items to launch your C/C++ application in a Docker container.
Options for Format with Empty Selection
The Format command (Ctrl+Shift+F) in C/C++ editor can now be configured to format either the whole file or the current statement when no code is selected.
Specify any C/C++ program on the file system in a Run configuration and CDT will execute it.
Import Existing Autotools Project
An import wizard has been added for importing an existing Autotools project into a C/C++ Autotools project.
Exited Processes Shown in the Debug View
The Debug view now keeps displaying exited processes, and displays the exit code.
Menu to add Expression Group
With Mars, C/C++ Developers can create an Expression Group for all registers or one for all variables.
The parser now supports alignment specifiers (alignas in C++ and _Alignas in C):
Arduino C++ Support
The Arduino C++ support that will use the toolchains and SDKs and libraries from the standard Arduino IDE and let developers create C+\+ projects that use them.
Add persistent information storage
The Multicore Visualizer was enhanced to permit easy persistence of information. The information is saved in the workspace, and can be global for any instance of the view or saved per view.
PHP is provided by the Eclipse for PHP Developers package, or can be added to your Eclipse installation via the Eclipse Marketplace:
Added support for phpdoc
Improved Task-focused UI Support
The Task-focused UI (Mylyn) is able to track interest in methods and functions:
This integration is enabled by default in Eclipse for PHP Developers package.
PHP Model in Project Explorer
The Project Explorer view now provides a drill-down into the structure of the PHP source code:
PHP Editor Improvements
Syntax coloring for visibility keywords:
PHP Debugging Improvements
Highlighting for changed variables/objects:
Improved look & feel while debugging:
The Preference Recorder enables the user to define preferences that they want to have propagated to all of the the workspaces on their machine.
Preferences are recorded as they are set; every time a workspace is opened, the recorded preferences are checked and updated where necessary.
You can enable/disable the Preference Recorder via the Oomph > Preference Recorder preference page.
Automatic Updates by Default
With Eclipse Mars, the automatic updates option is turned on by default. With this, Eclipse will periodically check with our servers to see if there are any updates available and give users the option to download and install them.
By default, Eclipse will automatically look for updates every week. This configuration can be changed on the Install/Update > Automatic Updates page in the preferences dialog.
Improved Performance for updates
Changes in the compression strategy used for software repositories has greatly improved the performance and footprint of updates.
Improvements in the Dark Theme
Significant work went into improving the fidelity of the the Dark Theme; these improvements drove improved support for general styling via CSS, and new icons that render much better against the dark background (and other colours).
Nested/Hierarchical view of projects
The Project Explorer now provides the ability to view the projects in a hierarchical (a.k.a. nested) form. For modular projects, this allows to have your project mapping more closely the organization of your modules as they are on the file system. This hierarchical view of projects often makes easier to navigate modular projects.
Hierarchical view of projects can be triggered from the Project Explorer view menu, under the Projects Presentation item.
Then it makes the folders that are at the same location as a project replaced by the project, and the projects that are nested under other projects will not be shown as root elements.
The Perspective customization dialog, which dropped out of the 4.x stream, is back, and a nested/hierarchical view of projects is now supported by the Project Explorer.
The Launch Bar provides convenient fine grained control over launch configurations. It is a tool bar control that has drop-down selectors for the active Launch Mode, Launch Descriptor, and Launch Target and buttons to build, launch, or stop the launch configuration.
The Launch Bar is included the Eclipse IDE for C/C++ Developers package, and can be added to other packages (e.g. to control Java, PHP, and other launch configurations).
You an activate or deactivate the Launch Bar via the Run/Debug > Launching > Launch Bar page in the preferences dialog.
Text search speedup
Text search has been sped up by a factor 3x-4x for full workspace searches on multi-core machines.
Print button hidden by default
The Print button on the main toolbar is now hidden by default. The button can be added back to the toolbar via the Customize Perspective dialog. To open this dialog, right-click on the current perspective button and select the Customize… menu item.
In the Tool Bar Visibility tab, expand File, select Print, and click OK.
Automatic Error Reporter
The Error Reporter sends information about errors that occur in the workbench to the Eclipse Foundation. This information is relayed to the appropriate Eclipse project development team.
Users don’t need to create an account, or provide any identifying information. Potentially personal information is obfuscated by default. Use the Install/Update > Automatic Updates preferences page to tune the update behaviour.
UI responsiveness monitoring
You can enable automatic detection of periods when the Eclipse user interface is unresponsive:
UI freezes longer than the warning threshold are logged to the Eclipse error log as warnings. The logged messages include one or more stack traces of the display thread. Longer UI freezes are logged as errors and include stack traces of all threads. Please keep in mind that capturing stack traces of all threads involves extra overhead, so setting the error threshold below 1 second is not recommended.
A UI freeze is logged at the end of the freeze or after the deadlock threshold has expired, whichever comes first. The latter condition facilitates logging of indefinite UI freezes caused by deadlocks.
Paired with the Error Reporter, the UI Responsiveness Monitor this helps Eclipse open source software developers identify and ultimately fix performance issues and improve the overall user experience.
You can configure the UI Responsiveness Monitor via the General > UI Responsiveness page in the preferences dialog.
Default max heap size increased to 1024 MB
To improve the "out of the box" user experience on today’s modern hardware, the default maximum heap size (-Xmx VM argument) has been increased from 512M to 1024M. And the initial heap size (-Xms) has been increased from 40M to 256M.
For Linux users, GTK3 support is much improved.
Mac OS X distribution now an Application Bundle
Eclipse packages for OS X are now distributed in a more standard "Mac App" format, instead of the "directory format" we have used in the past.
|Current Mac users cannot update to Mars from a previous version; doing so will break the installation! Mac users must start with a fresh download.|
In the event that you updated before reading this, and have ended up with a broken installation, see Issues related to Mac App installations for the steps to recover your installation, after getting a fresh download.
The Git integration tools support git-flow to automate git branching workflow.
Git Project Import Wizard
Import projects into the workspace directly from Git or Gerrit.
Git Configuration Java Variable
Use git-config values in your Java templates.
Tools for importing existing Gradle build scripts as Eclipse projects; and building, maintaining, and running Gradle builds can be easily added to any of the Eclipse Mars packages.
Install Gradle Tools from the Eclipse Marketplace:
Improved Maven support, including support for Maven 3.3.3, improved pom editor support, and support for auto-update and auto build.
Gerrit Connector Improvements
The Gerrit connector has improved handling for links to individual files on a review. When a link is clicked, the corresponding patch set will be expanded in the review editor and the patch set contents will be downloaded. If the patch set has already been downloaded, the compare editor will open.
Gerrit 2.10 and 2.11 are now supported. Support for versions earlier than 2.9 has been removed.
Hide Succeeding Hudson/Jenkins Build Plans
The builds view allows you to hide suceeding build plans so you can focus on failures.
Mars includes new tools for Docker that let the user manage and control their Docker images and containers.
Install Cordova Tools via the Eclipse Marketplace:
For the Mars release, we are introducing a new Eclipse installer. This is a new more efficient way to install Eclipse. It is a proper installer, so no more zip files, with a self extracting download that will lead you through the installation experience. For those not into installers, we still have the packages and zip files available on our [download] pages.
Please see 6 Steps to Install Eclipse.
The installer’s advanced mode is where the real power lies. With advanced mode, a user can realize a complete development environment including all the Eclipse plug-ins they need, and a fully provisioned workspace that includes source code from Git repositories, tasks from issue trackers, and a target environment for builds. With this, a developer can provision a complete development environment and be ready to start compiling, running, and testing in just a few minutes.
The current implementation supports the creation of environments that get developers started to work on building contributions for Eclipse open source projects, as well as a handful of other open source projects. Tools are provided by the Oomph project to assist with the creation of configurations for other environments.
Remote Services Tooling Perspective
Remote Services Tooling supports development, debugging, and deployment of ECF Remote Services. The new Remote Service perspective shows the new Endpoint Discovery view dynamically updates to display Endpoints that have been discovered via network discovery (i.e. using ECF-supported network protocols like zeroconf, slp, zookeeper, dnssd, etcd, or custom).
Discovered Endpoints can be Imported into Eclipse, locally registering a proxy for the remote service that allows application code to actually use the remote service (i.e. call its methods).
GEF4 is the next generation API of the Graphical Editing Framework (GEF). The GEF project team has been working hard on it for 5 years now (in parallel to maintaining the current production components Draw2d 3.x, GEF (MVC) 3.x, and Zest 1.x), and with Mars has released a first snapshot (with still provisional API), together with a minor release of the currently available production components.