本文整理汇总了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);
}
}
示例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);
}
}
}
示例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();
}
}
示例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.
}
}
示例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);
}
}