Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDarin Wright2002-06-07 15:40:19 -0400
committerDarin Wright2002-06-07 15:40:19 -0400
commit44d3787d2d433a9810444a5c89cc3d948a471462 (patch)
tree7d23f63902e3529aabb35d3a2bd02890eee9672e /org.eclipse.debug.core
parent3676a1134e46cbaee34db470fa476f247506d0fa (diff)
downloadeclipse.platform.debug-44d3787d2d433a9810444a5c89cc3d948a471462.tar.gz
eclipse.platform.debug-44d3787d2d433a9810444a5c89cc3d948a471462.tar.xz
eclipse.platform.debug-44d3787d2d433a9810444a5c89cc3d948a471462.zip
bug 19613
Diffstat (limited to 'org.eclipse.debug.core')
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchManager.java19
1 files changed, 16 insertions, 3 deletions
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchManager.java b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchManager.java
index 4defebbbf..c085748b0 100644
--- a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchManager.java
+++ b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchManager.java
@@ -251,8 +251,9 @@ public class LaunchManager implements ILaunchManager, IResourceChangeListener {
if (launch == null) {
return;
}
- fLaunches.remove(launch);
- fireUpdate(launch, REMOVED);
+ if (fLaunches.remove(launch)) {
+ fireUpdate(launch, REMOVED);
+ }
}
/**
@@ -270,11 +271,23 @@ public class LaunchManager implements ILaunchManager, IResourceChangeListener {
listener.launchRemoved(launch);
break;
case CHANGED:
- listener.launchChanged(launch);
+ if (isRegistered(launch)) {
+ listener.launchChanged(launch);
+ }
break;
}
}
}
+
+ /**
+ * Returns whether the given launch is currently registered.
+ *
+ * @param launch a launch
+ * @return whether the given launch is currently registered
+ */
+ protected boolean isRegistered(ILaunch launch) {
+ return fLaunches.contains(launch);
+ }
/**
* @see ILaunchManager#getDebugTargets()

Back to the top