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
protected void updateHasElementsInSessionThread(IHasChildrenUpdate update) {
if (!checkService(IStack.class, null, update)) return;
IExecutionDMContext execDmc = findDmcInPath(update.getViewerInput(), update.getElementPath(), IExecutionDMContext.class);
if (execDmc == null) {
IRunControl runControl = getServicesTracker().getService(IRunControl.class);
IExecutionDMContext execCtx = findDmcInPath(update.getViewerInput(), update.getElementPath(), IExecutionDMContext.class);
if (runControl == null || execCtx == null) {
handleFailedUpdate(update);
return;
}
update.setHasChilren(getServicesTracker().getService(IStack.class).isStackAvailable(execDmc));
update.setHasChilren(runControl.isSuspended(execCtx) || runControl.isStepping(execCtx));
update.done();
}

View file

@ -71,11 +71,6 @@ public interface IStack extends IDMService {
*/
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
* 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);
}
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) {
final IMIExecutionDMContext execDmc = DMContexts.getAncestorOfType(ctx, IMIExecutionDMContext.class);