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.
[ BUILD # : 200710060000 ] [ JDK VERSION : 1.6.0_03 ] When entering XSLT style sheets and XML schemas, hitting Enter at the end of a line returns the cursor to the beginning of the new line. If the inserted source lines are entered starting at the first position, using the Format function does not re-position them See attached source and screen shots
Created attachment 50318 [details] XSLT source
Created attachment 50319 [details] XSD source
Created attachment 50320 [details] XSLT editor screen shot
Created attachment 50321 [details] XSD screen shot
I found that this also occurs with plain xml files. I have attached a log attachment. Note the last two messages in the log. This one occurs upon the initial open of an xml file in the editor: INFO [org.netbeans.modules.editor.settings.storage.SettingsProvider]: Won't provide any settings for text/base It's been deprecated, use MimePath.EMPTY instead. This one occurred after pressing enter at the end of a line: WARNING: Class org.netbeans.modules.xml.text.indent.XMLFormatter is deprecated, use *IndentTask I have found this problem to be intermittent, but it occurs frequently enough to be quite annoying.
I do see the two messages in the console, however the indentation does work for me with both xsl and xsd files you provided. Tony, can you please try the same on Linux and let us know.
Product Version: NetBeans IDE Dev (Build 200710090000) Java: 1.5.0_11; Java HotSpot(TM) Client VM 1.5.0_11-b03 System: Linux version 2.6.20-16-generic running on i386; UTF-8; en_US (nb) WARNING: Class org.netbeans.modules.xml.text.indent.XMLFormatter is deprecated, use *IndentTask INFO [org.netbeans.modules.editor.settings.storage.SettingsProvider]: Won't provide any settings for text/base It's been deprecated, use MimePath.EMPTY instead. I can get these messages (they are only in the log) if I open the XSLT and Schemas attached to this issue. If I just open them in the IDE then Formatting does not work, but if I put them into a project (outside of the ide, place newStylesheet.xsl in an existing project) then open from the projects or FIles view in the ide then formatting works.
Since this is working but fails in certain cases, I'm downgrading to a P3.
Fix integrated: http://hg.netbeans.org/main?cmd=changeset;node=cdad61b5b4a8. XMLLexerFormatter replaces the old formatter.
Fix Verified Indentation/formatting works on new as well as attached files. Product Version: NetBeans IDE Dev (Build 200802251204) Java: 1.5.0_13; Java HotSpot(TM) Client VM 1.5.0_13-119 System: Mac OS X version 10.5.2 running on i386; MacRoman; en_US (nb)