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


Java EventRequestManager.createThreadDeathRequest方法代码示例

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


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

示例1: setEventRequests

import com.sun.jdi.request.EventRequestManager; //导入方法依赖的package包/类
private void setEventRequests(VirtualMachine vm) {
    EventRequestManager erm = vm.eventRequestManager();

    // Normally, we want all uncaught exceptions.  We request them
    // via the same mechanism as Commands.commandCatchException()
    // so the user can ignore them later if they are not
    // interested.
    // FIXME: this works but generates spurious messages on stdout
    //        during startup:
    //          Set uncaught java.lang.Throwable
    //          Set deferred uncaught java.lang.Throwable
    Commands evaluator = new Commands();
    evaluator.commandCatchException
        (new StringTokenizer("uncaught java.lang.Throwable"));

    ThreadStartRequest tsr = erm.createThreadStartRequest();
    tsr.enable();
    ThreadDeathRequest tdr = erm.createThreadDeathRequest();
    tdr.enable();
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:21,代码来源:VMConnection.java

示例2: setEventRequests

import com.sun.jdi.request.EventRequestManager; //导入方法依赖的package包/类
private void setEventRequests(VirtualMachine vm) {
    EventRequestManager erm = vm.eventRequestManager();

    // Normally, we want all uncaught exceptions.  We request them
    // via the same mechanism as Commands.commandCatchException()
    // so the user can ignore them later if they are not
    // interested.
    // FIXME: this works but generates spurious messages on stdout
    //        during startup:
    //          Set uncaught java.lang.Throwable
    //          Set deferred uncaught java.lang.Throwable
    Commands evaluator = new Commands(env);
    evaluator.commandCatchException
        (new StringTokenizer("uncaught java.lang.Throwable"));

    ThreadStartRequest tsr = erm.createThreadStartRequest();
    tsr.enable();
    ThreadDeathRequest tdr = erm.createThreadDeathRequest();
    tdr.enable();
}
 
开发者ID:unktomi,项目名称:form-follows-function,代码行数:21,代码来源:VMConnection.java

示例3: createRequest

import com.sun.jdi.request.EventRequestManager; //导入方法依赖的package包/类
@Override
protected void createRequest()
{
  final EventRequestManager manager = getEventRequestManager();
  if (manager != null)
  {
    try
    {
      final EventRequest request = manager.createThreadDeathRequest();
      request.setSuspendPolicy(EventRequest.SUSPEND_EVENT_THREAD);
      request.enable();
      addJDIEventListener(this, request);
    }
    catch (final RuntimeException e)
    {
      logError(e);
    }
  }
}
 
开发者ID:UBPL,项目名称:jive,代码行数:20,代码来源:JiveDebugTarget.java

示例4: vmAttached

import com.sun.jdi.request.EventRequestManager; //导入方法依赖的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: vmAttached

import com.sun.jdi.request.EventRequestManager; //导入方法依赖的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

示例6: setEventRequests

import com.sun.jdi.request.EventRequestManager; //导入方法依赖的package包/类
/**
* Create the desired event requests, and enable
* them so that we will get events.
* @param excludes Class patterns for which we don't want events
* @param watchFields Do we want to watch assignments to fields
*/
   
   void setEventRequests() {
           
   	EventRequestManager mgr = vm.eventRequestManager();
       ExceptionRequest excReq = mgr.createExceptionRequest(null,true, true);
       excReq.setSuspendPolicy(EventRequest.SUSPEND_ALL);
       excReq.enable();

       MethodEntryRequest menr = mgr.createMethodEntryRequest();
       for (int i=0; i<excludes.size(); ++i) {
           menr.addClassExclusionFilter(excludes.get(i));
       }
       
       menr.setSuspendPolicy(EventRequest.SUSPEND_ALL);
       menr.enable();

       MethodExitRequest mexr = mgr.createMethodExitRequest();
       for (int i=0; i<excludes.size(); ++i) {
           mexr.addClassExclusionFilter(excludes.get(i));
       }
       mexr.setSuspendPolicy(EventRequest.SUSPEND_ALL);
       mexr.enable();
       
       ThreadDeathRequest tdr = mgr.createThreadDeathRequest();
       tdr.setSuspendPolicy(EventRequest.SUSPEND_ALL);
       tdr.enable();
      
   }
 
开发者ID:DiegoArranzGarcia,项目名称:JavaTracer,代码行数:35,代码来源:EventThread.java


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