diff options
author | david_williams | 2005-03-15 06:02:57 +0000 |
---|---|---|
committer | david_williams | 2005-03-15 06:02:57 +0000 |
commit | 63f5c32d828c5bbc22bbf55072d800d48b53114d (patch) | |
tree | d0c5b62e261e8ca2ddccf7c49ab6f325384f3298 /bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/TextImpl.java | |
parent | 4da6ac01e031d1d515b67eeb1e5049dad0a005f6 (diff) | |
download | webtools.sourceediting-63f5c32d828c5bbc22bbf55072d800d48b53114d.tar.gz webtools.sourceediting-63f5c32d828c5bbc22bbf55072d800d48b53114d.tar.xz webtools.sourceediting-63f5c32d828c5bbc22bbf55072d800d48b53114d.zip |
refactoring to move more JSP knowledge out of XML level (works not finished, but this is a start).
Diffstat (limited to 'bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/TextImpl.java')
-rw-r--r-- | bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/TextImpl.java | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/TextImpl.java b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/TextImpl.java index 826fe54b3b..0eb7f4acd4 100644 --- a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/TextImpl.java +++ b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/TextImpl.java @@ -114,7 +114,8 @@ public class TextImpl extends CharacterDataImpl implements XMLText { if (flatNode instanceof StructuredDocumentRegionContainer) { StructuredDocumentRegionContainer container = (StructuredDocumentRegionContainer) flatNode; container.appendStructuredDocumentRegion(newStructuredDocumentRegion); - } else { + } + else { StructuredDocumentRegionContainer container = new StructuredDocumentRegionContainer(); container.appendStructuredDocumentRegion(flatNode); container.appendStructuredDocumentRegion(newStructuredDocumentRegion); @@ -582,13 +583,18 @@ public class TextImpl extends CharacterDataImpl implements XMLText { } String regionType = StructuredDocumentRegionUtil.getFirstRegionType(flatNode); - if (regionType != XMLRegionContext.XML_CONTENT && regionType != JSP_CONTENT && regionType != XMLRegionContext.XML_ENTITY_REFERENCE && regionType != XMLRegionContext.XML_CHAR_REFERENCE && regionType != XMLRegionContext.BLOCK_TEXT && regionType != XMLRegionContext.WHITE_SPACE) { + if (regionType != XMLRegionContext.XML_CONTENT && isNotNestedContent(regionType) && regionType != XMLRegionContext.XML_ENTITY_REFERENCE && regionType != XMLRegionContext.XML_CHAR_REFERENCE && regionType != XMLRegionContext.BLOCK_TEXT && regionType != XMLRegionContext.WHITE_SPACE) { return true; } return false; } + protected boolean isNotNestedContent(String regionType) { + boolean result = true; + return result; + } + /** */ boolean isSharingStructuredDocumentRegion(IStructuredDocumentRegion sharedStructuredDocumentRegion) { @@ -772,7 +778,8 @@ public class TextImpl extends CharacterDataImpl implements XMLText { if (newStructuredDocumentRegion instanceof StructuredDocumentRegionProxy) { // proxy must not be nested setStructuredDocumentRegion(newStructuredDocumentRegion); - } else { + } + else { proxy.setStructuredDocumentRegion(newStructuredDocumentRegion); } return oldStructuredDocumentRegion; @@ -798,7 +805,8 @@ public class TextImpl extends CharacterDataImpl implements XMLText { if (newStructuredDocumentRegion instanceof StructuredDocumentRegionProxy) { // proxy must not be nested container.replaceStructuredDocumentRegion(newStructuredDocumentRegion, i); - } else { + } + else { proxy.setStructuredDocumentRegion(newStructuredDocumentRegion); } return oldStructuredDocumentRegion; |