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


Java MethodReturnValueWatcher类代码示例

本文整理汇总了Java中com.intellij.debugger.engine.requests.MethodReturnValueWatcher的典型用法代码示例。如果您正苦于以下问题:Java MethodReturnValueWatcher类的具体用法?Java MethodReturnValueWatcher怎么用?Java MethodReturnValueWatcher使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


MethodReturnValueWatcher类属于com.intellij.debugger.engine.requests包,在下文中一共展示了MethodReturnValueWatcher类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: contextAction

import com.intellij.debugger.engine.requests.MethodReturnValueWatcher; //导入依赖的package包/类
@Override
public void contextAction() {
  showStatusText(DebuggerBundle.message("status.step.over"));
  final SuspendContextImpl suspendContext = getSuspendContext();
  final ThreadReferenceProxyImpl stepThread = getContextThread();
  // need this hint while stepping over for JSR45 support:
  // several lines of generated java code may correspond to a single line in the source file,
  // from which the java code was generated
  RequestHint hint = new RequestHint(stepThread, suspendContext, StepRequest.STEP_OVER);
  hint.setRestoreBreakpoints(myIsIgnoreBreakpoints);
  hint.setIgnoreFilters(myIsIgnoreBreakpoints || mySession.shouldIgnoreSteppingFilters());

  applyThreadFilter(stepThread);

  final MethodReturnValueWatcher rvWatcher = myReturnValueWatcher;
  if (rvWatcher != null) {
    rvWatcher.enable(stepThread.getThreadReference());
  }

  doStep(suspendContext, stepThread, myStepSize, StepRequest.STEP_OVER, hint);

  if (myIsIgnoreBreakpoints) {
    DebuggerManagerEx.getInstanceEx(myProject).getBreakpointManager().disableBreakpoints(DebugProcessImpl.this);
  }
  super.contextAction();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:27,代码来源:DebugProcessImpl.java

示例2: contextAction

import com.intellij.debugger.engine.requests.MethodReturnValueWatcher; //导入依赖的package包/类
public void contextAction() {
  showStatusText(DebuggerBundle.message("status.step.over"));
  final SuspendContextImpl suspendContext = getSuspendContext();
  final ThreadReferenceProxyImpl stepThread = getContextThread();
  // need this hint whil stepping over for JSR45 support:
  // several lines of generated java code may correspond to a single line in the source file,
  // from which the java code was generated
  RequestHint hint = new RequestHint(stepThread, suspendContext, StepRequest.STEP_OVER);
  hint.setRestoreBreakpoints(myIsIgnoreBreakpoints);
  hint.setIgnoreFilters(myIsIgnoreBreakpoints || mySession.shouldIgnoreSteppingFilters());

  applyThreadFilter(stepThread);

  final MethodReturnValueWatcher rvWatcher = myReturnValueWatcher;
  if (rvWatcher != null) {
    rvWatcher.enable(stepThread.getThreadReference());
  }

  doStep(suspendContext, stepThread, StepRequest.STEP_OVER, hint);

  if (myIsIgnoreBreakpoints) {
    DebuggerManagerEx.getInstanceEx(myProject).getBreakpointManager().disableBreakpoints(DebugProcessImpl.this);
  }
  super.contextAction();
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:26,代码来源:DebugProcessImpl.java

示例3: contextAction

import com.intellij.debugger.engine.requests.MethodReturnValueWatcher; //导入依赖的package包/类
@Override
public void contextAction()
{
	showStatusText(DebuggerBundle.message("status.step.out"));
	final SuspendContextImpl suspendContext = getSuspendContext();
	final ThreadReferenceProxyImpl thread = getContextThread();
	RequestHint hint = new RequestHint(thread, suspendContext, StepRequest.STEP_OUT);
	hint.setIgnoreFilters(mySession.shouldIgnoreSteppingFilters());
	applyThreadFilter(thread);
	final MethodReturnValueWatcher rvWatcher = myReturnValueWatcher;
	if(rvWatcher != null)
	{
		rvWatcher.enable(thread.getThreadReference());
	}
	doStep(suspendContext, thread, myStepSize, StepRequest.STEP_OUT, hint);
	super.contextAction();
}
 
开发者ID:consulo,项目名称:consulo-java,代码行数:18,代码来源:DebugProcessImpl.java

示例4: vmAttached

import com.intellij.debugger.engine.requests.MethodReturnValueWatcher; //导入依赖的package包/类
private void vmAttached() {
  DebuggerManagerThreadImpl.assertIsManagerThread();
  LOG.assertTrue(!isAttached());
  if(myState.compareAndSet(STATE_INITIAL, STATE_ATTACHED)) {
    final VirtualMachineProxyImpl machineProxy = getVirtualMachineProxy();
    final EventRequestManager requestManager = machineProxy.eventRequestManager();

    if (machineProxy.canGetMethodReturnValues()) {
      myReturnValueWatcher = new MethodReturnValueWatcher(requestManager);
    }

    final ThreadStartRequest threadStartRequest = requestManager.createThreadStartRequest();
    threadStartRequest.setSuspendPolicy(EventRequest.SUSPEND_NONE);
    threadStartRequest.enable();
    final ThreadDeathRequest threadDeathRequest = requestManager.createThreadDeathRequest();
    threadDeathRequest.setSuspendPolicy(EventRequest.SUSPEND_NONE);
    threadDeathRequest.enable();

    myDebugProcessDispatcher.getMulticaster().processAttached(this);

    // breakpoints should be initialized after all processAttached listeners work
    ApplicationManager.getApplication().runReadAction(new Runnable() {
      @Override
      public void run() {
        XDebugSession session = getSession().getXDebugSession();
        if (session != null) {
          session.initBreakpoints();
        }
      }
    });

    final String addressDisplayName = DebuggerBundle.getAddressDisplayName(getConnection());
    final String transportName = DebuggerBundle.getTransportName(getConnection());
    showStatusText(DebuggerBundle.message("status.connected", addressDisplayName, transportName));
    if (LOG.isDebugEnabled()) {
      LOG.debug("leave: processVMStartEvent()");
    }
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:40,代码来源:DebugProcessEvents.java

示例5: getLastExecutedMethod

import com.intellij.debugger.engine.requests.MethodReturnValueWatcher; //导入依赖的package包/类
@Nullable
public Pair<Method, Value> getLastExecutedMethod() {
  final MethodReturnValueWatcher watcher = myReturnValueWatcher;
  if (watcher == null) {
    return null;
  }
  final Method method = watcher.getLastExecutedMethod();
  if (method == null) {
    return null;
  }
  return Pair.create(method, watcher.getLastMethodReturnValue());
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:13,代码来源:DebugProcessImpl.java

示例6: vmAttached

import com.intellij.debugger.engine.requests.MethodReturnValueWatcher; //导入依赖的package包/类
private void vmAttached() {
  DebuggerManagerThreadImpl.assertIsManagerThread();
  LOG.assertTrue(!isAttached());
  if(myState.compareAndSet(STATE_INITIAL, STATE_ATTACHED)) {
    final VirtualMachineProxyImpl machineProxy = getVirtualMachineProxy();
    final EventRequestManager requestManager = machineProxy.eventRequestManager();
    
    if (machineProxy.canGetMethodReturnValues()) {
      myReturnValueWatcher = new MethodReturnValueWatcher(requestManager);
    }

    final ThreadStartRequest threadStartRequest = requestManager.createThreadStartRequest();
    threadStartRequest.setSuspendPolicy(EventRequest.SUSPEND_NONE);
    threadStartRequest.enable();
    final ThreadDeathRequest threadDeathRequest = requestManager.createThreadDeathRequest();
    threadDeathRequest.setSuspendPolicy(EventRequest.SUSPEND_NONE);
    threadDeathRequest.enable();

    DebuggerManagerEx.getInstanceEx(getProject()).getBreakpointManager().setInitialBreakpointsState();
    myDebugProcessDispatcher.getMulticaster().processAttached(this);

    final String addressDisplayName = DebuggerBundle.getAddressDisplayName(getConnection());
    final String transportName = DebuggerBundle.getTransportName(getConnection());
    showStatusText(DebuggerBundle.message("status.connected", addressDisplayName, transportName));
    if (LOG.isDebugEnabled()) {
      LOG.debug("leave: processVMStartEvent()");
    }
  }
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:30,代码来源:DebugProcessEvents.java

示例7: getLastExecutedMethod

import com.intellij.debugger.engine.requests.MethodReturnValueWatcher; //导入依赖的package包/类
@Nullable
public Pair<Method, Value> getLastExecutedMethod() {
  final MethodReturnValueWatcher watcher = myReturnValueWatcher;
  if (watcher == null) {
    return null;
  }
  final Method method = watcher.getLastExecutedMethod();
  if (method == null) {
    return null;
  }
  return new Pair<Method, Value>(method, watcher.getLastMethodReturnValue());
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:13,代码来源:DebugProcessImpl.java

示例8: getLastExecutedMethod

import com.intellij.debugger.engine.requests.MethodReturnValueWatcher; //导入依赖的package包/类
@Nullable
public Pair<Method, Value> getLastExecutedMethod()
{
	final MethodReturnValueWatcher watcher = myReturnValueWatcher;
	if(watcher == null)
	{
		return null;
	}
	final Method method = watcher.getLastExecutedMethod();
	if(method == null)
	{
		return null;
	}
	return Pair.create(method, watcher.getLastMethodReturnValue());
}
 
开发者ID:consulo,项目名称:consulo-java,代码行数:16,代码来源:DebugProcessImpl.java

示例9: setWatchMethodReturnValuesEnabled

import com.intellij.debugger.engine.requests.MethodReturnValueWatcher; //导入依赖的package包/类
public void setWatchMethodReturnValuesEnabled(boolean enabled)
{
	final MethodReturnValueWatcher watcher = myReturnValueWatcher;
	if(watcher != null)
	{
		watcher.setFeatureEnabled(enabled);
	}
}
 
开发者ID:consulo,项目名称:consulo-java,代码行数:9,代码来源:DebugProcessImpl.java

示例10: setWatchMethodReturnValuesEnabled

import com.intellij.debugger.engine.requests.MethodReturnValueWatcher; //导入依赖的package包/类
public void setWatchMethodReturnValuesEnabled(boolean enabled) {
  final MethodReturnValueWatcher watcher = myReturnValueWatcher;
  if (watcher != null) {
    watcher.setFeatureEnabled(enabled);
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:7,代码来源:DebugProcessImpl.java

示例11: isWatchMethodReturnValuesEnabled

import com.intellij.debugger.engine.requests.MethodReturnValueWatcher; //导入依赖的package包/类
public boolean isWatchMethodReturnValuesEnabled() {
  final MethodReturnValueWatcher watcher = myReturnValueWatcher;
  return watcher != null && watcher.isFeatureEnabled();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:DebugProcessImpl.java

示例12: vmAttached

import com.intellij.debugger.engine.requests.MethodReturnValueWatcher; //导入依赖的package包/类
private void vmAttached()
{
	DebuggerManagerThreadImpl.assertIsManagerThread();
	LOG.assertTrue(!isAttached());
	if(myState.compareAndSet(State.INITIAL, State.ATTACHED))
	{
		final VirtualMachineProxyImpl machineProxy = getVirtualMachineProxy();
		final EventRequestManager requestManager = machineProxy.eventRequestManager();

		if(machineProxy.canGetMethodReturnValues())
		{
			myReturnValueWatcher = new MethodReturnValueWatcher(requestManager);
		}

		final ThreadStartRequest threadStartRequest = requestManager.createThreadStartRequest();
		threadStartRequest.setSuspendPolicy(EventRequest.SUSPEND_NONE);
		threadStartRequest.enable();
		final ThreadDeathRequest threadDeathRequest = requestManager.createThreadDeathRequest();
		threadDeathRequest.setSuspendPolicy(EventRequest.SUSPEND_NONE);
		threadDeathRequest.enable();

		// fill position managers
		((DebuggerManagerImpl) DebuggerManager.getInstance(getProject())).getCustomPositionManagerFactories().map(factory -> factory.fun(this)).filter(Objects::nonNull).forEach
				(this::appendPositionManager);
		Stream.of(Extensions.getExtensions(PositionManagerFactory.EP_NAME, getProject())).map(factory -> factory.createPositionManager(this)).filter(Objects::nonNull).forEach
				(this::appendPositionManager);

		myDebugProcessDispatcher.getMulticaster().processAttached(this);

		createStackCapturingBreakpoints();

		// breakpoints should be initialized after all processAttached listeners work
		ApplicationManager.getApplication().runReadAction(() ->
		{
			XDebugSession session = getSession().getXDebugSession();
			if(session != null)
			{
				session.initBreakpoints();
			}
		});

		final String addressDisplayName = DebuggerBundle.getAddressDisplayName(getConnection());
		final String transportName = DebuggerBundle.getTransportName(getConnection());
		showStatusText(DebuggerBundle.message("status.connected", addressDisplayName, transportName));
		LOG.debug("leave: processVMStartEvent()");
	}
}
 
开发者ID:consulo,项目名称:consulo-java,代码行数:48,代码来源:DebugProcessEvents.java

示例13: isWatchMethodReturnValuesEnabled

import com.intellij.debugger.engine.requests.MethodReturnValueWatcher; //导入依赖的package包/类
public boolean isWatchMethodReturnValuesEnabled()
{
	final MethodReturnValueWatcher watcher = myReturnValueWatcher;
	return watcher != null && watcher.isFeatureEnabled();
}
 
开发者ID:consulo,项目名称:consulo-java,代码行数:6,代码来源:DebugProcessImpl.java


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