summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Bachmann2012-03-02 12:35:45 (EST)
committer Szymon Brandys2012-03-02 12:35:45 (EST)
commit94d6cd2b87d6e4b19ff71287df0068de8e00575c (patch)
tree941b750da5dfcc24e767ef565a72c39a65c46676
parent4ea40760b3b7859ea85ed7b2cdf3399e24c1fbe0 (diff)
downloadeclipse.platform.resources-94d6cd2b87d6e4b19ff71287df0068de8e00575c.zip
eclipse.platform.resources-94d6cd2b87d6e4b19ff71287df0068de8e00575c.tar.gz
eclipse.platform.resources-94d6cd2b87d6e4b19ff71287df0068de8e00575c.tar.bz2
bug 305034 - delete markers for type performance is slowrefs/changes/12/5212/2
-rw-r--r--bundles/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/MarkerManager.java10
1 files changed, 7 insertions, 3 deletions
diff --git a/bundles/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/MarkerManager.java b/bundles/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/MarkerManager.java
index b34145f..ecadb61 100644
--- a/bundles/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/MarkerManager.java
+++ b/bundles/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/MarkerManager.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 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
@@ -185,8 +185,12 @@ public class MarkerManager implements IManager {
markers = info.getMarkers(true);
// remove all the matching markers and also the whole
// set if there are no remaining markers
- markers.removeAll(matching);
- info.setMarkers(markers.size() == 0 ? null : markers);
+ if (markers.size() == matching.length) {
+ info.setMarkers(null);
+ } else {
+ markers.removeAll(matching);
+ info.setMarkers(markers);
+ }
}
info.set(ICoreConstants.M_MARKERS_SNAP_DIRTY);
IMarkerSetElement[] changes = new IMarkerSetElement[matching.length];