Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPawel Piech2009-06-25 13:09:39 -0400
committerPawel Piech2009-06-25 13:09:39 -0400
commit756f4e2e6d884d02608d7dfec8a18a874acb1b11 (patch)
treeced79e82995dcf0bd8e0126ef0cd7b14c38ec26b
parentd586b842fb392efc56d58debf79d927bf3a9f56d (diff)
downloadeclipse.platform.debug-756f4e2e6d884d02608d7dfec8a18a874acb1b11.tar.gz
eclipse.platform.debug-756f4e2e6d884d02608d7dfec8a18a874acb1b11.tar.xz
eclipse.platform.debug-756f4e2e6d884d02608d7dfec8a18a874acb1b11.zip
(3.5.x) Bug 281290 - Timer Leak when executing external tool actions
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/ProcessProxy.java53
1 files changed, 29 insertions, 24 deletions
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/ProcessProxy.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/ProcessProxy.java
index 9644344ed..305992275 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/ProcessProxy.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/ProcessProxy.java
@@ -29,7 +29,7 @@ public class ProcessProxy extends EventHandlerModelProxy {
}
protected void handleChange(DebugEvent event) {
- fireDelta(IModelDelta.STATE);
+ fireProcessDelta(IModelDelta.STATE);
}
protected void handleCreate(DebugEvent event) {
@@ -37,26 +37,27 @@ public class ProcessProxy extends EventHandlerModelProxy {
}
protected void handleTerminate(DebugEvent event) {
- fireDelta(IModelDelta.STATE | IModelDelta.UNINSTALL);
+ fireProcessDelta(IModelDelta.STATE | IModelDelta.UNINSTALL);
}
- private void fireDelta(int flags) {
- ModelDelta delta = null;
- synchronized (ProcessProxy.this) {
- if (!isDisposed()) {
- delta = new ModelDelta(DebugPlugin.getDefault().getLaunchManager(), IModelDelta.NO_CHANGE);
- ModelDelta node = delta;
- node = node.addNode(fProcess.getLaunch(), IModelDelta.NO_CHANGE);
- node.addNode(fProcess, flags);
- }
- }
- if (delta != null && !isDisposed()) {
- fireModelChanged(delta);
- }
- }
};
+ private void fireProcessDelta(int flags) {
+ ModelDelta delta = null;
+ synchronized (ProcessProxy.this) {
+ if (!isDisposed()) {
+ delta = new ModelDelta(DebugPlugin.getDefault().getLaunchManager(), IModelDelta.NO_CHANGE);
+ ModelDelta node = delta;
+ node = node.addNode(fProcess.getLaunch(), IModelDelta.NO_CHANGE);
+ node.addNode(fProcess, flags);
+ }
+ }
+ if (delta != null && !isDisposed()) {
+ fireModelChanged(delta);
+ }
+ }
+
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.viewers.update.EventHandlerModelProxy#dispose()
*/
@@ -85,14 +86,18 @@ public class ProcessProxy extends EventHandlerModelProxy {
// select process if in run mode
IProcess process = fProcess;
if (process != null) {
- ILaunch launch = process.getLaunch();
- if (launch != null && ILaunchManager.RUN_MODE.equals(launch.getLaunchMode())) {
- // select the process
- ModelDelta delta = new ModelDelta(DebugPlugin.getDefault().getLaunchManager(), IModelDelta.NO_CHANGE);
- ModelDelta node = delta.addNode(process.getLaunch(), IModelDelta.NO_CHANGE);
- node = node.addNode(process, IModelDelta.SELECT);
- fireModelChanged(delta);
- }
+ if (process.isTerminated()) {
+ fireProcessDelta(IModelDelta.UNINSTALL);
+ } else {
+ ILaunch launch = process.getLaunch();
+ if (launch != null && ILaunchManager.RUN_MODE.equals(launch.getLaunchMode())) {
+ // select the process
+ ModelDelta delta = new ModelDelta(DebugPlugin.getDefault().getLaunchManager(), IModelDelta.NO_CHANGE);
+ ModelDelta node = delta.addNode(process.getLaunch(), IModelDelta.NO_CHANGE);
+ node = node.addNode(process, IModelDelta.SELECT);
+ fireModelChanged(delta);
+ }
+ }
}
}
}

Back to the top