Hi,
I would like to know if it is possible to get the status of thread currently selected (Resume/Suspend/Terminate) from Launch view?
I tried out by registering to IDebugContextListener. In case
where multiple threads are listed, while switching between the threads, debugContextChanged(DebugContextEvent
event) , gets invoked.
From the event we get the TreeSelection, and I managed to
get the thread id from it as below:
if(event.getContext() instanceof IStructuredSeletion){
IStructuredSelection
selection = (IStructuredSelection) event.getContext();
Object obj =
selection.getFirstElement();
if (obj instanceof IDMVMContext) {
IDMContext
dmContext = = ((IDMVMContext) obj).getDMContext();
if (dmContext instanceof
IMIExecutionDMContext) {
IMIExecutionDMContext
execContext = (IMIExecutionDMContext) dmContext;
execContext.getThreadId());
// returns the currently selected thread id of stackframe
}
}
}
Kindly let me know if it is possible to get the status of
thread (running/suspended/terminated)
Or if there is any other better method?
Thanks in advance,
Malu