This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
There is an code position error after method refactoring in java class. The problem appears as it showed in follows examples: public class Test { public void method1() { System.out.println("method1"); } // end of <public void method1()> public void method2() { System.out.println("method2"); } // end of <public void method2()> public void method3() { System.out.println("method3"); } // end of <public void method3()> } // end of <public class Test> If I try to refactor method method2() to method22() the body of new method22() is pasted in wrong manner: public class Test { public void method1() { System.out.println("method1"); } // end of <public void method1()> public void method22() { System.out.println("method2"); } // end of <public void method22()> public void method3() { System.out.println("method3"); } // end of <public void method3()> } // end of <public class Test> The problem is that there is two empty lines before method22() and no empty lines after this method. That's all. I'll be glad if this report help you to improve this beautiful and comprehensive IDE.
reproducible Product Version: NetBeans IDE Dev (Build 200904090200) Java: 1.6.0_13; Java HotSpot(TM) Client VM 11.3-b02 System: Linux version 2.6.24-23-generic running on i386; UTF-8; en_US (nb)
*** Issue 162555 has been marked as a duplicate of this issue. ***
A java generator issue. Simplified steps of the rename refactoring look as follows: TreeMaker make = ...; MethodTree tree = ...; Tree nju = make.setLabel(tree, newName); workingCopy.rewrite(oldTree, newTree); Reassigning
Workaround: Use reformat after rename.
Reassigning all moonko's java/source bugs to myself.
It works fine in Product Version: NetBeans IDE 7.2 (Build 201207171143) Java: 1.7.0_07; Java HotSpot(TM) Client VM 23.3-b01 System: Linux version 3.2.0-32-generic running on i386; UTF-8; en_US (nb)