Over a million developers have joined DZone.

Five Cool Features of Eclipse 3.5

· Java Zone

Check out this 8-step guide to see how you can increase your productivity by skipping slow application redeploys and by implementing application profiling, as you code! Brought to you in partnership with ZeroTurnaround.

(1) Block selection mode: works for cut, copy, and paste.



(2) Go to the implementation of an interface method.


(3) Better completion of inner interface implementations: When completing an interface such as Runnable, stubs for the methods are created immediately (instead of on demand, via a quick fix, as a second step).

   public static void main(String[] args) {
        new Runnable() {
           
            public void run() {
                // TODO Auto-generated method stub
               
            }
        };
    }

(4) “Invert if” quick fix (when the cursor is on the “if” keyword). Turns
   public static void main(String[] args) {
       if (args.length == 0) {
           System.out.println("Need at least one argument.");
       } else {
           processArguments(args);
       }
   }

into

   if (args.length != 0) {
       processArguments(args);
   } else {
       System.out.println("Need at least one argument.");
   }

(5) Improved systrace for inner classes. Completing the word “systrace” inserts a system.out.println() with the name of the current method (if you do println debugging, you’ll always find where the printing happens). Prior to 3.5, this did not work well for inner classes. This has been fixed:

   public static void main(String[] args) {
       new Runnable() {
           public void run() {
               System.out
                       .println("SidebarPanel.main(...).new Runnable() {...}.run()");
           }
       };
   }


[Source of (2) and (4): Philip Mayer]

From http://2ality.blogspot.com

The Java Zone is brought to you in partnership with ZeroTurnaround. Check out this 8-step guide to see how you can increase your productivity by skipping slow application redeploys and by implementing application profiling, as you code!

Topics:

Opinions expressed by DZone contributors are their own.

The best of DZone straight to your inbox.

SEE AN EXAMPLE
Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.
Subscribe

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}