diff options
author | david_williams | 2008-06-05 03:07:55 +0000 |
---|---|---|
committer | david_williams | 2008-06-05 03:07:55 +0000 |
commit | c169f73faa2e6117a4101c693ec48875000aad91 (patch) | |
tree | d18a8d5108505eecfd1c08827f244273e541138e /bundles/org.eclipse.wst.html.core | |
parent | 35b82ab18d5ac7d0c5c1c5903da73a6b3a57b9cb (diff) | |
download | webtools.sourceediting-c169f73faa2e6117a4101c693ec48875000aad91.tar.gz webtools.sourceediting-c169f73faa2e6117a4101c693ec48875000aad91.tar.xz webtools.sourceediting-c169f73faa2e6117a4101c693ec48875000aad91.zip |
234341 jsp formatter deletes code
Diffstat (limited to 'bundles/org.eclipse.wst.html.core')
-rw-r--r-- | bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/format/HTMLElementFormatter.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/format/HTMLElementFormatter.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/format/HTMLElementFormatter.java index abb85b7e6c..ce14df4cac 100644 --- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/format/HTMLElementFormatter.java +++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/format/HTMLElementFormatter.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2007 IBM Corporation and others. + * Copyright (c) 2004, 2008 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -22,6 +22,7 @@ import org.eclipse.wst.sse.core.internal.provisional.INodeAdapter; import org.eclipse.wst.sse.core.internal.provisional.INodeNotifier; import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion; import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion; +import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegionContainer; import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegionList; import org.eclipse.wst.xml.core.internal.provisional.document.IDOMElement; import org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode; @@ -315,6 +316,9 @@ public class HTMLElementFormatter extends HTMLFormatter { private void formatStyleAttr(Attr attr) { if (attr == null) return; + // if someone's made it a container somehow, CSS can't format it + if (((IDOMNode) attr).getValueRegion() instanceof ITextRegionContainer) + return; String value = getCSSValue(attr); if (value == null) return; |