Package com.sun.jdi

Examples of com.sun.jdi.ThreadGroupReference


      }
      logError(e);
    }

    try {
      ThreadGroupReference group = getUnderlyingThreadGroup();
      // might already be terminated
      if (group != null) {
        getJavaDebugTarget().addThreadGroup(group);
      }
    } catch (DebugException e1) {
View Full Code Here


   *                exception responsible for the failure.</li>
   *                </ul>
   */
  protected void determineIfSystemThread() throws DebugException {
    fIsSystemThread = false;
    ThreadGroupReference tgr = getUnderlyingThreadGroup();
    fIsSystemThread = tgr != null;
    while (tgr != null) {
      String tgn = null;
      try {
        tgn = tgr.name();
        tgr = tgr.parent();
      } catch (UnsupportedOperationException e) {
        fIsSystemThread = false;
        break;
      } catch (RuntimeException e) {
        targetRequestFailed(
View Full Code Here

   *
   * @see org.eclipse.jdt.debug.core.IJavaThread#getThreadGroupName()
   */
  public String getThreadGroupName() throws DebugException {
    if (fThreadGroupName == null) {
      ThreadGroupReference tgr = getUnderlyingThreadGroup();

      // bug# 20370
      if (tgr == null) {
        return null;
      }

      try {
        fThreadGroupName = tgr.name();
      } catch (RuntimeException e) {
        targetRequestFailed(
            MessageFormat.format(
                JDIDebugModelMessages.JDIThread_exception_retrieving_thread_group_name,
                e.toString()), e);
View Full Code Here

   * (non-Javadoc)
   *
   * @see org.eclipse.jdt.debug.core.IJavaThread#getThreadGroup()
   */
  public IJavaThreadGroup getThreadGroup() throws DebugException {
    ThreadGroupReference group = getUnderlyingThreadGroup();
    if (group != null) {
      return getJavaDebugTarget().findThreadGroup(group);
    }
    return null;
  }
View Full Code Here

   *
   * @see org.eclipse.jdt.debug.core.IJavaThreadGroup#getThreadGroup()
   */
  public IJavaThreadGroup getThreadGroup() throws DebugException {
    try {
      ThreadGroupReference reference = fGroup.parent();
      if (reference != null) {
        return getJavaDebugTarget().findThreadGroup(reference);
      }
    } catch (RuntimeException e) {
      targetRequestFailed(JDIDebugModelMessages.JDIThreadGroup_1, e);
View Full Code Here

    try {
      List<ThreadGroupReference> groups = fGroup.threadGroups();
      List<JDIThreadGroup> modelGroups = new ArrayList<JDIThreadGroup>(groups.size());
      Iterator<ThreadGroupReference> iterator = groups.iterator();
      while (iterator.hasNext()) {
        ThreadGroupReference ref = iterator
            .next();
        JDIThreadGroup group = getJavaDebugTarget()
            .findThreadGroup(ref);
        if (group != null) {
          modelGroups.add(group);
View Full Code Here

   *
   * @param group
   *            thread group to add
   */
  void addThreadGroup(ThreadGroupReference group) {
    ThreadGroupReference currentGroup = group;
    while (currentGroup != null) {
      synchronized (fGroups) {
        if (findThreadGroup(currentGroup) == null) {
          JDIThreadGroup modelGroup = new JDIThreadGroup(this,
              currentGroup);
          fGroups.add(modelGroup);
          currentGroup = currentGroup.parent();
        } else {
          currentGroup = null;
        }
      }
    }
View Full Code Here

    public ThreadGroupReference next() {
        return nextThreadGroup();
    }

    public ThreadGroupReference nextThreadGroup() {
        ThreadGroupReference tg = top().next();
        push(tg.threadGroups());
        return tg;
    }
View Full Code Here

    }

    static ThreadGroupReference find(String name) {
        ThreadGroupIterator tgi = new ThreadGroupIterator();
        while (tgi.hasNext()) {
            ThreadGroupReference tg = tgi.nextThreadGroup();
            if (tg.name().equals(name)) {
                return tg;
            }
        }
        return null;
    }
View Full Code Here

    public ThreadGroupReference next() {
        return nextThreadGroup();
    }

    public ThreadGroupReference nextThreadGroup() {
        ThreadGroupReference tg = top().next();
        push(tg.threadGroups());
        return tg;
    }
View Full Code Here

TOP

Related Classes of com.sun.jdi.ThreadGroupReference

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.