1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-21 15:23:59 +02:00

Bug 337899 - [debug view][non-stop] Process label is not updated

In non-stop mode, when the last thread of a process is resumed, the
corresponding process node icon, in the Debug View, is updated to the
"running process" one. However the node was not being automatically
refreshed, and so still showed the previous "suspended process" icon.

This fix adds the necessary Delta to refresh the process node when a
IResumedDMEvent is received.

Change-Id: Ie7d2b6aef9ae7f5906e4b54470f74ee238e13ef5
(cherry picked from commit a90d9dfbf8)
This commit is contained in:
Marc Dumais 2016-08-26 13:00:52 -04:00
parent b71a94f4f2
commit 0b6ca32767

View file

@ -32,6 +32,7 @@ import org.eclipse.cdt.dsf.debug.service.IRunControl.IExecutionDMContext;
import org.eclipse.cdt.dsf.debug.service.IRunControl.IExecutionDMData;
import org.eclipse.cdt.dsf.debug.service.IRunControl.IExecutionDMData2;
import org.eclipse.cdt.dsf.debug.service.IRunControl.IExitedDMEvent;
import org.eclipse.cdt.dsf.debug.service.IRunControl.IResumedDMEvent;
import org.eclipse.cdt.dsf.debug.service.IRunControl.IStartedDMEvent;
import org.eclipse.cdt.dsf.debug.service.IRunControl.StateChangeReason;
import org.eclipse.cdt.dsf.debug.ui.viewmodel.SteppingController.SteppingTimedOutEvent;
@ -305,7 +306,10 @@ public abstract class AbstractContainerVMNode extends AbstractExecutionContextVM
} else if (e instanceof FullStackRefreshEvent &&
(((FullStackRefreshEvent)e).getTriggeringEvent() instanceof IContainerSuspendedDMEvent)) {
return IModelDelta.CONTENT;
} else if (e instanceof IResumedDMEvent) {
return IModelDelta.STATE;
}
return IModelDelta.NO_CHANGE;
}
@ -405,7 +409,13 @@ public abstract class AbstractContainerVMNode extends AbstractExecutionContextVM
containerTriggerEvent.getTriggeringContexts(), parentDelta, nodeOffset, requestMonitor);
return;
}
}
} else if (e instanceof IResumedDMEvent) {
// update the container node label
IContainerDMContext containerCtx = DMContexts.getAncestorOfType(dmc, IContainerDMContext.class);
if (containerCtx != null) {
parentDelta.addNode(createVMContext(containerCtx), IModelDelta.STATE);
}
}
requestMonitor.done();
}