Package org.eclim.plugin.jdt.command.debug.context

Examples of org.eclim.plugin.jdt.command.debug.context.ThreadContext


    DebuggerContext ctx = DebuggerContextManager.getDefault();
    if (ctx == null) {
      return Services.getMessage("debugging.session.absent");
    }

    ThreadContext threadCtx = ctx.getThreadContext();
    String threadIdStr = commandLine.getValue(Options.THREAD_ID_OPTION);
    long threadId;

    if (threadIdStr == null) {
      ctx.resume();
      return Services.getMessage("debugging.session.resumed");
    } else {
      // Select the currently stepping thread if an empty thread ID is given.
      if (threadIdStr.isEmpty()) {
        IJavaThread steppingThread = (IJavaThread) threadCtx.getSteppingThread();
        if (steppingThread != null) {
          threadId = steppingThread.getThreadObject().getUniqueId();
        } else {
          return Services.getMessage("debugging.resume.thread.absent");
        }
      } else {
        threadId = Long.parseLong(threadIdStr);
      }

      if (logger.isDebugEnabled()) {
        logger.debug("Resuming thread ID: " + threadId);
      }
      threadCtx.resume(threadId);
      return Services.getMessage("debugging.thread.resumed");
    }
  }
View Full Code Here


  @Override
  public Object execute(CommandLine commandLine)
    throws Exception
  {
    DebuggerContext ctx = DebuggerContextManager.getDefault();
    ThreadContext threadCtx = ctx.getThreadContext();

    String threadId = commandLine.getValue(Options.THREAD_ID_OPTION);
    IJavaThread steppingThread = null;
    if (threadId == null) {
      steppingThread = threadCtx.getSteppingThread();
    } else {
      steppingThread = threadCtx.getThread(Long.parseLong(threadId));
    }

    if (steppingThread == null) {
      return Services.getMessage("debugging.stepping.thread.absent");
    } else if (!steppingThread.isSuspended()) {
      return Services.getMessage("debugging.stepping.thread.not.suspended");
    }

    if (steppingThread != null) {
      // Set this thread to be the stepping thread
      threadCtx.setSteppingThread(steppingThread);
    }

    String action = commandLine.getValue(Options.ACTION_OPTION);

    if (action.equals(ACTION_INTO)) {
View Full Code Here

TOP

Related Classes of org.eclim.plugin.jdt.command.debug.context.ThreadContext

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.