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.
When using the "New Wizard - Class" dialog the methods that are part of generated classes do not follow the users preferences for indentation (e.g. using 2 spaces verses 4) the generated code uses constent 4 space indentation for all methods. You can fix the code by running "Reformat Code", but this behavior is a bug -- I think. Below is an example where my setting was for 2 space indentation: /* * Junk.java * * Created on January 8, 2002, 8:39 PM */ package thinking.c04; /** * * @author timothy */ public class Junk { private int field0; private int field1; private int field2; /** Creates a new instance of Junk */ public Junk() { } void method0() { } void method1() { } void method2() { } void method3() { } }
Editor maintainers - do you know about this ? We're funneling the generated code through the Indentation engine :-)
I filed issue 9955 ages ago. They sound the same to me.
We tried not to indent everything which is literally copied from the template, only the places where the macro expansion may change the code layout. But the unformatted constructor code (and particularly the closing curly brace) confuses the indentation engine. If we pass all the stuff through the Indent Engine, custom formatting, which may be present in the template will be lost.
Rochelle, thanks for reminding me of that other issue.
It's OK now (IMHO)
*** Issue 19175 has been marked as a duplicate of this issue. ***
The CVS trunk, as of 11 Jan 02 still has this problem...am I missing something
Yes, you are missing the patch from 3.3 branch :-) Sorry - it's merged now.
Yes, it works fine now...Thanks
VERIFIED
Resolved for 3.4.x or earlier, no new info since then -> closing.