1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-09-10 12:03:16 +02:00

[159046] Got rid of IStack.isStackAvailable().

This commit is contained in:
Pawel Piech 2008-03-27 21:20:10 +00:00
parent 549cdbd6fd
commit 4f71f37d15
3 changed files with 5 additions and 17 deletions

View file

@ -58,15 +58,14 @@ public class StackFramesVMNode extends AbstractDMVMNode
@Override @Override
protected void updateHasElementsInSessionThread(IHasChildrenUpdate update) { protected void updateHasElementsInSessionThread(IHasChildrenUpdate update) {
if (!checkService(IStack.class, null, update)) return; IRunControl runControl = getServicesTracker().getService(IRunControl.class);
IExecutionDMContext execCtx = findDmcInPath(update.getViewerInput(), update.getElementPath(), IExecutionDMContext.class);
IExecutionDMContext execDmc = findDmcInPath(update.getViewerInput(), update.getElementPath(), IExecutionDMContext.class); if (runControl == null || execCtx == null) {
if (execDmc == null) {
handleFailedUpdate(update); handleFailedUpdate(update);
return; return;
} }
update.setHasChilren(getServicesTracker().getService(IStack.class).isStackAvailable(execDmc)); update.setHasChilren(runControl.isSuspended(execCtx) || runControl.isStepping(execCtx));
update.done(); update.done();
} }

View file

@ -71,11 +71,6 @@ public interface IStack extends IDMService {
*/ */
public void getVariableData(IVariableDMContext variableDmc, DataRequestMonitor<IVariableDMData> rm); public void getVariableData(IVariableDMContext variableDmc, DataRequestMonitor<IVariableDMData> rm);
/**
* Returns whether the stack frames can be retrieved for given thread.
*/
boolean isStackAvailable(IDMContext execContext);
/** /**
* Retrieves list of stack frames for the given execution context. Request * Retrieves list of stack frames for the given execution context. Request
* will fail if the stack frame data is not available. * will fail if the stack frame data is not available.

View file

@ -185,12 +185,6 @@ public class MIStack extends AbstractDsfService
return new MIFrameDMC(getSession().getId(), execDmc, level); return new MIFrameDMC(getSession().getId(), execDmc, level);
} }
public boolean isStackAvailable(IDMContext context) {
IExecutionDMContext execCtx = DMContexts.getAncestorOfType(context, IExecutionDMContext.class);
return execCtx != null && (fRunControl.isSuspended(execCtx) || (fRunControl.isStepping(execCtx)));
}
public void getFrames(final IDMContext ctx, final DataRequestMonitor<IFrameDMContext[]> rm) { public void getFrames(final IDMContext ctx, final DataRequestMonitor<IFrameDMContext[]> rm) {
final IMIExecutionDMContext execDmc = DMContexts.getAncestorOfType(ctx, IMIExecutionDMContext.class); final IMIExecutionDMContext execDmc = DMContexts.getAncestorOfType(ctx, IMIExecutionDMContext.class);