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.

Bug 118021 - [60cat] XSLT and XSD indentation & formatting do not work
Summary: [60cat] XSLT and XSD indentation & formatting do not work
Status: VERIFIED FIXED
Alias: None
Product: xml
Classification: Unclassified
Component: Code (show other bugs)
Version: 6.x
Hardware: PC Linux
: P3 blocker (vote)
Assignee: Samaresh Panda
URL:
Keywords:
Depends on: 126040
Blocks:
  Show dependency tree
 
Reported: 2007-10-06 23:45 UTC by stroudcuster
Modified: 2008-02-26 18:06 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
XSLT source (663 bytes, text/xml)
2007-10-06 23:46 UTC, stroudcuster
Details
XSD source (806 bytes, text/xml)
2007-10-06 23:47 UTC, stroudcuster
Details
XSLT editor screen shot (48.64 KB, image/jpeg)
2007-10-06 23:47 UTC, stroudcuster
Details
XSD screen shot (70.39 KB, application/octet-stream)
2007-10-06 23:48 UTC, stroudcuster
Details

Note You need to log in before you can comment on or make changes to this bug.
Description stroudcuster 2007-10-06 23:45:22 UTC
[ 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
Comment 1 stroudcuster 2007-10-06 23:46:24 UTC
Created attachment 50318 [details]
XSLT source
Comment 2 stroudcuster 2007-10-06 23:47:00 UTC
Created attachment 50319 [details]
XSD source
Comment 3 stroudcuster 2007-10-06 23:47:45 UTC
Created attachment 50320 [details]
XSLT editor screen shot
Comment 4 stroudcuster 2007-10-06 23:48:21 UTC
Created attachment 50321 [details]
XSD screen shot
Comment 5 stroudcuster 2007-10-08 14:22:46 UTC
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.

Comment 6 Samaresh Panda 2007-10-09 19:28:55 UTC
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.
Comment 7 tonybeckham 2007-10-09 21:28:16 UTC
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. 
Comment 8 Samaresh Panda 2007-10-11 19:43:10 UTC
Since this is working but fails in certain cases, I'm downgrading to a P3.
Comment 9 Samaresh Panda 2008-02-20 05:27:26 UTC
Fix integrated: http://hg.netbeans.org/main?cmd=changeset;node=cdad61b5b4a8.
XMLLexerFormatter replaces the old formatter.
Comment 10 tonybeckham 2008-02-26 18:06:29 UTC
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)