当前位置: 首页>>代码示例>>Java>>正文


Java SuspendContextCommandImpl.getSuspendContext方法代码示例

本文整理汇总了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();
	}
}
 
开发者ID:consulo,项目名称:consulo-java,代码行数:27,代码来源:ConstructorInstancesTracker.java

示例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;
}
 
开发者ID:consulo,项目名称:consulo-java,代码行数:16,代码来源:StepIntoBreakpoint.java

示例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;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:42,代码来源:Breakpoint.java

示例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;
}
 
开发者ID:consulo,项目名称:consulo-java,代码行数:45,代码来源:Breakpoint.java

示例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;
}
 
开发者ID:consulo,项目名称:consulo-java,代码行数:44,代码来源:StackCapturingLineBreakpoint.java


注:本文中的com.intellij.debugger.engine.events.SuspendContextCommandImpl.getSuspendContext方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。