JDT Improvements, Top Eclipse Kepler Feature #6

JDT Improvements, Top Eclipse Kepler Feature #6

Since 2001, Eclipse has been setting the standard for Java Development Tools, and with Eclipse Kepler, the JDT team has shipped another top-quality release. As we get closer to Eclipse Kepler, I’m counting down the Top 10 Eclipse Kepler features that I’m looking forward to most. Number 6 on my list is the improvements to the Eclipse Java Developer Tools.

There are a number of new quick fixes, including the ability to easily convert If-Else statements to Switch statements:

Screen Shot 2013-06-12 at 8.01.26 PMThe JDT will also report unused type parameters and offer quick fixes to clean them up:

screenshot-unused

Screen Shot 2013-06-12 at 8.06.25 PM

And quick-fix to combine multiple strings:

Screen Shot 2013-06-12 at 8.15.40 PM

And there is a now a quick-fix to allow you to fast-fail (convert an expression to ! and return).

Screen Shot 2013-06-14 at 12.18.57 AM

Screen Shot 2013-06-12 at 8.35.27 PM

The JDT now provides a default logical structure for XML DOMs. These can be used in the variables view during debugging, showing XML attributes as simple arrays.

Screen Shot 2013-06-13 at 10.18.36 PM

While the JDT has had leak analysis for a while, unfortunately the use of common utilities (like Google Guava) could easily trip it up. Now, the JDT is smart enough to detect the usage of these common libraries and not complain when they are used properly.

myclose

Screen Shot 2013-06-12 at 8.31.17 PM

The annotation based null-based analysis (that was first introduced with Indigo) has now been extended to work with fields. If a field is marked @nullable, then almost all access to that field can be flagged as a potential null access. The compiler now recognizes  a narrow range of code patterns where a null-check of a field is directly followed by a dereference or an assignment to a @NonNull variable. For these particular situations, no problem will be reported.

Screen Shot 2013-06-13 at 10.41.10 PM

Finally, JUnit has received a few improvements especially how how it handles skipped tests. Skipped tests are decorated with a special icon and not marked as ‘passed’.

Screen Shot 2013-06-14 at 12.12.00 AM

While Eclipse is certainly a powerful platform, Eclipse-as-a-Java-IDE is one of the most important uses for the majority of Eclipse users. I’m happy to see that this great tool is still going strong after 12 years!.

For more Eclipse Tips & Tricks and the annual Top 10 list, follow me on twitter.

4 Comments
  • Gekkor McFadden
    Posted at 7:54 am, June 16, 2013

    I hope that Kepler is more stable than the current version of Eclipse. I can’t use Juno because of its instability.

  • Kinisoftware
    Posted at 1:26 pm, June 25, 2013

    I do not know how I feel about “if-!-return”. To be honest I like reading “positive” ifs than ifs written in a negative way. Doesn’t it look like more natural?

  • Konrad Garus
    Posted at 10:49 am, July 5, 2013

    Gekkor – it’s a lot more stable. I tried hard to use Juno and I had to downgrade to Indigo. Now I upgraded to Kepler and it’s very smooth!