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.
Identation is lost for comments when you insert a member as follows MethodTree m = make.Method(.... ); //Insert the class before constructor ClassTree modifiedClazz = make.insertClassMember(clazz, clazz.getMembers ().indexOf(ctor), m); workingCopy.rewrite(clazz, modifiedClazz);
Created attachment 37898 [details] Test module to reproduce the bug
Install the attached module, and follow these steps 1) Open the file TestClass.java which is part of the project 2) Select Refactor|Insert Member in the menu You will notice that the comment preceding the constructor moves to the left Before insert: String s; //Insert the members above this comment After insert: String s; public void foo() { } //Insert the members above this comment
This should work correctly now. Please, verify, thanks.
Hopefully fixed.