mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-22 14:12:10 +02:00
Bug 573696: add dummy listener to DebugPlugin
Change-Id: Ic8603d82dd9aaeaec845a9ca33ee715b63a901fd Signed-off-by: Anton Backstrom <anton.backstrom@gaisler.com>
This commit is contained in:
parent
7e134ccf24
commit
01cc2ac4d2
1 changed files with 23 additions and 0 deletions
|
@ -40,6 +40,9 @@ import org.eclipse.core.runtime.IProgressMonitor;
|
||||||
import org.eclipse.core.runtime.IStatus;
|
import org.eclipse.core.runtime.IStatus;
|
||||||
import org.eclipse.core.runtime.Platform;
|
import org.eclipse.core.runtime.Platform;
|
||||||
import org.eclipse.core.runtime.Status;
|
import org.eclipse.core.runtime.Status;
|
||||||
|
import org.eclipse.debug.core.DebugEvent;
|
||||||
|
import org.eclipse.debug.core.DebugPlugin;
|
||||||
|
import org.eclipse.debug.core.IDebugEventSetListener;
|
||||||
import org.eclipse.debug.core.model.IPersistableSourceLocator;
|
import org.eclipse.debug.core.model.IPersistableSourceLocator;
|
||||||
import org.eclipse.debug.ui.IDebugUIConstants;
|
import org.eclipse.debug.ui.IDebugUIConstants;
|
||||||
import org.eclipse.debug.ui.IDebugView;
|
import org.eclipse.debug.ui.IDebugView;
|
||||||
|
@ -91,6 +94,19 @@ public class CDebugUIPlugin extends AbstractUIPlugin {
|
||||||
|
|
||||||
private static IDebuggerConsoleManager fDebuggerConsoleManager;
|
private static IDebuggerConsoleManager fDebuggerConsoleManager;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* At least one listener must be registered on the DebugPlugin in order
|
||||||
|
* for certain actions, like RunToLine, to work. See bug 573696.
|
||||||
|
*/
|
||||||
|
private static class DebugListener implements IDebugEventSetListener {
|
||||||
|
@Override
|
||||||
|
public void handleDebugEvents(DebugEvent[] arg0) {
|
||||||
|
/* Do nothing, see bug 573696*/
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static DebugListener dummy = new DebugListener();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The constructor.
|
* The constructor.
|
||||||
*/
|
*/
|
||||||
|
@ -294,6 +310,9 @@ public class CDebugUIPlugin extends AbstractUIPlugin {
|
||||||
fDisassemblyEditorManager = new DisassemblyEditorManager();
|
fDisassemblyEditorManager = new DisassemblyEditorManager();
|
||||||
CDebugCorePlugin.getDefault().addCBreakpointListener(CBreakpointUpdater.getInstance());
|
CDebugCorePlugin.getDefault().addCBreakpointListener(CBreakpointUpdater.getInstance());
|
||||||
|
|
||||||
|
// See bug 573696
|
||||||
|
DebugPlugin.getDefault().addDebugEventListener(dummy);
|
||||||
|
|
||||||
fDebuggerConsoleManager = new DebuggerConsoleManager();
|
fDebuggerConsoleManager = new DebuggerConsoleManager();
|
||||||
|
|
||||||
WorkbenchJob wjob = new WorkbenchJob("Initializing CDT Debug UI") { //$NON-NLS-1$
|
WorkbenchJob wjob = new WorkbenchJob("Initializing CDT Debug UI") { //$NON-NLS-1$
|
||||||
|
@ -335,6 +354,10 @@ public class CDebugUIPlugin extends AbstractUIPlugin {
|
||||||
public void stop(BundleContext context) throws Exception {
|
public void stop(BundleContext context) throws Exception {
|
||||||
CDebugCorePlugin.getDefault().removeCBreakpointListener(CBreakpointUpdater.getInstance());
|
CDebugCorePlugin.getDefault().removeCBreakpointListener(CBreakpointUpdater.getInstance());
|
||||||
fDisassemblyEditorManager.dispose();
|
fDisassemblyEditorManager.dispose();
|
||||||
|
|
||||||
|
// See bug 573696
|
||||||
|
DebugPlugin.getDefault().removeDebugEventListener(dummy);
|
||||||
|
|
||||||
if (fImageDescriptorRegistry != null) {
|
if (fImageDescriptorRegistry != null) {
|
||||||
fImageDescriptorRegistry.dispose();
|
fImageDescriptorRegistry.dispose();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue