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


Java EventRequest.SUSPEND_NONE属性代码示例

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


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

示例1: resume

public void resume() {
    switch (suspendPolicy()) {
        case EventRequest.SUSPEND_ALL:
            vm.resume();
            break;
        case EventRequest.SUSPEND_EVENT_THREAD:
            ThreadReference thread = eventThread();
            if (thread == null) {
                throw new InternalException("Inconsistent suspend policy");
            }
            thread.resume();
            break;
        case EventRequest.SUSPEND_NONE:
            // Do nothing
            break;
        default:
            throw new InternalException("Invalid suspend policy");
    }
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:19,代码来源:EventSetImpl.java

示例2: JDWPtoJDISuspendPolicy

static int JDWPtoJDISuspendPolicy(byte jdwpPolicy) {
    switch(jdwpPolicy) {
        case JDWP.SuspendPolicy.ALL:
            return EventRequest.SUSPEND_ALL;
        case JDWP.SuspendPolicy.EVENT_THREAD:
            return EventRequest.SUSPEND_EVENT_THREAD;
    case JDWP.SuspendPolicy.NONE:
            return EventRequest.SUSPEND_NONE;
        default:
            throw new IllegalArgumentException("Illegal policy constant: " + jdwpPolicy);
    }
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:12,代码来源:EventRequestManagerImpl.java

示例3: JDItoJDWPSuspendPolicy

static byte JDItoJDWPSuspendPolicy(int jdiPolicy) {
    switch(jdiPolicy) {
        case EventRequest.SUSPEND_ALL:
            return JDWP.SuspendPolicy.ALL;
        case EventRequest.SUSPEND_EVENT_THREAD:
            return JDWP.SuspendPolicy.EVENT_THREAD;
        case EventRequest.SUSPEND_NONE:
            return JDWP.SuspendPolicy.NONE;
        default:
            throw new IllegalArgumentException("Illegal policy constant: " + jdiPolicy);
    }
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:12,代码来源:EventRequestManagerImpl.java

示例4: toSuspendPolicy

private SuspendPolicy toSuspendPolicy(int suspendEventRequest) {
  switch (suspendEventRequest) {
    case EventRequest.SUSPEND_EVENT_THREAD:
      return SuspendPolicy.THREAD;
    case EventRequest.SUSPEND_NONE:
      return SuspendPolicy.NONE;
    default:
      return SuspendPolicy.ALL;
  }
}
 
开发者ID:eclipse,项目名称:che,代码行数:10,代码来源:JavaDebugger.java

示例5: toSuspendEventRequest

private int toSuspendEventRequest(SuspendPolicy suspendPolicy) {
  if (suspendPolicy == null) {
    return EventRequest.SUSPEND_ALL;
  }

  switch (suspendPolicy) {
    case NONE:
      return EventRequest.SUSPEND_NONE;
    case THREAD:
      return EventRequest.SUSPEND_EVENT_THREAD;
    default:
      return EventRequest.SUSPEND_ALL;
  }
}
 
开发者ID:eclipse,项目名称:che,代码行数:14,代码来源:JavaDebugger.java

示例6: pushSuspendContext

@Override
public SuspendContextImpl pushSuspendContext(@MagicConstant(flagsFromClass = EventRequest.class) final int suspendPolicy, int nVotes) {
  SuspendContextImpl suspendContext = new SuspendContextImpl(myDebugProcess, suspendPolicy, nVotes, null) {
    @Override
    protected void resumeImpl() {
      if (LOG.isDebugEnabled()) {
        LOG.debug("Start resuming...");
      }
      myDebugProcess.logThreads();
      switch(getSuspendPolicy()) {
        case EventRequest.SUSPEND_ALL:
          int resumeAttempts = 5;
          while (--resumeAttempts > 0) {
            try {
              myDebugProcess.getVirtualMachineProxy().resume();
              break;
            }
            catch (InternalException e) {
              //InternalException 13 means that there are running threads that we are trying to resume
              //On MacOS it happened that native thread didn't stop while some java thread reached breakpoint
              //noinspection StatementWithEmptyBody
              if (/*Patches.MAC_RESUME_VM_HACK && */e.errorCode() == 13) {
                //Its funny, but second resume solves the problem
              }
              else {
                LOG.error(e);
                break;
              }
            }
          }
          
          if (LOG.isDebugEnabled()) {
            LOG.debug("VM resumed ");
          }
          break;
        case EventRequest.SUSPEND_EVENT_THREAD:
          myFrozenThreads.remove(getThread());
          getThread().resume();
          if(LOG.isDebugEnabled()) {
            LOG.debug("Thread resumed : " + getThread().toString());
          }
          break;
        case EventRequest.SUSPEND_NONE:
          if (LOG.isDebugEnabled()) {
            LOG.debug("None resumed");
          }
          break;
      }
      if (LOG.isDebugEnabled()) {
        LOG.debug("Suspends = " + suspends);
      }
      myDebugProcess.logThreads();
    }
  };
  pushContext(suspendContext);
  return suspendContext;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:57,代码来源:SuspendManagerImpl.java

示例7: pushSuspendContext

public SuspendContextImpl pushSuspendContext(final int suspendPolicy, int nVotes) {
  SuspendContextImpl suspendContext = new SuspendContextImpl(myDebugProcess, suspendPolicy, nVotes, null) {
    protected void resumeImpl() {
      if (LOG.isDebugEnabled()) {
        LOG.debug("Start resuming...");
      }
      myDebugProcess.logThreads();
      switch(getSuspendPolicy()) {
        case EventRequest.SUSPEND_ALL:
          int resumeAttempts = 5;
          while (--resumeAttempts > 0) {
            try {
              myDebugProcess.getVirtualMachineProxy().resume();
              break;
            }
            catch (InternalException e) {
              //InternalException 13 means that there are running threads that we are trying to resume
              //On MacOS it happened that native thread didn't stop while some java thread reached breakpoint
              if (/*Patches.MAC_RESUME_VM_HACK && */e.errorCode() == 13) {
                //Its funny, but second resume solves the problem
                continue;
              }
              else {
                LOG.error(e);
                break;
              }
            }
          }
          
          if (LOG.isDebugEnabled()) {
            LOG.debug("VM resumed ");
          }
          break;
        case EventRequest.SUSPEND_EVENT_THREAD:
          getThread().resume();
          if(LOG.isDebugEnabled()) {
            LOG.debug("Thread resumed : " + getThread().toString());
          }
          break;
        case EventRequest.SUSPEND_NONE:
          if (LOG.isDebugEnabled()) {
            LOG.debug("None resumed");
          }
          break;
      }
      if (LOG.isDebugEnabled()) {
        LOG.debug("Suspends = " + suspends);
      }
      myDebugProcess.logThreads();
    }
  };
  pushContext(suspendContext);
  return suspendContext;
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:54,代码来源:SuspendManagerImpl.java


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