
(2) Go to the implementation of an interface method (control-click/command-click).

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) {into
if (args.length == 0) {
System.out.println("Need at least one argument.");
} else {
processArguments(args);
}
}
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]
ليست هناك تعليقات:
إرسال تعليق