Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 43550 Details for
Bug 115716
XML formatter produces wrong output, and hang up on huge files
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
org.eclipse.wst.xml.core.patch
org.eclipse.wst.xml.core.patch (text/plain), 2.69 KB, created by
Amy Wu
on 2006-06-05 18:57:14 EDT
(
hide
)
Description:
org.eclipse.wst.xml.core.patch
Filename:
MIME Type:
Creator:
Amy Wu
Created:
2006-06-05 18:57:14 EDT
Size:
2.69 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.wst.xml.core >Index: src/org/eclipse/wst/xml/core/internal/provisional/format/NodeFormatter.java >=================================================================== >RCS file: /cvsroot/webtools/wst/components/xml/plugins/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/provisional/format/NodeFormatter.java,v >retrieving revision 1.10 >diff -u -r1.10 NodeFormatter.java >--- src/org/eclipse/wst/xml/core/internal/provisional/format/NodeFormatter.java 27 Mar 2006 01:52:23 -0000 1.10 >+++ src/org/eclipse/wst/xml/core/internal/provisional/format/NodeFormatter.java 5 Jun 2006 22:49:17 -0000 >@@ -161,7 +161,8 @@ > > protected void formatIndentationAfterNode(IDOMNode node, IStructuredFormatContraints formatContraints) { > // [111674] If inside xml:space="preserve" element, we bail >- if (formatContraints.getInPreserveSpaceElement()) return; >+ if (formatContraints.getInPreserveSpaceElement()) >+ return; > if (node != null) { > IDOMNode nextSibling = (IDOMNode) node.getNextSibling(); > IStructuredDocument doc = node.getModel().getStructuredDocument(); >@@ -169,13 +170,15 @@ > String lineDelimiter = doc.getLineDelimiter(); > try { > lineDelimiter = doc.getLineDelimiter(line); >- if (lineDelimiter == null) >- lineDelimiter = ""; //$NON-NLS-1$ > } > catch (BadLocationException e) { > // log for now, unless we find reason not to > Logger.log(Logger.INFO, e.getMessage()); > } >+ // BUG115716: if cannot get line delimiter from current line, just >+ // use default line delimiter >+ if (lineDelimiter == null) >+ lineDelimiter = doc.getLineDelimiter(); > > if (node.getParentNode() != null) { > if (node.getParentNode().getNodeType() == Node.DOCUMENT_NODE) >@@ -243,7 +246,8 @@ > > protected void formatIndentationBeforeNode(IDOMNode node, IStructuredFormatContraints formatContraints) { > // [111674] If inside xml:space="preserve" element, we bail >- if (formatContraints.getInPreserveSpaceElement()) return; >+ if (formatContraints.getInPreserveSpaceElement()) >+ return; > if (node != null) { > IDOMNode previousSibling = (IDOMNode) node.getPreviousSibling(); > IStructuredDocument doc = node.getModel().getStructuredDocument(); >@@ -328,7 +332,8 @@ > */ > protected void formatTrailingText(IDOMNode node, IStructuredFormatContraints formatContraints) { > // [111674] If inside xml:space="preserve" element, we bail >- if (formatContraints.getInPreserveSpaceElement()) return; >+ if (formatContraints.getInPreserveSpaceElement()) >+ return; > > String lineDelimiter = node.getModel().getStructuredDocument().getLineDelimiter(); > String lineIndent = formatContraints.getCurrentIndent();
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 115716
:
29650
|
43550
|
43569
|
43570