mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-06 17:26:01 +02:00
[291535] inconsistency in listener registration in launch vm providers
This commit is contained in:
parent
88fd43a9ec
commit
cf9c80f17e
3 changed files with 6 additions and 19 deletions
|
@ -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
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* 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.AbstractVMAdapter;
|
||||||
import org.eclipse.cdt.dsf.ui.viewmodel.IRootVMNode;
|
import org.eclipse.cdt.dsf.ui.viewmodel.IRootVMNode;
|
||||||
import org.eclipse.cdt.dsf.ui.viewmodel.IVMNode;
|
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.IDebugEventSetListener;
|
||||||
import org.eclipse.debug.core.ILaunchesListener2;
|
import org.eclipse.debug.core.ILaunchesListener2;
|
||||||
import org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext;
|
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
|
public class LaunchVMProvider extends AbstractLaunchVMProvider
|
||||||
implements IDebugEventSetListener, ILaunchesListener2
|
implements IDebugEventSetListener, ILaunchesListener2
|
||||||
{
|
{
|
||||||
|
@ -62,17 +60,6 @@ public class LaunchVMProvider extends AbstractLaunchVMProvider
|
||||||
|
|
||||||
IVMNode stackFramesNode = new StackFramesVMNode(this, getSession());
|
IVMNode stackFramesNode = new StackFramesVMNode(this, getSession());
|
||||||
addChildNodes(threadsNode, new IVMNode[] { stackFramesNode });
|
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
|
@Override
|
||||||
|
|
|
@ -86,6 +86,11 @@ public class AbstractLaunchVMProvider extends AbstractDMVMProvider
|
||||||
handlePropertyChanged(store, event);
|
handlePropertyChanged(store, event);
|
||||||
}};
|
}};
|
||||||
store.addPropertyChangeListener(fPreferencesListener);
|
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
|
@Override
|
||||||
|
|
|
@ -62,10 +62,5 @@ public class PDALaunchVMProvider extends AbstractLaunchVMProvider
|
||||||
// Stack frames node is under the PDA threads node.
|
// Stack frames node is under the PDA threads node.
|
||||||
IVMNode stackFramesNode = new StackFramesVMNode(this, getSession());
|
IVMNode stackFramesNode = new StackFramesVMNode(this, getSession());
|
||||||
addChildNodes(threadsNode, new IVMNode[] { stackFramesNode });
|
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);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue