use of com.intellij.debugger.jdi.ThreadReferenceProxyImpl in project intellij-community by JetBrains.
the class ThreadDescriptorImpl method calcRepresentation.
protected String calcRepresentation(EvaluationContextImpl context, DescriptorLabelListener labelListener) throws EvaluateException {
DebuggerManagerThreadImpl.assertIsManagerThread();
ThreadReferenceProxyImpl thread = getThreadReference();
try {
myName = thread.name();
ThreadGroupReferenceProxyImpl gr = getThreadReference().threadGroupProxy();
final String grname = (gr != null) ? gr.name() : null;
final String threadStatusText = DebuggerUtilsEx.getThreadStatusText(getThreadReference().status());
//noinspection HardCodedStringLiteral
if (grname != null && !"SYSTEM".equalsIgnoreCase(grname)) {
return DebuggerBundle.message("label.thread.node.in.group", myName, thread.uniqueID(), threadStatusText, grname);
}
return DebuggerBundle.message("label.thread.node", myName, thread.uniqueID(), threadStatusText);
} catch (ObjectCollectedException e) {
return myName != null ? DebuggerBundle.message("label.thread.node.thread.collected", myName) : "";
}
}
use of com.intellij.debugger.jdi.ThreadReferenceProxyImpl in project intellij-community by JetBrains.
the class ResumeThreadAction method actionPerformed.
public void actionPerformed(final AnActionEvent e) {
DebuggerTreeNodeImpl[] selectedNode = getSelectedNodes(e.getDataContext());
final DebuggerContextImpl debuggerContext = getDebuggerContext(e.getDataContext());
final DebugProcessImpl debugProcess = debuggerContext.getDebugProcess();
if (debugProcess == null)
return;
//noinspection ConstantConditions
for (final DebuggerTreeNodeImpl debuggerTreeNode : selectedNode) {
final ThreadDescriptorImpl threadDescriptor = ((ThreadDescriptorImpl) debuggerTreeNode.getDescriptor());
if (threadDescriptor.isSuspended()) {
final ThreadReferenceProxyImpl thread = threadDescriptor.getThreadReference();
debugProcess.getManagerThread().schedule(new DebuggerCommandImpl() {
@Override
protected void action() throws Exception {
SuspendContextImpl suspendingContext = SuspendManagerUtil.getSuspendingContext(debugProcess.getSuspendManager(), thread);
if (suspendingContext != null) {
debugProcess.createResumeThreadCommand(suspendingContext, thread).run();
}
debuggerTreeNode.calcValue();
}
});
}
}
}
Aggregations