本文整理汇总了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();
}
示例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();
}
示例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();
}
示例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()");
}
}
}
示例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());
}
示例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()");
}
}
}
示例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());
}
示例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());
}
示例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);
}
}
示例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);
}
}
示例11: isWatchMethodReturnValuesEnabled
import com.intellij.debugger.engine.requests.MethodReturnValueWatcher; //导入依赖的package包/类
public boolean isWatchMethodReturnValuesEnabled() {
final MethodReturnValueWatcher watcher = myReturnValueWatcher;
return watcher != null && watcher.isFeatureEnabled();
}
示例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()");
}
}
示例13: isWatchMethodReturnValuesEnabled
import com.intellij.debugger.engine.requests.MethodReturnValueWatcher; //导入依赖的package包/类
public boolean isWatchMethodReturnValuesEnabled()
{
final MethodReturnValueWatcher watcher = myReturnValueWatcher;
return watcher != null && watcher.isFeatureEnabled();
}