Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Cortell2009-10-06 20:43:36 +0000
committerJohn Cortell2009-10-06 20:43:36 +0000
commitcf9c80f17e8f48c805bd8f83023bc591ae2add47 (patch)
tree808cb5cabd0e57d240353445cdfe5c3f1feddb7c
parent88fd43a9ec572fc65044730288858864ef0a97e6 (diff)
downloadorg.eclipse.cdt-cf9c80f17e8f48c805bd8f83023bc591ae2add47.tar.gz
org.eclipse.cdt-cf9c80f17e8f48c805bd8f83023bc591ae2add47.tar.xz
org.eclipse.cdt-cf9c80f17e8f48c805bd8f83023bc591ae2add47.zip
[291535] inconsistency in listener registration in launch vm providers
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/viewmodel/launch/LaunchVMProvider.java15
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/launch/AbstractLaunchVMProvider.java5
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf.pda.ui/src/org/eclipse/cdt/examples/dsf/pda/ui/viewmodel/launch/PDALaunchVMProvider.java5
3 files changed, 6 insertions, 19 deletions
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/viewmodel/launch/LaunchVMProvider.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/viewmodel/launch/LaunchVMProvider.java
index b8282dd0206..a038d4748db 100644
--- a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/viewmodel/launch/LaunchVMProvider.java
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/viewmodel/launch/LaunchVMProvider.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2008 Wind River Systems and others.
+ * Copyright (c) 2006, 2009 Wind River Systems 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
@@ -31,7 +31,6 @@ import org.eclipse.cdt.dsf.service.DsfSession;
import org.eclipse.cdt.dsf.ui.viewmodel.AbstractVMAdapter;
import org.eclipse.cdt.dsf.ui.viewmodel.IRootVMNode;
import org.eclipse.cdt.dsf.ui.viewmodel.IVMNode;
-import org.eclipse.debug.core.DebugPlugin;
import org.eclipse.debug.core.IDebugEventSetListener;
import org.eclipse.debug.core.ILaunchesListener2;
import org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext;
@@ -40,7 +39,6 @@ import org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationCont
/**
*
*/
-@SuppressWarnings("restriction")
public class LaunchVMProvider extends AbstractLaunchVMProvider
implements IDebugEventSetListener, ILaunchesListener2
{
@@ -62,17 +60,6 @@ public class LaunchVMProvider extends AbstractLaunchVMProvider
IVMNode stackFramesNode = new StackFramesVMNode(this, getSession());
addChildNodes(threadsNode, new IVMNode[] { stackFramesNode });
-
-
- DebugPlugin.getDefault().addDebugEventListener(this);
- DebugPlugin.getDefault().getLaunchManager().addLaunchListener(this);
- }
-
- @Override
- public void dispose() {
- DebugPlugin.getDefault().removeDebugEventListener(this);
- DebugPlugin.getDefault().getLaunchManager().removeLaunchListener(this);
- super.dispose();
}
@Override
diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/launch/AbstractLaunchVMProvider.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/launch/AbstractLaunchVMProvider.java
index 74f0b5b5282..1c665f2da8f 100644
--- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/launch/AbstractLaunchVMProvider.java
+++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/launch/AbstractLaunchVMProvider.java
@@ -86,6 +86,11 @@ public class AbstractLaunchVMProvider extends AbstractDMVMProvider
handlePropertyChanged(store, event);
}};
store.addPropertyChangeListener(fPreferencesListener);
+
+ // Register the LaunchVM provider as a listener to debug and launch
+ // events. These events are used by the launch and processes nodes.
+ DebugPlugin.getDefault().addDebugEventListener(this);
+ DebugPlugin.getDefault().getLaunchManager().addLaunchListener(this);
}
@Override
diff --git a/dsf/org.eclipse.cdt.examples.dsf.pda.ui/src/org/eclipse/cdt/examples/dsf/pda/ui/viewmodel/launch/PDALaunchVMProvider.java b/dsf/org.eclipse.cdt.examples.dsf.pda.ui/src/org/eclipse/cdt/examples/dsf/pda/ui/viewmodel/launch/PDALaunchVMProvider.java
index b00b63e8946..3bca556ccb1 100644
--- a/dsf/org.eclipse.cdt.examples.dsf.pda.ui/src/org/eclipse/cdt/examples/dsf/pda/ui/viewmodel/launch/PDALaunchVMProvider.java
+++ b/dsf/org.eclipse.cdt.examples.dsf.pda.ui/src/org/eclipse/cdt/examples/dsf/pda/ui/viewmodel/launch/PDALaunchVMProvider.java
@@ -62,10 +62,5 @@ public class PDALaunchVMProvider extends AbstractLaunchVMProvider
// Stack frames node is under the PDA threads node.
IVMNode stackFramesNode = new StackFramesVMNode(this, getSession());
addChildNodes(threadsNode, new IVMNode[] { stackFramesNode });
-
- // Register the LaunchVM provider as a listener to debug and launch
- // events. These events are used by the launch and processes nodes.
- DebugPlugin.getDefault().addDebugEventListener(this);
- DebugPlugin.getDefault().getLaunchManager().addLaunchListener(this);
}
}

Back to the top