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.
I'm getting following NPE upon each reformat code usage, when HTML indentation engine is selected for java file type: java.lang.NullPointerException at org.netbeans.modules.editor.structure.formatting.TagBasedFormatter.reformat(TagBasedFormatter.java:66) at org.netbeans.editor.ext.ExtFormatter.reformat(ExtFormatter.java:274) at org.netbeans.editor.ActionFactory$FormatAction.actionPerformed(ActionFactory.java:1030) ... (whole stack trace attached) Steps to reproduce: ------------------- 1) Open a j2se project and a java file from it 2) Invoke Tools|options|Advanced options|Editing|Editor Settings|JavaEditor 3) Choose HTML indent. en. as Indentation engine 4) Close OD 5) Right-click inside source and invoke "reformat code" ---------- Product Version = NetBeans 5.5 Dev (Build 200606230200) Operating System = SunOS version 5.10 running on sparc Java; VM; Vendor; Home = Java HotSpot(TM) Client VM 1.6.0-rc-b88 System Locale; Encoding = en (nb); ISO646-US
Created attachment 31335 [details] NPE stack trace
Reassigning to xml for evaluation.
Easy fix, Tomasz is the owner now... BTW, it would be nice to have the IEs parametrized so noone would be able to use HTML IE for java...
Fixed. Logging a warning for using incompatible indentation engine instead of throwing exception.
Verified. Please attach CVS commit trace next time, thx. ------- Product Version = NetBeans 5.5 Dev (Build 200606280200) Operating System = SunOS version 5.10 running on sparc Java; VM; Vendor; Home = 1.6.0-rc; Java HotSpot(TM) Client VM 1.6.0-rc-b89; Sun Microsystems Inc.; /usr/jdk1.6.0/jre System Locale; Encoding = en (nb); ISO646-US
*** Issue 79067 has been marked as a duplicate of this issue. ***