mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-24 17:35:35 +02:00
[265882] API cleanup: Remove StepQueueManager
This commit is contained in:
parent
2c51861e8a
commit
5af8a67f24
14 changed files with 38 additions and 660 deletions
|
@ -1,155 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<component id="org.eclipse.cdt.dsf.gdb.ui" version="2">
|
||||
<resource path="src/org/eclipse/dd/gdb/internal/ui/launching/GdbLocalRunLaunchConfigurationTabGroup.java" type="org.eclipse.cdt.dsf.gdb.internal.ui.launching.GdbLocalRunLaunchConfigurationTabGroup">
|
||||
<filter id="305365105">
|
||||
<message_arguments>
|
||||
<message_argument value="org.eclipse.cdt.dsf.gdb.internal.ui.launching.GdbLocalRunLaunchConfigurationTabGroup"/>
|
||||
<message_argument value="org.eclipse.cdt.dsf.gdb.ui_1.1.0"/>
|
||||
</message_arguments>
|
||||
</filter>
|
||||
</resource>
|
||||
<resource path="META-INF/MANIFEST.MF">
|
||||
<filter id="923795461">
|
||||
<message_arguments>
|
||||
<message_argument value="1.1.0.qualifier"/>
|
||||
<message_argument value="1.0.0.v20080609"/>
|
||||
</message_arguments>
|
||||
</filter>
|
||||
</resource>
|
||||
<resource path="src/org/eclipse/dd/gdb/internal/ui/launching/GDBSolibBlock.java" type="org.eclipse.cdt.dsf.gdb.internal.ui.launching.GDBSolibBlock">
|
||||
<filter id="305365105">
|
||||
<message_arguments>
|
||||
<message_argument value="org.eclipse.cdt.dsf.gdb.internal.ui.launching.GDBSolibBlock"/>
|
||||
<message_argument value="org.eclipse.cdt.dsf.gdb.ui_1.1.0"/>
|
||||
</message_arguments>
|
||||
</filter>
|
||||
</resource>
|
||||
<resource path="src/org/eclipse/dd/gdb/internal/ui/launching/GdbAttachLaunchConfigurationTabGroup.java" type="org.eclipse.cdt.dsf.gdb.internal.ui.launching.GdbAttachLaunchConfigurationTabGroup">
|
||||
<filter id="305365105">
|
||||
<message_arguments>
|
||||
<message_argument value="org.eclipse.cdt.dsf.gdb.internal.ui.launching.GdbAttachLaunchConfigurationTabGroup"/>
|
||||
<message_argument value="org.eclipse.cdt.dsf.gdb.ui_1.1.0"/>
|
||||
</message_arguments>
|
||||
</filter>
|
||||
</resource>
|
||||
<resource path="src/org/eclipse/dd/gdb/internal/ui/launching/IMILaunchConfigurationComponent.java" type="org.eclipse.cdt.dsf.gdb.internal.ui.launching.IMILaunchConfigurationComponent">
|
||||
<filter id="305365105">
|
||||
<message_arguments>
|
||||
<message_argument value="org.eclipse.cdt.dsf.gdb.internal.ui.launching.IMILaunchConfigurationComponent"/>
|
||||
<message_argument value="org.eclipse.cdt.dsf.gdb.ui_1.1.0"/>
|
||||
</message_arguments>
|
||||
</filter>
|
||||
</resource>
|
||||
<resource path="src/org/eclipse/dd/gdb/internal/ui/launching/CMainTab.java" type="org.eclipse.cdt.dsf.gdb.internal.ui.launching.CMainTab">
|
||||
<filter id="305365105">
|
||||
<message_arguments>
|
||||
<message_argument value="org.eclipse.cdt.dsf.gdb.internal.ui.launching.CMainTab"/>
|
||||
<message_argument value="org.eclipse.cdt.dsf.gdb.ui_1.1.0"/>
|
||||
</message_arguments>
|
||||
</filter>
|
||||
</resource>
|
||||
<resource path="src/org/eclipse/dd/gdb/internal/ui/launching/TCPSettingsBlock.java" type="org.eclipse.cdt.dsf.gdb.internal.ui.launching.TCPSettingsBlock">
|
||||
<filter id="305365105">
|
||||
<message_arguments>
|
||||
<message_argument value="org.eclipse.cdt.dsf.gdb.internal.ui.launching.TCPSettingsBlock"/>
|
||||
<message_argument value="org.eclipse.cdt.dsf.gdb.ui_1.1.0"/>
|
||||
</message_arguments>
|
||||
</filter>
|
||||
</resource>
|
||||
<resource path="src/org/eclipse/dd/gdb/internal/ui/launching/GdbServerDebuggerPage.java" type="org.eclipse.cdt.dsf.gdb.internal.ui.launching.GdbServerDebuggerPage">
|
||||
<filter id="305365105">
|
||||
<message_arguments>
|
||||
<message_argument value="org.eclipse.cdt.dsf.gdb.internal.ui.launching.GdbServerDebuggerPage"/>
|
||||
<message_argument value="org.eclipse.cdt.dsf.gdb.ui_1.1.0"/>
|
||||
</message_arguments>
|
||||
</filter>
|
||||
</resource>
|
||||
<resource path="src/org/eclipse/dd/gdb/internal/ui/launching/SolibSearchPathBlock.java" type="org.eclipse.cdt.dsf.gdb.internal.ui.launching.SolibSearchPathBlock">
|
||||
<filter id="305365105">
|
||||
<message_arguments>
|
||||
<message_argument value="org.eclipse.cdt.dsf.gdb.internal.ui.launching.SolibSearchPathBlock"/>
|
||||
<message_argument value="org.eclipse.cdt.dsf.gdb.ui_1.1.0"/>
|
||||
</message_arguments>
|
||||
</filter>
|
||||
</resource>
|
||||
<resource path="src/org/eclipse/dd/gdb/internal/ui/launching/LaunchUIMessages.java" type="org.eclipse.cdt.dsf.gdb.internal.ui.launching.LaunchUIMessages">
|
||||
<filter id="305365105">
|
||||
<message_arguments>
|
||||
<message_argument value="org.eclipse.cdt.dsf.gdb.internal.ui.launching.LaunchUIMessages"/>
|
||||
<message_argument value="org.eclipse.cdt.dsf.gdb.ui_1.1.0"/>
|
||||
</message_arguments>
|
||||
</filter>
|
||||
</resource>
|
||||
<resource path="src/org/eclipse/dd/gdb/internal/ui/launching/GdbRemoteRunLaunchConfigurationTabGroup.java" type="org.eclipse.cdt.dsf.gdb.internal.ui.launching.GdbRemoteRunLaunchConfigurationTabGroup">
|
||||
<filter id="305365105">
|
||||
<message_arguments>
|
||||
<message_argument value="org.eclipse.cdt.dsf.gdb.internal.ui.launching.GdbRemoteRunLaunchConfigurationTabGroup"/>
|
||||
<message_argument value="org.eclipse.cdt.dsf.gdb.ui_1.1.0"/>
|
||||
</message_arguments>
|
||||
</filter>
|
||||
</resource>
|
||||
<resource path="src/org/eclipse/dd/gdb/internal/ui/launching/CLaunchConfigurationTab.java" type="org.eclipse.cdt.dsf.gdb.internal.ui.launching.CLaunchConfigurationTab">
|
||||
<filter id="305365105">
|
||||
<message_arguments>
|
||||
<message_argument value="org.eclipse.cdt.dsf.gdb.internal.ui.launching.CLaunchConfigurationTab"/>
|
||||
<message_argument value="org.eclipse.cdt.dsf.gdb.ui_1.1.0"/>
|
||||
</message_arguments>
|
||||
</filter>
|
||||
</resource>
|
||||
<resource path="src/org/eclipse/dd/gdb/internal/ui/launching/SerialPortSettingsBlock.java" type="org.eclipse.cdt.dsf.gdb.internal.ui.launching.SerialPortSettingsBlock">
|
||||
<filter id="305365105">
|
||||
<message_arguments>
|
||||
<message_argument value="org.eclipse.cdt.dsf.gdb.internal.ui.launching.SerialPortSettingsBlock"/>
|
||||
<message_argument value="org.eclipse.cdt.dsf.gdb.ui_1.1.0"/>
|
||||
</message_arguments>
|
||||
</filter>
|
||||
</resource>
|
||||
<resource path="src/org/eclipse/dd/gdb/internal/ui/launching/AbstractCDebuggerTab.java" type="org.eclipse.cdt.dsf.gdb.internal.ui.launching.AbstractCDebuggerTab">
|
||||
<filter id="305365105">
|
||||
<message_arguments>
|
||||
<message_argument value="org.eclipse.cdt.dsf.gdb.internal.ui.launching.AbstractCDebuggerTab"/>
|
||||
<message_argument value="org.eclipse.cdt.dsf.gdb.ui_1.1.0"/>
|
||||
</message_arguments>
|
||||
</filter>
|
||||
</resource>
|
||||
<resource path="src/org/eclipse/dd/gdb/internal/ui/launching/GdbDebuggerPage.java" type="org.eclipse.cdt.dsf.gdb.internal.ui.launching.GdbDebuggerPage">
|
||||
<filter id="305365105">
|
||||
<message_arguments>
|
||||
<message_argument value="org.eclipse.cdt.dsf.gdb.internal.ui.launching.GdbDebuggerPage"/>
|
||||
<message_argument value="org.eclipse.cdt.dsf.gdb.ui_1.1.0"/>
|
||||
</message_arguments>
|
||||
</filter>
|
||||
</resource>
|
||||
<resource path="src/org/eclipse/dd/gdb/internal/ui/launching/CDebuggerTab.java" type="org.eclipse.cdt.dsf.gdb.internal.ui.launching.CDebuggerTab">
|
||||
<filter id="305365105">
|
||||
<message_arguments>
|
||||
<message_argument value="org.eclipse.cdt.dsf.gdb.internal.ui.launching.CDebuggerTab"/>
|
||||
<message_argument value="org.eclipse.cdt.dsf.gdb.ui_1.1.0"/>
|
||||
</message_arguments>
|
||||
</filter>
|
||||
</resource>
|
||||
<resource path="src/org/eclipse/dd/gdb/internal/ui/launching/LaunchImages.java" type="org.eclipse.cdt.dsf.gdb.internal.ui.launching.LaunchImages">
|
||||
<filter id="305365105">
|
||||
<message_arguments>
|
||||
<message_argument value="org.eclipse.cdt.dsf.gdb.internal.ui.launching.LaunchImages"/>
|
||||
<message_argument value="org.eclipse.cdt.dsf.gdb.ui_1.1.0"/>
|
||||
</message_arguments>
|
||||
</filter>
|
||||
</resource>
|
||||
<resource path="src/org/eclipse/dd/gdb/internal/ui/launching/ProcessPrompter.java" type="org.eclipse.cdt.dsf.gdb.internal.ui.launching.ProcessPrompter">
|
||||
<filter id="305365105">
|
||||
<message_arguments>
|
||||
<message_argument value="org.eclipse.cdt.dsf.gdb.internal.ui.launching.ProcessPrompter"/>
|
||||
<message_argument value="org.eclipse.cdt.dsf.gdb.ui_1.1.0"/>
|
||||
</message_arguments>
|
||||
</filter>
|
||||
</resource>
|
||||
<resource path="src/org/eclipse/dd/gdb/internal/ui/launching/ICDTLaunchHelpContextIds.java" type="org.eclipse.cdt.dsf.gdb.internal.ui.launching.ICDTLaunchHelpContextIds">
|
||||
<filter id="305365105">
|
||||
<message_arguments>
|
||||
<message_argument value="org.eclipse.cdt.dsf.gdb.internal.ui.launching.ICDTLaunchHelpContextIds"/>
|
||||
<message_argument value="org.eclipse.cdt.dsf.gdb.ui_1.1.0"/>
|
||||
</message_arguments>
|
||||
</filter>
|
||||
</resource>
|
||||
</component>
|
|
@ -1,115 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<component id="org.eclipse.cdt.dsf.gdb" version="2">
|
||||
<resource path="src/org/eclipse/dd/gdb/internal/provisional/launching/GDBDebugger.java" type="org.eclipse.cdt.dsf.gdb.launching.GDBDebugger">
|
||||
<filter id="305365105">
|
||||
<message_arguments>
|
||||
<message_argument value="org.eclipse.cdt.dsf.gdb.launching.GDBDebugger"/>
|
||||
<message_argument value="org.eclipse.dd.gdb_1.1.0"/>
|
||||
</message_arguments>
|
||||
</filter>
|
||||
</resource>
|
||||
<resource path="src/org/eclipse/dd/gdb/internal/provisional/IGDBLaunchConfigurationConstants.java" type="org.eclipse.cdt.dsf.gdb.IGDBLaunchConfigurationConstants">
|
||||
<filter id="305365105">
|
||||
<message_arguments>
|
||||
<message_argument value="org.eclipse.cdt.dsf.gdb.IGDBLaunchConfigurationConstants"/>
|
||||
<message_argument value="org.eclipse.dd.gdb_1.1.0"/>
|
||||
</message_arguments>
|
||||
</filter>
|
||||
</resource>
|
||||
<resource path="src/org/eclipse/dd/gdb/internal/provisional/launching/LaunchMessages.java" type="org.eclipse.cdt.dsf.gdb.launching.LaunchMessages">
|
||||
<filter id="305365105">
|
||||
<message_arguments>
|
||||
<message_argument value="org.eclipse.cdt.dsf.gdb.launching.LaunchMessages"/>
|
||||
<message_argument value="org.eclipse.dd.gdb_1.1.0"/>
|
||||
</message_arguments>
|
||||
</filter>
|
||||
</resource>
|
||||
<resource path="src/org/eclipse/dd/gdb/internal/provisional/launching/GdbLaunchDelegate.java" type="org.eclipse.cdt.dsf.gdb.launching.GdbLaunchDelegate">
|
||||
<filter id="305365105">
|
||||
<message_arguments>
|
||||
<message_argument value="org.eclipse.cdt.dsf.gdb.launching.GdbLaunchDelegate"/>
|
||||
<message_argument value="org.eclipse.dd.gdb_1.1.0"/>
|
||||
</message_arguments>
|
||||
</filter>
|
||||
</resource>
|
||||
<resource path="src/org/eclipse/dd/gdb/internal/provisional/service/command/GDBControlDMContext.java" type="org.eclipse.cdt.dsf.gdb.service.command.GDBControlDMContext">
|
||||
<filter id="305365105">
|
||||
<message_arguments>
|
||||
<message_argument value="org.eclipse.cdt.dsf.gdb.service.command.GDBControlDMContext"/>
|
||||
<message_argument value="org.eclipse.dd.gdb_1.1.0"/>
|
||||
</message_arguments>
|
||||
</filter>
|
||||
</resource>
|
||||
<resource path="src/org/eclipse/dd/gdb/internal/provisional/launching/ShutdownSequence.java" type="org.eclipse.cdt.dsf.gdb.launching.ShutdownSequence">
|
||||
<filter id="305365105">
|
||||
<message_arguments>
|
||||
<message_argument value="org.eclipse.cdt.dsf.gdb.launching.ShutdownSequence"/>
|
||||
<message_argument value="org.eclipse.dd.gdb_1.1.0"/>
|
||||
</message_arguments>
|
||||
</filter>
|
||||
</resource>
|
||||
<resource path="src/org/eclipse/dd/gdb/internal/provisional/breakpoints/CBreakpointGdbThreadsFilterExtension.java" type="org.eclipse.cdt.dsf.gdb.breakpoints.CBreakpointGdbThreadsFilterExtension">
|
||||
<filter id="305365105">
|
||||
<message_arguments>
|
||||
<message_argument value="org.eclipse.cdt.dsf.gdb.breakpoints.CBreakpointGdbThreadsFilterExtension"/>
|
||||
<message_argument value="org.eclipse.dd.gdb_1.1.0"/>
|
||||
</message_arguments>
|
||||
</filter>
|
||||
</resource>
|
||||
<resource path="META-INF/MANIFEST.MF">
|
||||
<filter id="923795461">
|
||||
<message_arguments>
|
||||
<message_argument value="1.1.0.qualifier"/>
|
||||
<message_argument value="1.0.0.v20080609"/>
|
||||
</message_arguments>
|
||||
</filter>
|
||||
</resource>
|
||||
<resource path="src/org/eclipse/dd/gdb/internal/provisional/launching/GDBServerDebugger.java" type="org.eclipse.cdt.dsf.gdb.launching.GDBServerDebugger">
|
||||
<filter id="305365105">
|
||||
<message_arguments>
|
||||
<message_argument value="org.eclipse.cdt.dsf.gdb.launching.GDBServerDebugger"/>
|
||||
<message_argument value="org.eclipse.dd.gdb_1.1.0"/>
|
||||
</message_arguments>
|
||||
</filter>
|
||||
</resource>
|
||||
<resource path="src/org/eclipse/dd/gdb/internal/provisional/service/command/GDBControl.java" type="org.eclipse.cdt.dsf.gdb.service.command.GDBControl">
|
||||
<filter id="305365105">
|
||||
<message_arguments>
|
||||
<message_argument value="org.eclipse.cdt.dsf.gdb.service.command.GDBControl"/>
|
||||
<message_argument value="org.eclipse.dd.gdb_1.1.0"/>
|
||||
</message_arguments>
|
||||
</filter>
|
||||
</resource>
|
||||
<resource path="src/org/eclipse/dd/gdb/internal/provisional/launching/FinalLaunchSequence.java" type="org.eclipse.cdt.dsf.gdb.launching.FinalLaunchSequence">
|
||||
<filter id="305365105">
|
||||
<message_arguments>
|
||||
<message_argument value="org.eclipse.cdt.dsf.gdb.launching.FinalLaunchSequence"/>
|
||||
<message_argument value="org.eclipse.dd.gdb_1.1.0"/>
|
||||
</message_arguments>
|
||||
</filter>
|
||||
</resource>
|
||||
<resource path="src/org/eclipse/dd/gdb/internal/provisional/launching/GdbLaunch.java" type="org.eclipse.cdt.dsf.gdb.launching.GdbLaunch">
|
||||
<filter id="305365105">
|
||||
<message_arguments>
|
||||
<message_argument value="org.eclipse.cdt.dsf.gdb.launching.GdbLaunch"/>
|
||||
<message_argument value="org.eclipse.dd.gdb_1.1.0"/>
|
||||
</message_arguments>
|
||||
</filter>
|
||||
</resource>
|
||||
<resource path="src/org/eclipse/dd/gdb/internal/provisional/launching/ServicesLaunchSequence.java" type="org.eclipse.cdt.dsf.gdb.launching.ServicesLaunchSequence">
|
||||
<filter id="305365105">
|
||||
<message_arguments>
|
||||
<message_argument value="org.eclipse.cdt.dsf.gdb.launching.ServicesLaunchSequence"/>
|
||||
<message_argument value="org.eclipse.dd.gdb_1.1.0"/>
|
||||
</message_arguments>
|
||||
</filter>
|
||||
</resource>
|
||||
<resource path="src/org/eclipse/dd/gdb/internal/provisional/service/GDBRunControl.java" type="org.eclipse.cdt.dsf.gdb.service.GDBRunControl">
|
||||
<filter id="305365105">
|
||||
<message_arguments>
|
||||
<message_argument value="org.eclipse.cdt.dsf.gdb.service.GDBRunControl"/>
|
||||
<message_argument value="org.eclipse.dd.gdb_1.1.0"/>
|
||||
</message_arguments>
|
||||
</filter>
|
||||
</resource>
|
||||
</component>
|
|
@ -1,11 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<component id="org.eclipse.cdt.dsf.ui" version="2">
|
||||
<resource path="src/org/eclipse/dd/dsf/ui/viewmodel/AbstractVMAdapter.java" type="org.eclipse.cdt.dsf.ui.viewmodel.AbstractVMAdapter">
|
||||
<filter id="338792546">
|
||||
<message_arguments>
|
||||
<message_argument value="org.eclipse.cdt.dsf.ui.viewmodel.AbstractVMAdapter"/>
|
||||
<message_argument value="getVMProviderIterable()"/>
|
||||
</message_arguments>
|
||||
</filter>
|
||||
</resource>
|
||||
</component>
|
|
@ -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
|
||||
|
@ -15,8 +15,6 @@ import org.eclipse.cdt.dsf.concurrent.Immutable;
|
|||
import org.eclipse.cdt.dsf.datamodel.DMContexts;
|
||||
import org.eclipse.cdt.dsf.debug.service.IProcesses;
|
||||
import org.eclipse.cdt.dsf.debug.service.IRunControl;
|
||||
import org.eclipse.cdt.dsf.debug.service.IStepQueueManager;
|
||||
import org.eclipse.cdt.dsf.debug.service.StepQueueManager;
|
||||
import org.eclipse.cdt.dsf.debug.service.IRunControl.IExecutionDMContext;
|
||||
import org.eclipse.cdt.dsf.debug.ui.viewmodel.SteppingController;
|
||||
import org.eclipse.cdt.dsf.internal.ui.DsfUIPlugin;
|
||||
|
@ -39,25 +37,6 @@ public abstract class DsfCommandRunnable extends DsfRunnable {
|
|||
public IRunControl getRunControl() {
|
||||
return fTracker.getService(IRunControl.class);
|
||||
}
|
||||
/**
|
||||
* @deprecated Use {@link #getStepQueueManager()} instead.
|
||||
*/
|
||||
@Deprecated
|
||||
public StepQueueManager getStepQueueMgr() {
|
||||
return fTracker.getService(StepQueueManager.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* @since 1.1
|
||||
*/
|
||||
public IStepQueueManager getStepQueueManager() {
|
||||
// for backwards compatibility
|
||||
IStepQueueManager mgr= getStepQueueMgr();
|
||||
if (mgr != null) {
|
||||
return mgr;
|
||||
}
|
||||
return getSteppingController();
|
||||
}
|
||||
|
||||
/**
|
||||
* @since 1.1
|
||||
|
@ -95,7 +74,7 @@ public abstract class DsfCommandRunnable extends DsfRunnable {
|
|||
}
|
||||
if (getContext() == null) {
|
||||
fRequest.setStatus(makeError("Selected object does not support run control.", null)); //$NON-NLS-1$
|
||||
} else if (getRunControl() == null || getStepQueueManager() == null) {
|
||||
} else if (getRunControl() == null || getSteppingController() == null) {
|
||||
fRequest.setStatus(makeError("Run Control not available", null)); //$NON-NLS-1$
|
||||
} else {
|
||||
doExecute();
|
||||
|
|
|
@ -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
|
||||
|
@ -15,6 +15,7 @@ import org.eclipse.cdt.dsf.concurrent.DsfExecutor;
|
|||
import org.eclipse.cdt.dsf.concurrent.ImmediateExecutor;
|
||||
import org.eclipse.cdt.dsf.concurrent.Immutable;
|
||||
import org.eclipse.cdt.dsf.debug.service.IRunControl.StepType;
|
||||
import org.eclipse.cdt.dsf.debug.ui.viewmodel.SteppingController;
|
||||
import org.eclipse.cdt.dsf.internal.ui.DsfUIPlugin;
|
||||
import org.eclipse.cdt.dsf.service.DsfServicesTracker;
|
||||
import org.eclipse.cdt.dsf.service.DsfSession;
|
||||
|
@ -53,7 +54,13 @@ public class DsfStepIntoCommand implements IStepIntoHandler {
|
|||
final StepType stepType= getStepType();
|
||||
fExecutor.submit(new DsfCommandRunnable(fTracker, request.getElements()[0], request) {
|
||||
@Override public void doExecute() {
|
||||
getStepQueueManager().canEnqueueStep(
|
||||
SteppingController steppingControl = getSteppingController();
|
||||
if (steppingControl == null) {
|
||||
request.setEnabled(false);
|
||||
request.done();
|
||||
return;
|
||||
}
|
||||
steppingControl.canEnqueueStep(
|
||||
getContext(), stepType,
|
||||
new DataRequestMonitor<Boolean>(ImmediateExecutor.getInstance(), null) {
|
||||
@Override
|
||||
|
@ -75,7 +82,7 @@ public class DsfStepIntoCommand implements IStepIntoHandler {
|
|||
final StepType stepType= getStepType();
|
||||
fExecutor.submit(new DsfCommandRunnable(fTracker, request.getElements()[0], request) {
|
||||
@Override public void doExecute() {
|
||||
getStepQueueManager().enqueueStep(getContext(), stepType);
|
||||
getSteppingController().enqueueStep(getContext(), stepType);
|
||||
}
|
||||
});
|
||||
return true;
|
||||
|
|
|
@ -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
|
||||
|
@ -15,6 +15,7 @@ import org.eclipse.cdt.dsf.concurrent.DsfExecutor;
|
|||
import org.eclipse.cdt.dsf.concurrent.ImmediateExecutor;
|
||||
import org.eclipse.cdt.dsf.concurrent.Immutable;
|
||||
import org.eclipse.cdt.dsf.debug.service.IRunControl.StepType;
|
||||
import org.eclipse.cdt.dsf.debug.ui.viewmodel.SteppingController;
|
||||
import org.eclipse.cdt.dsf.internal.ui.DsfUIPlugin;
|
||||
import org.eclipse.cdt.dsf.service.DsfServicesTracker;
|
||||
import org.eclipse.cdt.dsf.service.DsfSession;
|
||||
|
@ -53,7 +54,13 @@ public class DsfStepOverCommand implements IStepOverHandler {
|
|||
fExecutor.submit(new DsfCommandRunnable(fTracker, request.getElements()[0], request) {
|
||||
final StepType stepType= getStepType();
|
||||
@Override public void doExecute() {
|
||||
getStepQueueManager().canEnqueueStep(
|
||||
SteppingController steppingControl = getSteppingController();
|
||||
if (steppingControl == null) {
|
||||
request.setEnabled(false);
|
||||
request.done();
|
||||
return;
|
||||
}
|
||||
steppingControl.canEnqueueStep(
|
||||
getContext(), stepType,
|
||||
new DataRequestMonitor<Boolean>(ImmediateExecutor.getInstance(), null) {
|
||||
@Override
|
||||
|
@ -75,7 +82,7 @@ public class DsfStepOverCommand implements IStepOverHandler {
|
|||
final StepType stepType= getStepType();
|
||||
fExecutor.submit(new DsfCommandRunnable(fTracker, request.getElements()[0], request) {
|
||||
@Override public void doExecute() {
|
||||
getStepQueueManager().enqueueStep(getContext(), stepType);
|
||||
getSteppingController().enqueueStep(getContext(), stepType);
|
||||
}
|
||||
});
|
||||
return true;
|
||||
|
|
|
@ -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
|
||||
|
@ -15,6 +15,7 @@ import org.eclipse.cdt.dsf.concurrent.DsfExecutor;
|
|||
import org.eclipse.cdt.dsf.concurrent.ImmediateExecutor;
|
||||
import org.eclipse.cdt.dsf.concurrent.Immutable;
|
||||
import org.eclipse.cdt.dsf.debug.service.IRunControl.StepType;
|
||||
import org.eclipse.cdt.dsf.debug.ui.viewmodel.SteppingController;
|
||||
import org.eclipse.cdt.dsf.internal.ui.DsfUIPlugin;
|
||||
import org.eclipse.cdt.dsf.service.DsfServicesTracker;
|
||||
import org.eclipse.cdt.dsf.service.DsfSession;
|
||||
|
@ -50,7 +51,13 @@ public class DsfStepReturnCommand implements IStepReturnHandler {
|
|||
|
||||
fExecutor.submit(new DsfCommandRunnable(fTracker, request.getElements()[0], request) {
|
||||
@Override public void doExecute() {
|
||||
getStepQueueManager().canEnqueueStep(
|
||||
SteppingController steppingControl = getSteppingController();
|
||||
if (steppingControl == null) {
|
||||
request.setEnabled(false);
|
||||
request.done();
|
||||
return;
|
||||
}
|
||||
steppingControl.canEnqueueStep(
|
||||
getContext(), StepType.STEP_RETURN,
|
||||
new DataRequestMonitor<Boolean>(ImmediateExecutor.getInstance(), null) {
|
||||
@Override
|
||||
|
@ -71,7 +78,7 @@ public class DsfStepReturnCommand implements IStepReturnHandler {
|
|||
|
||||
fExecutor.submit(new DsfCommandRunnable(fTracker, request.getElements()[0], request) {
|
||||
@Override public void doExecute() {
|
||||
getStepQueueManager().enqueueStep(getContext(), StepType.STEP_RETURN);
|
||||
getSteppingController().enqueueStep(getContext(), StepType.STEP_RETURN);
|
||||
}
|
||||
});
|
||||
return true;
|
||||
|
|
|
@ -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
|
||||
|
@ -30,7 +30,6 @@ import org.eclipse.cdt.dsf.datamodel.DMContexts;
|
|||
import org.eclipse.cdt.dsf.datamodel.IDMContext;
|
||||
import org.eclipse.cdt.dsf.debug.service.IRunControl;
|
||||
import org.eclipse.cdt.dsf.debug.service.IStack;
|
||||
import org.eclipse.cdt.dsf.debug.service.StepQueueManager;
|
||||
import org.eclipse.cdt.dsf.debug.service.IRunControl.IExecutionDMContext;
|
||||
import org.eclipse.cdt.dsf.debug.service.IRunControl.StateChangeReason;
|
||||
import org.eclipse.cdt.dsf.debug.service.IStack.IFrameDMContext;
|
||||
|
@ -784,11 +783,6 @@ public class DsfSourceDisplayAdapter implements ISourceDisplay, ISteppingControl
|
|||
startAnnotationClearingJob(e.getDMContext());
|
||||
}
|
||||
|
||||
@DsfServiceEventHandler
|
||||
public void eventDispatched(StepQueueManager.ISteppingTimedOutEvent e) {
|
||||
startAnnotationClearingJob(e.getDMContext());
|
||||
}
|
||||
|
||||
@DsfServiceEventHandler
|
||||
public void eventDispatched(final IRunControl.ISuspendedDMEvent e) {
|
||||
updateStepTiming();
|
||||
|
|
|
@ -27,7 +27,6 @@ import org.eclipse.cdt.dsf.concurrent.RequestMonitor;
|
|||
import org.eclipse.cdt.dsf.datamodel.AbstractDMEvent;
|
||||
import org.eclipse.cdt.dsf.datamodel.DMContexts;
|
||||
import org.eclipse.cdt.dsf.debug.service.IRunControl;
|
||||
import org.eclipse.cdt.dsf.debug.service.IStepQueueManager;
|
||||
import org.eclipse.cdt.dsf.debug.service.IRunControl.IExecutionDMContext;
|
||||
import org.eclipse.cdt.dsf.debug.service.IRunControl.IResumedDMEvent;
|
||||
import org.eclipse.cdt.dsf.debug.service.IRunControl.ISuspendedDMEvent;
|
||||
|
@ -53,7 +52,7 @@ import org.eclipse.jface.util.PropertyChangeEvent;
|
|||
*
|
||||
* @since 1.1
|
||||
*/
|
||||
public final class SteppingController implements IStepQueueManager
|
||||
public final class SteppingController
|
||||
{
|
||||
/**
|
||||
* Amount of time in milliseconds, that it takes the SteppingTimedOutEvent
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2008 Wind River Systems, Inc. and others.
|
||||
* Copyright (c) 2008, 2009 Wind River Systems, Inc. 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
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Anton Leherbauer (Wind River Systems) - initial API and implementation
|
||||
* Wind River Systems - initial API and implementation
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.dsf.debug.ui.viewmodel.launch;
|
||||
|
||||
|
@ -24,7 +24,6 @@ import org.eclipse.cdt.dsf.debug.service.IRunControl.IContainerResumedDMEvent;
|
|||
import org.eclipse.cdt.dsf.debug.service.IRunControl.IContainerSuspendedDMEvent;
|
||||
import org.eclipse.cdt.dsf.debug.service.IRunControl.IExitedDMEvent;
|
||||
import org.eclipse.cdt.dsf.debug.service.IRunControl.IStartedDMEvent;
|
||||
import org.eclipse.cdt.dsf.debug.service.StepQueueManager.ISteppingTimedOutEvent;
|
||||
import org.eclipse.cdt.dsf.debug.ui.viewmodel.SteppingController.SteppingTimedOutEvent;
|
||||
import org.eclipse.cdt.dsf.service.DsfSession;
|
||||
import org.eclipse.cdt.dsf.ui.viewmodel.IVMContext;
|
||||
|
@ -95,11 +94,6 @@ public abstract class AbstractContainerVMNode extends AbstractDMVMNode implement
|
|||
{
|
||||
return IModelDelta.CONTENT;
|
||||
}
|
||||
} else if (e instanceof ISteppingTimedOutEvent) {
|
||||
if (dmc instanceof IContainerDMContext)
|
||||
{
|
||||
return IModelDelta.CONTENT;
|
||||
}
|
||||
} else if (e instanceof IExitedDMEvent) {
|
||||
return IModelDelta.CONTENT;
|
||||
} else if (e instanceof IStartedDMEvent) {
|
||||
|
@ -146,15 +140,6 @@ public abstract class AbstractContainerVMNode extends AbstractDMVMNode implement
|
|||
if (dmc instanceof IContainerDMContext) {
|
||||
parentDelta.addNode(createVMContext(dmc), IModelDelta.CONTENT);
|
||||
}
|
||||
} else if (e instanceof ISteppingTimedOutEvent) {
|
||||
// Stepping time-out indicates that a step operation is taking
|
||||
// a long time, and the view needs to be refreshed to show
|
||||
// the user that the program is running.
|
||||
// If the step was issued for the whole container refresh
|
||||
// the whole container.
|
||||
if (dmc instanceof IContainerDMContext) {
|
||||
parentDelta.addNode(createVMContext(dmc), IModelDelta.CONTENT);
|
||||
}
|
||||
} else if (e instanceof IExitedDMEvent) {
|
||||
// An exited event could either be for a thread within a container
|
||||
// or for the container itself.
|
||||
|
|
|
@ -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
|
||||
|
@ -28,7 +28,6 @@ import org.eclipse.cdt.dsf.debug.service.IRunControl.IContainerSuspendedDMEvent;
|
|||
import org.eclipse.cdt.dsf.debug.service.IRunControl.IExecutionDMContext;
|
||||
import org.eclipse.cdt.dsf.debug.service.IRunControl.IResumedDMEvent;
|
||||
import org.eclipse.cdt.dsf.debug.service.IRunControl.ISuspendedDMEvent;
|
||||
import org.eclipse.cdt.dsf.debug.service.StepQueueManager.ISteppingTimedOutEvent;
|
||||
import org.eclipse.cdt.dsf.debug.ui.viewmodel.SteppingController.SteppingTimedOutEvent;
|
||||
import org.eclipse.cdt.dsf.internal.ui.DsfUIPlugin;
|
||||
import org.eclipse.cdt.dsf.service.DsfSession;
|
||||
|
@ -124,15 +123,6 @@ public abstract class AbstractThreadVMNode extends AbstractDMVMNode
|
|||
rm.setStatus(new Status(IStatus.ERROR, DsfUIPlugin.PLUGIN_ID, IDsfStatusConstants.NOT_SUPPORTED, "", null)); //$NON-NLS-1$
|
||||
rm.done();
|
||||
return;
|
||||
} else if (e instanceof ISteppingTimedOutEvent &&
|
||||
((ISteppingTimedOutEvent)e).getDMContext() instanceof IContainerDMContext)
|
||||
{
|
||||
// The timed out event occured on a container and not on a thread. Do not
|
||||
// return a context for this event, which will force the view model to generate
|
||||
// a delta for all the threads.
|
||||
rm.setStatus(new Status(IStatus.ERROR, DsfUIPlugin.PLUGIN_ID, IDsfStatusConstants.NOT_SUPPORTED, "", null)); //$NON-NLS-1$
|
||||
rm.done();
|
||||
return;
|
||||
} else if (e instanceof FullStackRefreshEvent &&
|
||||
((FullStackRefreshEvent)e).getDMContext() instanceof IContainerDMContext)
|
||||
{
|
||||
|
@ -246,8 +236,6 @@ public abstract class AbstractThreadVMNode extends AbstractDMVMNode
|
|||
return IModelDelta.CONTENT;
|
||||
} else if (e instanceof SteppingTimedOutEvent) {
|
||||
return IModelDelta.CONTENT;
|
||||
} else if (e instanceof ISteppingTimedOutEvent) {
|
||||
return IModelDelta.CONTENT;
|
||||
} else if (e instanceof ModelProxyInstalledEvent) {
|
||||
return IModelDelta.SELECT | IModelDelta.EXPAND;
|
||||
}
|
||||
|
@ -291,12 +279,6 @@ public abstract class AbstractThreadVMNode extends AbstractDMVMNode
|
|||
// the user that the program is running.
|
||||
parentDelta.addNode(createVMContext(dmc), IModelDelta.CONTENT);
|
||||
rm.done();
|
||||
} else if (e instanceof ISteppingTimedOutEvent) {
|
||||
// Stepping time-out indicates that a step operation is taking
|
||||
// a long time, and the view needs to be refreshed to show
|
||||
// the user that the program is running.
|
||||
parentDelta.addNode(createVMContext(dmc), IModelDelta.CONTENT);
|
||||
rm.done();
|
||||
} else if (e instanceof ModelProxyInstalledEvent) {
|
||||
// Model Proxy install event is generated when the model is first
|
||||
// populated into the view. This happens when a new debug session
|
||||
|
|
|
@ -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.debug.service.IRunControl.IExitedDMEvent;
|
|||
import org.eclipse.cdt.dsf.debug.service.IRunControl.ISuspendedDMEvent;
|
||||
import org.eclipse.cdt.dsf.debug.service.IStack.IFrameDMContext;
|
||||
import org.eclipse.cdt.dsf.debug.service.IStack.IFrameDMData;
|
||||
import org.eclipse.cdt.dsf.debug.service.StepQueueManager.ISteppingTimedOutEvent;
|
||||
import org.eclipse.cdt.dsf.debug.ui.IDsfDebugUIConstants;
|
||||
import org.eclipse.cdt.dsf.debug.ui.viewmodel.SteppingController;
|
||||
import org.eclipse.cdt.dsf.debug.ui.viewmodel.SteppingController.SteppingTimedOutEvent;
|
||||
|
@ -425,8 +424,6 @@ public class StackFramesVMNode extends AbstractDMVMNode
|
|||
return IModelDelta.CONTENT | IModelDelta.EXPAND;
|
||||
} else if (e instanceof SteppingTimedOutEvent) {
|
||||
return IModelDelta.CONTENT;
|
||||
} else if (e instanceof ISteppingTimedOutEvent) {
|
||||
return IModelDelta.CONTENT;
|
||||
} else if (e instanceof ModelProxyInstalledEvent) {
|
||||
return IModelDelta.SELECT | IModelDelta.EXPAND;
|
||||
} else if (e instanceof ExpandStackEvent) {
|
||||
|
@ -479,8 +476,6 @@ public class StackFramesVMNode extends AbstractDMVMNode
|
|||
buildDeltaForSuspendedEvent(execDmc, execDmc, parent, nodeOffset, rm);
|
||||
} else if (e instanceof SteppingTimedOutEvent) {
|
||||
buildDeltaForSteppingTimedOutEvent((SteppingTimedOutEvent)e, parent, nodeOffset, rm);
|
||||
} else if (e instanceof ISteppingTimedOutEvent) {
|
||||
buildDeltaForSteppingTimedOutEvent((ISteppingTimedOutEvent)e, parent, nodeOffset, rm);
|
||||
} else if (e instanceof ModelProxyInstalledEvent) {
|
||||
buildDeltaForModelProxyInstalledEvent(parent, nodeOffset, rm);
|
||||
} else if (e instanceof ExpandStackEvent) {
|
||||
|
@ -562,12 +557,6 @@ public class StackFramesVMNode extends AbstractDMVMNode
|
|||
rm.done();
|
||||
}
|
||||
|
||||
private void buildDeltaForSteppingTimedOutEvent(final ISteppingTimedOutEvent e, final VMDelta parentDelta, final int nodeOffset, final RequestMonitor rm) {
|
||||
// Repaint the stack frame images to have the running symbol.
|
||||
//parentDelta.setFlags(parentDelta.getFlags() | IModelDelta.CONTENT);
|
||||
rm.done();
|
||||
}
|
||||
|
||||
private void buildDeltaForModelProxyInstalledEvent(final VMDelta parentDelta, final int nodeOffset, final RequestMonitor rm) {
|
||||
// Retrieve the list of stack frames, and mark the top frame to be selected.
|
||||
getVMProvider().updateNode(
|
||||
|
|
|
@ -1,42 +0,0 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2008 Wind River Systems, Inc. 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
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Wind River Systems - initial API and implementation
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.dsf.debug.service;
|
||||
|
||||
import org.eclipse.cdt.dsf.concurrent.ConfinedToDsfExecutor;
|
||||
import org.eclipse.cdt.dsf.concurrent.DataRequestMonitor;
|
||||
import org.eclipse.cdt.dsf.debug.service.IRunControl.IExecutionDMContext;
|
||||
import org.eclipse.cdt.dsf.debug.service.IRunControl.StepType;
|
||||
import org.eclipse.cdt.dsf.service.DsfSession;
|
||||
|
||||
/**
|
||||
* @since 1.1
|
||||
*/
|
||||
@ConfinedToDsfExecutor("getSession().getExecutor()")
|
||||
public interface IStepQueueManager {
|
||||
|
||||
/**
|
||||
* Returns the session for which this step queue manager is used.
|
||||
*/
|
||||
public DsfSession getSession();
|
||||
|
||||
/**
|
||||
* Checks whether a step command can be queued up for given context.
|
||||
*/
|
||||
public abstract void canEnqueueStep(IExecutionDMContext execCtx, StepType stepType, DataRequestMonitor<Boolean> rm);
|
||||
|
||||
/**
|
||||
* Adds a step command to the execution queue for given context.
|
||||
* @param execCtx Execution context that should perform the step.
|
||||
* @param stepType Type of step to execute.
|
||||
*/
|
||||
public abstract void enqueueStep(final IExecutionDMContext execCtx, final StepType stepType);
|
||||
|
||||
}
|
|
@ -1,248 +0,0 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2006, 2008 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
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Wind River Systems - initial API and implementation
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.dsf.debug.service;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Hashtable;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.ScheduledFuture;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import org.eclipse.cdt.dsf.concurrent.DataRequestMonitor;
|
||||
import org.eclipse.cdt.dsf.concurrent.DsfRunnable;
|
||||
import org.eclipse.cdt.dsf.concurrent.RequestMonitor;
|
||||
import org.eclipse.cdt.dsf.datamodel.DMContexts;
|
||||
import org.eclipse.cdt.dsf.datamodel.IDMEvent;
|
||||
import org.eclipse.cdt.dsf.debug.service.IRunControl.IExecutionDMContext;
|
||||
import org.eclipse.cdt.dsf.debug.service.IRunControl.IResumedDMEvent;
|
||||
import org.eclipse.cdt.dsf.debug.service.IRunControl.ISuspendedDMEvent;
|
||||
import org.eclipse.cdt.dsf.debug.service.IRunControl.StateChangeReason;
|
||||
import org.eclipse.cdt.dsf.debug.service.IRunControl.StepType;
|
||||
import org.eclipse.cdt.dsf.internal.DsfPlugin;
|
||||
import org.eclipse.cdt.dsf.service.AbstractDsfService;
|
||||
import org.eclipse.cdt.dsf.service.DsfServiceEventHandler;
|
||||
import org.eclipse.cdt.dsf.service.DsfSession;
|
||||
import org.osgi.framework.BundleContext;
|
||||
|
||||
/**
|
||||
* This service builds on top of standard run control service to provide
|
||||
* step queuing functionality. Step queuing essentially allows user to press
|
||||
* and hold the step key and achieve maximum stepping speed. If this service
|
||||
* is used, other service implementations, such as stack and expressions, can
|
||||
* use it to avoid requesting data from debugger back end if another step is
|
||||
* about to be executed.
|
||||
*
|
||||
* @deprecated The functionality has been integrated in the UI layer.
|
||||
*/
|
||||
@Deprecated
|
||||
public class StepQueueManager extends AbstractDsfService implements IStepQueueManager
|
||||
{
|
||||
/**
|
||||
* Amount of time in milliseconds, that it takes the ISteppingTimedOutEvent
|
||||
* event to be issued after a step is started.
|
||||
* @see ISteppingTimedOutEvent
|
||||
*/
|
||||
public final static int STEPPING_TIMEOUT = 500;
|
||||
|
||||
/**
|
||||
* The depth of the step queue. In other words, the maximum number of steps
|
||||
* that are queued before the step queue manager throwing them away.
|
||||
*/
|
||||
public final static int STEP_QUEUE_DEPTH = 3;
|
||||
|
||||
/**
|
||||
* Indicates that the given context has been stepping for some time,
|
||||
* and the UI (views and actions) may need to be updated accordingly.
|
||||
*/
|
||||
public interface ISteppingTimedOutEvent extends IDMEvent<IExecutionDMContext> {}
|
||||
|
||||
|
||||
private static class StepRequest {
|
||||
StepType fStepType;
|
||||
StepRequest(StepType type) {
|
||||
fStepType = type;
|
||||
}
|
||||
}
|
||||
|
||||
private IRunControl fRunControl;
|
||||
private int fQueueDepth = STEP_QUEUE_DEPTH;
|
||||
private Map<IExecutionDMContext,List<StepRequest>> fStepQueues = new HashMap<IExecutionDMContext,List<StepRequest>>();
|
||||
private Map<IExecutionDMContext,Boolean> fTimedOutFlags = new HashMap<IExecutionDMContext,Boolean>();
|
||||
private Map<IExecutionDMContext,ScheduledFuture<?>> fTimedOutFutures = new HashMap<IExecutionDMContext,ScheduledFuture<?>>();
|
||||
|
||||
public StepQueueManager(DsfSession session) {
|
||||
super(session);
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// IDsfService
|
||||
@Override
|
||||
public void initialize(final RequestMonitor requestMonitor) {
|
||||
super.initialize(
|
||||
new RequestMonitor(getExecutor(), requestMonitor) {
|
||||
@Override
|
||||
protected void handleSuccess() {
|
||||
doInitialize(requestMonitor);
|
||||
}});
|
||||
}
|
||||
|
||||
private void doInitialize(final RequestMonitor requestMonitor) {
|
||||
fRunControl = getServicesTracker().getService(IRunControl.class);
|
||||
|
||||
getSession().addServiceEventListener(this, null);
|
||||
register(new String[]{ StepQueueManager.class.getName()}, new Hashtable<String,String>());
|
||||
requestMonitor.done();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void shutdown(final RequestMonitor requestMonitor) {
|
||||
unregister();
|
||||
getSession().removeServiceEventListener(this);
|
||||
super.shutdown(requestMonitor);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected BundleContext getBundleContext() {
|
||||
return DsfPlugin.getBundleContext();
|
||||
}
|
||||
|
||||
/*
|
||||
* @see org.eclipse.cdt.dsf.debug.service.IStepQueueManager#canEnqueueStep(org.eclipse.cdt.dsf.debug.service.IRunControl.IExecutionDMContext, org.eclipse.cdt.dsf.debug.service.IRunControl.StepType, org.eclipse.cdt.dsf.concurrent.DataRequestMonitor)
|
||||
*/
|
||||
public void canEnqueueStep(IExecutionDMContext execCtx, StepType stepType, DataRequestMonitor<Boolean> rm) {
|
||||
if (doCanEnqueueStep(execCtx, stepType)) {
|
||||
rm.setData(true);
|
||||
rm.done();
|
||||
} else {
|
||||
fRunControl.canStep(execCtx, stepType, rm);
|
||||
}
|
||||
}
|
||||
|
||||
private boolean doCanEnqueueStep(IExecutionDMContext execCtx, StepType stepType) {
|
||||
return fRunControl.isStepping(execCtx) && !isSteppingTimedOut(execCtx);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the number of step commands that are queued for given execution
|
||||
* context.
|
||||
*/
|
||||
public int getPendingStepCount(IExecutionDMContext execCtx) {
|
||||
List<StepRequest> stepQueue = fStepQueues.get(execCtx);
|
||||
if (stepQueue == null) return 0;
|
||||
return stepQueue.size();
|
||||
}
|
||||
|
||||
/*
|
||||
* @see org.eclipse.cdt.dsf.debug.service.IStepQueueManager#enqueueStep(org.eclipse.cdt.dsf.debug.service.IRunControl.IExecutionDMContext, org.eclipse.cdt.dsf.debug.service.IRunControl.StepType)
|
||||
*/
|
||||
public void enqueueStep(final IExecutionDMContext execCtx, final StepType stepType) {
|
||||
fRunControl.canStep(
|
||||
execCtx, stepType, new DataRequestMonitor<Boolean>(getExecutor(), null) {
|
||||
@Override
|
||||
protected void handleCompleted() {
|
||||
if (isSuccess() && getData()) {
|
||||
fRunControl.step(execCtx, stepType, new RequestMonitor(getExecutor(), null));
|
||||
} else if (doCanEnqueueStep(execCtx, stepType)) {
|
||||
List<StepRequest> stepQueue = fStepQueues.get(execCtx);
|
||||
if (stepQueue == null) {
|
||||
stepQueue = new LinkedList<StepRequest>();
|
||||
fStepQueues.put(execCtx, stepQueue);
|
||||
}
|
||||
if (stepQueue.size() < fQueueDepth) {
|
||||
stepQueue.add(new StepRequest(stepType));
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns whether the step instruction for the given context has timed out.
|
||||
*/
|
||||
public boolean isSteppingTimedOut(IExecutionDMContext execCtx) {
|
||||
for (IExecutionDMContext timedOutCtx : fTimedOutFlags.keySet()) {
|
||||
if (execCtx.equals(timedOutCtx) || DMContexts.isAncestorOf(execCtx, timedOutCtx)) {
|
||||
return fTimedOutFlags.get(timedOutCtx);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@DsfServiceEventHandler
|
||||
public void eventDispatched(final ISuspendedDMEvent e) {
|
||||
// Take care of the stepping time out
|
||||
fTimedOutFlags.remove(e.getDMContext());
|
||||
ScheduledFuture<?> future = fTimedOutFutures.remove(e.getDMContext());
|
||||
if (future != null) future.cancel(false);
|
||||
|
||||
// Check if there's a step pending, if so execute it
|
||||
if (fStepQueues.containsKey(e.getDMContext())) {
|
||||
List<StepRequest> queue = fStepQueues.get(e.getDMContext());
|
||||
final StepRequest request = queue.remove(queue.size() - 1);
|
||||
if (queue.isEmpty()) fStepQueues.remove(e.getDMContext());
|
||||
fRunControl.canStep(
|
||||
e.getDMContext(), request.fStepType,
|
||||
new DataRequestMonitor<Boolean>(getExecutor(), null) {
|
||||
@Override
|
||||
protected void handleCompleted() {
|
||||
if (isSuccess() && getData()) {
|
||||
fRunControl.step(
|
||||
e.getDMContext(), request.fStepType, new RequestMonitor(getExecutor(), null));
|
||||
} else {
|
||||
// For whatever reason we can't step anymore, so clear out
|
||||
// the step queue.
|
||||
fStepQueues.remove(e.getDMContext());
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@DsfServiceEventHandler
|
||||
public void eventDispatched(final IResumedDMEvent e) {
|
||||
if (e.getReason().equals(StateChangeReason.STEP)) {
|
||||
fTimedOutFlags.put(e.getDMContext(), Boolean.FALSE);
|
||||
// We shouldn't have a stepping timeout running unless we get two
|
||||
// stepping events in a row without a suspended, which would be a
|
||||
// protocol error.
|
||||
assert !fTimedOutFutures.containsKey(e.getDMContext());
|
||||
fTimedOutFutures.put(
|
||||
e.getDMContext(),
|
||||
getExecutor().schedule(
|
||||
new DsfRunnable() { public void run() {
|
||||
fTimedOutFutures.remove(e.getDMContext());
|
||||
|
||||
if (getSession().isActive()) {
|
||||
// Issue the stepping time-out event.
|
||||
getSession().dispatchEvent(
|
||||
new ISteppingTimedOutEvent() {
|
||||
public IExecutionDMContext getDMContext() { return e.getDMContext(); }
|
||||
},
|
||||
getProperties());
|
||||
}
|
||||
}},
|
||||
STEPPING_TIMEOUT, TimeUnit.MILLISECONDS)
|
||||
);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@DsfServiceEventHandler
|
||||
public void eventDispatched(ISteppingTimedOutEvent e) {
|
||||
fTimedOutFlags.put(e.getDMContext(), Boolean.TRUE);
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Reference in a new issue