New and Noteworthy 3.5 M3


JDT


Optionally use blocks when generate hashCode() and equals() The Generate hashCode() and equals() wizard now allows to choose whether blocks are used for if statements:

Generate hashCode() and equals() wizard


Paste patch into Package Explorer What's the quickest way to apply a patch from Bugzilla? Just open the attachment, copy the patch to the clipboard and paste it into the Package Explorer.

Clean Up extension point There's now an extension point that allows to contribute your own clean ups and Java editor save actions. For more details read the extension point documentation.

Classpath resolution honors the 'Class-Path' header of JAR manifest file The 'Class-Path' header of a JAR manifest is now honored in the Java model. JARs defined by 'Class-Path' are now automatically added to the build path.

For example, 'nested.jar' is a referenced library although it was not explicitly specified in the project build path but through the manifest of 'lib.jar':

Class-Path Clause Example


Build path supports ".." The path of a library, variable or container entry can now be anywhere relative to the project, e.g. if the library is on a sibling directory, its path can be specified using the ".." as follows:

Parent Relative Path Example


Build path resolution tolerates duplicate entries Duplicate entries in the build path are now tolerated if the redundant entry is found while resolving the build path and not at the raw level.

For example, two user libraries used in the project build path refer to the same JAR file are tolerated:

Classpath Duplicate Entries Example

However, there would be an error reported if the same JAR file was directly specified twice:

Classpath Invalid Duplicate Entries Example


Compiler problem for missing hashCode() method The compiler can now detect whether a class overrides the equals() method without overriding the hashCode() method:

Problem hover with quick fix for missing hashCode method

You can either use the quick fix to override the hashCode() method or the quick fix to regenerate both methods.

This problem is not reported by default. You can enable it on Preferences > Java > Compiler > Errors/Warnings in the Potential programming problems section