diff options
author | amywu | 2006-08-16 22:42:59 +0000 |
---|---|---|
committer | amywu | 2006-08-16 22:42:59 +0000 |
commit | e4bd66590b7c80939f9d036a3ac9f447da53b07a (patch) | |
tree | bcccb9a3d9228004717861452254451afce3cf68 /bundles/org.eclipse.wst.dtd.core | |
parent | 9103669f197fdaa8b1bad939d07fc30853f28c58 (diff) | |
download | webtools.sourceediting-e4bd66590b7c80939f9d036a3ac9f447da53b07a.tar.gz webtools.sourceediting-e4bd66590b7c80939f9d036a3ac9f447da53b07a.tar.xz webtools.sourceediting-e4bd66590b7c80939f9d036a3ac9f447da53b07a.zip |
[111100] DTD Editor Has Slow Performance on xmlspec.dtd
fix up plugin version numbers
Diffstat (limited to 'bundles/org.eclipse.wst.dtd.core')
-rw-r--r-- | bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/DTDFile.java | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/DTDFile.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/DTDFile.java index 7c5a8e1467..5bcf031c12 100644 --- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/DTDFile.java +++ b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/DTDFile.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. + * Copyright (c) 2001, 2006 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 @@ -36,7 +36,7 @@ import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion; import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegionList; public class DTDFile implements IndexedRegion { - private NodeList attlistList = new NodeList(this, DTDRegionTypes.ATTLIST_TAG); + private NodeList attlistList = new NodeList(this, DTDRegionTypes.ATTLIST_TAG); private NodeList commentList = new NodeList(this, DTDRegionTypes.COMMENT_START); boolean creatingNewModel = false; @@ -637,6 +637,11 @@ public class DTDFile implements IndexedRegion { DTDNode affectedNode = getNode(flatNode); if (!isSameTopLevelType(affectedNode)) { + // Bug 111100 - Fire off a node removal event + // to remove the node from the tree viewer + NodesEvent removedDTDNodes = new NodesEvent(); + removedDTDNodes.add(affectedNode); + notifyNodesRemoved(removedDTDNodes); nodesToRebuild.add(affectedNode); rebuildNodes(nodesToRebuild); } @@ -650,7 +655,10 @@ public class DTDFile implements IndexedRegion { for (int i = 0; i < size; i++) { ITextRegion region = newRegions.get(i); DTDNode deepestNode = affectedNode.getDeepestNode(flatNode.getStartOffset(region), flatNode.getEndOffset(region)); - if (!addedDTDNodes.getNodes().contains(deepestNode)) { + // Bug 111100 - We do not need to fire a node added event + // for the affectedNode because that is already handled by + // the node changed event above + if (deepestNode != affectedNode && !addedDTDNodes.getNodes().contains(deepestNode)) { addedDTDNodes.add(deepestNode); } } |