本文整理汇总了Java中com.intellij.debugger.engine.events.SuspendContextCommandImpl.getSuspendContext方法的典型用法代码示例。如果您正苦于以下问题:Java SuspendContextCommandImpl.getSuspendContext方法的具体用法?Java SuspendContextCommandImpl.getSuspendContext怎么用?Java SuspendContextCommandImpl.getSuspendContext使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.intellij.debugger.engine.events.SuspendContextCommandImpl
的用法示例。
在下文中一共展示了SuspendContextCommandImpl.getSuspendContext方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: handleEvent
import com.intellij.debugger.engine.events.SuspendContextCommandImpl; //导入方法依赖的package包/类
private void handleEvent(@NotNull SuspendContextCommandImpl action, @NotNull LocatableEvent event)
{
try
{
SuspendContextImpl suspendContext = action.getSuspendContext();
if(suspendContext != null)
{
final MemoryViewDebugProcessData data = suspendContext.getDebugProcess().getUserData(MemoryViewDebugProcessData.KEY);
ObjectReference thisRef = getThisObject(suspendContext, event);
if(thisRef.referenceType().name().equals(myClassName) && data != null)
{
thisRef.disableCollection();
myTrackedObjects.add(thisRef);
data.getTrackedStacks().addStack(thisRef, StackFrameItem.createFrames(suspendContext, false));
}
}
}
catch(EvaluateException ignored)
{
}
if(myTrackedObjects.size() >= TRACKED_INSTANCES_LIMIT)
{
disable();
}
}
示例2: processLocatableEvent
import com.intellij.debugger.engine.events.SuspendContextCommandImpl; //导入方法依赖的package包/类
@Override
public boolean processLocatableEvent(SuspendContextCommandImpl action, LocatableEvent event) throws EventProcessingException
{
boolean res = super.processLocatableEvent(action, event);
if(res && myHint != null && myHint.isResetIgnoreFilters())
{
SuspendContextImpl context = action.getSuspendContext();
if(context != null)
{
DebugProcessImpl process = context.getDebugProcess();
process.checkPositionNotFiltered(context.getThread(), f -> process.getSession().resetIgnoreStepFiltersFlag());
}
}
return res;
}
示例3: processLocatableEvent
import com.intellij.debugger.engine.events.SuspendContextCommandImpl; //导入方法依赖的package包/类
@Override
public boolean processLocatableEvent(final SuspendContextCommandImpl action, final LocatableEvent event) throws EventProcessingException {
final SuspendContextImpl context = action.getSuspendContext();
if(!isValid()) {
context.getDebugProcess().getRequestsManager().deleteRequest(this);
return false;
}
final String[] title = {DebuggerBundle.message("title.error.evaluating.breakpoint.condition") };
try {
final StackFrameProxyImpl frameProxy = context.getThread().frame(0);
if (frameProxy == null) {
// might be if the thread has been collected
return false;
}
final EvaluationContextImpl evaluationContext = new EvaluationContextImpl(
action.getSuspendContext(),
frameProxy,
getThisObject(context, event)
);
if(!evaluateCondition(evaluationContext, event)) {
return false;
}
title[0] = DebuggerBundle.message("title.error.evaluating.breakpoint.action");
runAction(evaluationContext, event);
}
catch (final EvaluateException ex) {
if(ApplicationManager.getApplication().isUnitTestMode()) {
System.out.println(ex.getMessage());
return false;
}
throw new EventProcessingException(title[0], ex.getMessage(), ex);
}
return true;
}
示例4: processLocatableEvent
import com.intellij.debugger.engine.events.SuspendContextCommandImpl; //导入方法依赖的package包/类
@Override
public boolean processLocatableEvent(SuspendContextCommandImpl action, LocatableEvent event) throws EventProcessingException
{
SuspendContextImpl context = action.getSuspendContext();
if(!isValid())
{
context.getDebugProcess().getRequestsManager().deleteRequest(this);
return false;
}
String title = DebuggerBundle.message("title.error.evaluating.breakpoint.condition");
try
{
StackFrameProxyImpl frameProxy = context.getThread().frame(0);
if(frameProxy == null)
{
// might be if the thread has been collected
return false;
}
EvaluationContextImpl evaluationContext = new EvaluationContextImpl(context, frameProxy, getThisObject(context, event));
if(!evaluateCondition(evaluationContext, event))
{
return false;
}
title = DebuggerBundle.message("title.error.evaluating.breakpoint.action");
runAction(evaluationContext, event);
}
catch(final EvaluateException ex)
{
if(ApplicationManager.getApplication().isUnitTestMode())
{
System.out.println(ex.getMessage());
return false;
}
throw new EventProcessingException(title, ex.getMessage(), ex);
}
return true;
}
示例5: processLocatableEvent
import com.intellij.debugger.engine.events.SuspendContextCommandImpl; //导入方法依赖的package包/类
@Override
public boolean processLocatableEvent(SuspendContextCommandImpl action, LocatableEvent event) throws EventProcessingException
{
SuspendContextImpl suspendContext = action.getSuspendContext();
if(suspendContext != null)
{
ThreadReferenceProxyImpl thread = suspendContext.getThread();
if(thread != null)
{
DebugProcessImpl process = suspendContext.getDebugProcess();
try
{
StackFrameProxyImpl frameProxy = ContainerUtil.getFirstItem(thread.forceFrames());
if(frameProxy != null)
{
Map<Object, List<StackFrameItem>> stacks = process.getUserData(CAPTURED_STACKS);
if(stacks == null)
{
stacks = new CapturedStacksMap();
putProcessUserData(CAPTURED_STACKS, Collections.synchronizedMap(stacks), process);
}
Value key = myCaptureEvaluator.evaluate(new EvaluationContextImpl(suspendContext, frameProxy));
if(key instanceof ObjectReference)
{
List<StackFrameItem> frames = StackFrameItem.createFrames(suspendContext, true);
if(frames.size() > MAX_STACK_LENGTH)
{
frames = frames.subList(0, MAX_STACK_LENGTH);
}
stacks.put(getKey((ObjectReference) key), frames);
}
}
}
catch(EvaluateException e)
{
LOG.debug(e);
process.printToConsole(DebuggerBundle.message("error.unable.to.evaluate.capture.expression", e.getMessage()) + "\n");
}
}
}
return false;
}