diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/.settings/.api_filters b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/.settings/.api_filters deleted file mode 100644 index f17a60ee7f9..00000000000 --- a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/.settings/.api_filters +++ /dev/null @@ -1,155 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/.settings/.api_filters b/dsf-gdb/org.eclipse.cdt.dsf.gdb/.settings/.api_filters deleted file mode 100644 index 5d4626f8d7e..00000000000 --- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/.settings/.api_filters +++ /dev/null @@ -1,115 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/dsf/org.eclipse.cdt.dsf.ui/.settings/.api_filters b/dsf/org.eclipse.cdt.dsf.ui/.settings/.api_filters deleted file mode 100644 index cc3e1bff31e..00000000000 --- a/dsf/org.eclipse.cdt.dsf.ui/.settings/.api_filters +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/actions/DsfCommandRunnable.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/actions/DsfCommandRunnable.java index f370ca826a5..5e0e17dffda 100644 --- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/actions/DsfCommandRunnable.java +++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/actions/DsfCommandRunnable.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 @@ -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(); diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/actions/DsfStepIntoCommand.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/actions/DsfStepIntoCommand.java index fae6ebe8f11..ba4977fbcd8 100644 --- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/actions/DsfStepIntoCommand.java +++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/actions/DsfStepIntoCommand.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 @@ -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(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; diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/actions/DsfStepOverCommand.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/actions/DsfStepOverCommand.java index 1200b66ef7c..3dd3d5ebff0 100644 --- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/actions/DsfStepOverCommand.java +++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/actions/DsfStepOverCommand.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 @@ -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(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; diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/actions/DsfStepReturnCommand.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/actions/DsfStepReturnCommand.java index 305915fbe79..39cbd864afc 100644 --- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/actions/DsfStepReturnCommand.java +++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/actions/DsfStepReturnCommand.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 @@ -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(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; diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/sourcelookup/DsfSourceDisplayAdapter.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/sourcelookup/DsfSourceDisplayAdapter.java index fbdacbdd7a9..244f1b9b8a3 100644 --- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/sourcelookup/DsfSourceDisplayAdapter.java +++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/sourcelookup/DsfSourceDisplayAdapter.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 @@ -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(); diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/SteppingController.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/SteppingController.java index 3d566ab4ea3..9fad4686532 100644 --- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/SteppingController.java +++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/SteppingController.java @@ -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 diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/launch/AbstractContainerVMNode.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/launch/AbstractContainerVMNode.java index 26cfc2d5468..9b7ebf9b15d 100644 --- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/launch/AbstractContainerVMNode.java +++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/launch/AbstractContainerVMNode.java @@ -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. diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/launch/AbstractThreadVMNode.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/launch/AbstractThreadVMNode.java index 51f28dc57f9..3c0c7190c15 100644 --- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/launch/AbstractThreadVMNode.java +++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/launch/AbstractThreadVMNode.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 @@ -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 diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/launch/StackFramesVMNode.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/launch/StackFramesVMNode.java index d37183d630f..e5d952e04b5 100644 --- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/launch/StackFramesVMNode.java +++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/launch/StackFramesVMNode.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.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( diff --git a/dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/debug/service/IStepQueueManager.java b/dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/debug/service/IStepQueueManager.java deleted file mode 100644 index 16167692125..00000000000 --- a/dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/debug/service/IStepQueueManager.java +++ /dev/null @@ -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 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); - -} diff --git a/dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/debug/service/StepQueueManager.java b/dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/debug/service/StepQueueManager.java deleted file mode 100644 index 3054e2af136..00000000000 --- a/dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/debug/service/StepQueueManager.java +++ /dev/null @@ -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 {} - - - private static class StepRequest { - StepType fStepType; - StepRequest(StepType type) { - fStepType = type; - } - } - - private IRunControl fRunControl; - private int fQueueDepth = STEP_QUEUE_DEPTH; - private Map> fStepQueues = new HashMap>(); - private Map fTimedOutFlags = new HashMap(); - private Map> fTimedOutFutures = new HashMap>(); - - 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()); - 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 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 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(getExecutor(), null) { - @Override - protected void handleCompleted() { - if (isSuccess() && getData()) { - fRunControl.step(execCtx, stepType, new RequestMonitor(getExecutor(), null)); - } else if (doCanEnqueueStep(execCtx, stepType)) { - List stepQueue = fStepQueues.get(execCtx); - if (stepQueue == null) { - stepQueue = new LinkedList(); - 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 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(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); - } - -}