Java Blog

Eclipse Project 4.5 (Mars) M4

Je länger ich Eclipse benutze, desto seltener beschäftige ich mich mit Release-Dates oder den Features — es sei denn, ich warte auf die Unterstützung von neuen Sprache-Features.

So gingen auch die bisherigen Milestones von 4.5 an mir spurlos vorbei, auch der letzte Milestone M4 vom 12.12. Zusammenfassend Neuerungen, die (für mich) interessanter sind:

Assigning stdin to a file
Stdin can now be assigned to a file in the „Common“ tab of launch configuration dialogs.

Automatic scroll lock in Console view
Scrolling up in the Console view using keys, mouse wheel, or scroll bar now automatically enables the Scroll Lock mode.

When you scroll down to the end of the console, the scroll lock is automatically released again.

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 null pointer 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 null check at (3), because analysis didn’t see that the assignment directly above could indeed assign a non-null value.

In example method „test3“ it was reported that „o can only be null“ at (3), because the information from the two null-assignments wrongly overruled the one assignment from non-null. With improved analysis this is now softened to saying „o may be null“.

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.

‚Terminate/Disconnect All‘ in Console view
You can invoke the Terminate/Disconnect All action from the Console view’s context menu:

Add inferred lambda parameter types
You can explicitly add the inferred types of the parameters in a lambda expression by invoking the Quick Assist (Ctrl+1) – Add inferred lambda parameter types:

Convert method reference to lambda and back
New Quick Assists (Ctrl+1) have been added to convert…

Compiler schneller.

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.

Der gibt uns noch einen Milestone vor, dann beginnt die Feinarbeit: