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


Java EventRequestManager.deleteEventRequests方法代码示例

本文整理汇总了Java中com.sun.jdi.request.EventRequestManager.deleteEventRequests方法的典型用法代码示例。如果您正苦于以下问题:Java EventRequestManager.deleteEventRequests方法的具体用法?Java EventRequestManager.deleteEventRequests怎么用?Java EventRequestManager.deleteEventRequests使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.sun.jdi.request.EventRequestManager的用法示例。


在下文中一共展示了EventRequestManager.deleteEventRequests方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: deleteStepRequests

import com.sun.jdi.request.EventRequestManager; //导入方法依赖的package包/类
void deleteStepRequests(@Nullable final ThreadReference stepThread) {
  EventRequestManager requestManager = getVirtualMachineProxy().eventRequestManager();
  List<StepRequest> stepRequests = requestManager.stepRequests();
  if (!stepRequests.isEmpty()) {
    final List<StepRequest> toDelete = new ArrayList<StepRequest>(stepRequests.size());
    for (final StepRequest request : stepRequests) {
      ThreadReference threadReference = request.thread();
      // [jeka] on attempt to delete a request assigned to a thread with unknown status, a JDWP error occurs
      try {
        if (threadReference.status() != ThreadReference.THREAD_STATUS_UNKNOWN && (stepThread == null || stepThread.equals(threadReference))) {
          toDelete.add(request);
        }
      }
      catch (IllegalThreadStateException e) {
        LOG.info(e); // undocumented by JDI: may be thrown when querying thread status
      }
      catch (ObjectCollectedException ignored) {
      }
    }
    requestManager.deleteEventRequests(toDelete);
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:23,代码来源:DebugProcessImpl.java

示例2: removeFieldRequests

import com.sun.jdi.request.EventRequestManager; //导入方法依赖的package包/类
protected void removeFieldRequests(final JDIDebugTarget target)
{
  final EventRequestManager manager = target.getEventRequestManager();
  if (manager != null && !fieldRequests.isEmpty())
  {
    try
    {
      manager.deleteEventRequests(fieldRequests);
      for (final EventRequest request : fieldRequests)
      {
        target.removeJDIEventListener(
            request instanceof AccessWatchpointRequest ? fieldReadHandler : fieldWriteHandler,
            request);
      }
    }
    catch (final RuntimeException e)
    {
      JiveDebugPlugin.log(e);
    }
  }
}
 
开发者ID:UBPL,项目名称:jive,代码行数:22,代码来源:EventHandlerFactory.java

示例3: setExceptionBreakpoints

import com.sun.jdi.request.EventRequestManager; //导入方法依赖的package包/类
@Override
public void setExceptionBreakpoints(boolean notifyCaught, boolean notifyUncaught) {
    EventRequestManager manager = vm.eventRequestManager();
    ArrayList<ExceptionRequest> legacy = new ArrayList<>(manager.exceptionRequests());
    manager.deleteEventRequests(legacy);
    // When no exception breakpoints are requested, no need to create an empty exception request.
    if (notifyCaught || notifyUncaught) {
        ExceptionRequest request = manager.createExceptionRequest(null, notifyCaught, notifyUncaught);
        request.setSuspendPolicy(EventRequest.SUSPEND_EVENT_THREAD);
        request.enable();
    }
}
 
开发者ID:Microsoft,项目名称:java-debug,代码行数:13,代码来源:DebugSession.java

示例4: deleteEventRequestSafely

import com.sun.jdi.request.EventRequestManager; //导入方法依赖的package包/类
/**
 * Remove the event request list from the vm. If the vm has terminated, do nothing.
 * @param eventManager
 *                  The event request manager.
 * @param requests
 *                  The target event request list.
 */
public static void deleteEventRequestSafely(EventRequestManager eventManager, List<EventRequest> requests) {
    try {
        eventManager.deleteEventRequests(requests);
    } catch (VMDisconnectedException ex) {
        // ignore.
    }
}
 
开发者ID:Microsoft,项目名称:java-debug,代码行数:15,代码来源:DebugUtility.java

示例5: deleteStepRequests

import com.sun.jdi.request.EventRequestManager; //导入方法依赖的package包/类
void deleteStepRequests(@Nullable final ThreadReference stepThread) {
  EventRequestManager requestManager = getVirtualMachineProxy().eventRequestManager();
  List<StepRequest> stepRequests = requestManager.stepRequests();
  if (!stepRequests.isEmpty()) {
    final List<StepRequest> toDelete = new ArrayList<StepRequest>(stepRequests.size());
    for (final StepRequest request : stepRequests) {
      ThreadReference threadReference = request.thread();
      // [jeka] on attempt to delete a request assigned to a thread with unknown status, a JDWP error occures
      if (threadReference.status() != ThreadReference.THREAD_STATUS_UNKNOWN && (stepThread == null || stepThread.equals(threadReference))) {
        toDelete.add(request);
      }
    }
    requestManager.deleteEventRequests(toDelete);
  }
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:16,代码来源:DebugProcessImpl.java


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