Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNick Sandonato2012-11-08 20:15:14 +0000
committerNick Sandonato2012-11-08 20:15:14 +0000
commit60816b23e16d6f2251bce99a67c101f725de63ab (patch)
treed5c0c5f1fa41210f836ff5b22dfc453b7da3506f
parentc4f75938282bbc2306387af3a52b7abe050c7b9f (diff)
downloadwebtools.sourceediting-60816b23e16d6f2251bce99a67c101f725de63ab.tar.gz
webtools.sourceediting-60816b23e16d6f2251bce99a67c101f725de63ab.tar.xz
webtools.sourceediting-60816b23e16d6f2251bce99a67c101f725de63ab.zip
[163043] [api] Error on replacing a DOM element with another read-only elementv201211082015
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/ReadOnlyController.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/ReadOnlyController.java b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/ReadOnlyController.java
index 57c2375444..44b691f2be 100644
--- a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/ReadOnlyController.java
+++ b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/ReadOnlyController.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2001, 2010 IBM Corporation and others.
+ * Copyright (c) 2001, 2012 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
@@ -101,7 +101,7 @@ class ReadOnlyController {
private Span getDataSpanForElement(IDOMElement node) {
IStructuredDocumentRegion docRegion = node.getStartStructuredDocumentRegion();
- if (docRegion == null) {
+ if (docRegion == null || docRegion.getParentDocument() == null) {
return new Span(0, -1);
}

Back to the top