Java Editor |
|
Open Implementation of selected Type |
The Open Implementation hyperlink and the Navigate > Open Implementation action now open the implementation of the selected interface or class also.
In the past, Open Implementation was only available for methods.
|
Automatically insert Braces at correct position |
The Java > Editor > Typing > Automatically insert at correct position > Braces preference option is now enabled by default.
This will automatically insert the braces where they are required.
|
Escape text when pasting into a string literal |
The Java > Editor > Typing > Escape text when pasting into a string literal preference option is now enabled by default.
This will escape the special characters in pasted strings when they are pasted into an existing string literal.
|
Quick Fix to move type annotations |
The rules for the placement of Java 8 "type annotations" introduced via JSR 308 are sometimes surprising.
In case of errors, a new Quick Fix Move type annotation is offered,
that moves the type annotation to a location that corresponds to what was probably intended.
|
Defaults for annotation type elements in Javadoc |
The default value of an annotation type element is now shown in the Javadoc view and hover.
|
Set colors for Javadoc |
You can use the new color preferences to set the foreground text color and the background color in the Javadoc view and hovers:
|
Consistent Javadoc colors usage under Linux |
The Javadoc color usage on Linux was inconsistent since GTK 3.04.
This has been resolved and support for Javadoc on the Eclipse Dark Theme has been added.
Before:
After:
Dark theme support:
|
Java Views and Dialogs |
|
Skip button in Organize Imports dialog |
While using the Organize Imports dialog to import multiple unresolved types, you can now skip a type without cancelling the whole operation by using the new Skip button.
No import statement is added for the skipped type.
|
Hide inherited members from java.lang.Object |
You can hide all inherited members from java.lang.Object
in the Quick Outline (Ctrl+O) by using the new filter from the drop-down menu (Ctrl+F10):
|
Hide deprecated fields and methods |
You can now hide the deprecated fields and methods in Outline view, Members view, Package Explorer view, Project Explorer view, and
Quick Outline by using the new filter from their drop-down menu (Ctrl+F10):
|
Group by Project in Search view |
The default grouping of Java search results in the Search view has been changed to Group by Project. Earlier the results were grouped by package.
|
Type name with extension in New Java Type creation wizards |
New Java Type creation wizards now accept the .java extension with the type name instead of showing the error message: "Type name must not be qualified".
For example, to create a new class com.test.C1<T>.java , you can directly paste this qualified type name with extension in the Name field of the New Java Class wizard.
|
HiDPI JDT icons |
Composite icons such as Java element icons with modifier overlays are now rendered in high resolution
in environments that support HiDPI images.
|
Java Compiler |
|
New Java index |
Eclipse 4.7 contains an experimental new Java index which is disabled by default. As a thumb rule, you can try the new indexing to get better performance when there are a large number of Jar dependencies. The new index has been adopted completely in the Type Hierarchy view and partially in some features that use the binary file caching (jars and .class files) such as Package Explorer expansion for jars. It hasn't been adopted by the search features. You can enable the new index from Preferences > Java:
|
Pass compiler options to annotation processors |
You can now pass compiler options to annotation processors using %variable% syntax in Project > Properties > Java Compiler > Annotation Processing.
|
Warnings for unlikely argument types |
Many developers have learned the hard way, that certain uses of Java collections that pass the compiler's
type check, may still contain "type errors", resulting in unexpected runtime behaviour.
A new analysis has been added to the Eclipse compiler for Java that will detect the most common bugs in this area.
The common reason behind this problem is the fact that not all methods of those collection types make use of generics in the way one might expect.
As a result it is possible to create a
Here is a code snippet that seems to add and remove the same element from the set, but at a closer look the In a simple world, this would be all there is to say, but over time people have developed various code patterns that rely on these overly general signatures. Consider the following use of subtyping:
Depending on your coding style this may or may not be accepted as a legitimate short hand for:
As with any heuristic, there is no clear line. This implies that the compiler may show "unwanted" warnings,
or filter out invocations that are in fact bugs. For the former case,
java.lang.Object.equals(Object) and
java.util.Objects.equals(Object,Object) .
|
Java Formatter |
|
New way to count comment width |
A new option has been added in the code formatter profile editor that makes the formatter
count a comment's width from its starting position instead of the beginning of the line.
You can change this option in the Java > Code Style > Formatter preferences in the Comments tab, under Line width. |
Debug |
|
Method result after step operations |
During debugging, the last method result (per return or throw) that was observed during Step Into, Step Over or Step Return, is shown as first line in the Variables view.
This can be disabled with the new option Preferences > Java > Debug > Show method result after a step operation (if supported by the VM; may be slow) |
Triggers for breakpoints |
You can now define a set of triggers for the breakpoints in a workspace.
All the other breakpoints that are initially suppressed by triggers will be hit only after any of the trigger points has been hit. All the triggers are disabled after a trigger point is hit and will be re-enabled after the run. |
Conditional watchpoint |
Like for line breakpoints, conditions can now also be added to Watchpoints,
where the old value of the field can be used as part of the condition.
|
Toggle Tracepoint |
A new action Run > Toggle Tracepoint has been added.
true , the condition is now considered to implicitly return false,
and the breakpoint will not suspend execution.
|
Show Logical Structure enabled by default |
In the Variables view, Show Logical Structure is now enabled by default.
E.g. collection objects now directly show their contained elements instead of their internal structure.
|
Remote Java Application "Socket Listen" type supports multiple incoming connections |
The Remote Java Application debug configuration's Standard
(Socket Listen) connection type now supports incoming connections
from multiple VMs. This is useful for debugging distributed
systems. The connection limit may be set to a fixed number, or
0 for unlimited connections.
|
New option to disable Hot Code Replace |
You can now disable Hot Code Replace (HCR) if it causes any trouble
or if you want to avoid code changes in a debug target. HCR is enabled by default but can be disabled
in Preferences > Java > Debug.
|
JUnit |
|
Show JUnit failure trace in Console view |
A new button has been added to the JUnit Failure Trace header to show the stack trace of a failed JUnit test in the Console view.
The Console view makes it convenient to view a long and wide stack trace, copy parts of the stack trace and navigate to the classes on the stack trace using hyperlinks.
|