本文整理汇总了Java中org.eclipse.jdt.internal.debug.core.model.JDIThread类的典型用法代码示例。如果您正苦于以下问题:Java JDIThread类的具体用法?Java JDIThread怎么用?Java JDIThread使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
JDIThread类属于org.eclipse.jdt.internal.debug.core.model包,在下文中一共展示了JDIThread类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: clearState
import org.eclipse.jdt.internal.debug.core.model.JDIThread; //导入依赖的package包/类
@Override
public void clearState(ThreadReference thread) {
if (debugTarget != null) {
synchronized (threadMap) {
JDIThread jdiThread = threadMap.get(thread);
if (jdiThread != null) {
try {
jdiThread.terminateEvaluation();
} catch (DebugException e) {
logger.warning(String.format("Error stopping evalutoin on thread %d: %s", thread.uniqueID(),
e.toString()));
}
threadMap.remove(thread);
}
}
}
}
示例2: newThread
import org.eclipse.jdt.internal.debug.core.model.JDIThread; //导入依赖的package包/类
@Override
protected JDIThread newThread(final ThreadReference reference)
{
try
{
// no need to track system threads
if (!jdiManager().modelFilter().acceptsThread(reference))
{
return new JDIThread(this, reference);
}
return new JiveThread(this, reference);
}
catch (final ObjectCollectedException exception)
{
// ObjectCollectionException can be thrown if the thread has already
// completed (exited) in the VM.
}
return null;
}
示例3: handleMethodEvent
import org.eclipse.jdt.internal.debug.core.model.JDIThread; //导入依赖的package包/类
@Override
protected boolean handleMethodEvent(LocatableEvent event, Method method, JDIThread thread, boolean suspendVote) {
//System.out.println("Checking " + method.declaringType().name() + "." + method.name());
if (!method.isNative())
return true;
//System.out.println("Really checking " + method.declaringType().name() + "." + method.name());
String name = method.declaringType().name();
if (!name.startsWith("java.") && !name.startsWith("sun.")) {
//System.out.println("Killing " + method.declaringType().name() + "." + method.name());
try {
thread.stop(exceptionObj);
} catch (DebugException e) {
throw new RuntimeException(e);
}
}
return true;
}
示例4: createStackFrame
import org.eclipse.jdt.internal.debug.core.model.JDIThread; //导入依赖的package包/类
private JDIStackFrame createStackFrame(JDIThread thread, int depth) {
try {
IStackFrame[] jdiStackFrames = thread.getStackFrames();
return jdiStackFrames.length > depth ? (JDIStackFrame) jdiStackFrames[depth] : null;
} catch (DebugException e) {
return null;
}
}
示例5: getMockJDIThread
import org.eclipse.jdt.internal.debug.core.model.JDIThread; //导入依赖的package包/类
private JDIThread getMockJDIThread(ThreadReference thread) {
synchronized (threadMap) {
return threadMap.computeIfAbsent(thread, threadKey -> new JDIThread(debugTarget, thread) {
@Override
protected synchronized void invokeComplete(int restoreTimeout) {
super.invokeComplete(restoreTimeout);
context.getStackFrameManager().reloadStackFrames(thread);
}
});
}
}