/*
  * (non-Javadoc)
  * @see org.eclipse.jface.viewers.ITreeContentProvider#getChildren(java.lang.Object)
  */
 public Object[] getChildren(Object parent) {
   if (parent == invisibleRoot) {
     return ((TreeParent) invisibleRoot).getChildren();
   } else if (parent instanceof TreeParent) {
     return manager.getChildren(parent);
   }
   return new Object[0];
 }
Пример #2
0
 /** Cancel all current jobs. */
 void cancelJobs(MethodWrapper wrapper) {
   if (fManager != null && wrapper != null) {
     fManager.cancel(wrapper);
     if (fPart != null) {
       fPart.setCancelEnabled(false);
     }
   }
 }
Пример #3
0
  /** @see org.eclipse.jface.viewers.ITreeContentProvider#getChildren(java.lang.Object) */
  public Object[] getChildren(Object parentElement) {
    if (parentElement instanceof TreeRoot) {
      TreeRoot dummyRoot = (TreeRoot) parentElement;

      return new Object[] {dummyRoot.getRoot()};
    } else if (parentElement instanceof MethodWrapper) {
      MethodWrapper methodWrapper = ((MethodWrapper) parentElement);

      if (shouldStopTraversion(methodWrapper)) {
        return EMPTY_ARRAY;
      } else {
        if (fManager != null) {
          Object[] children = fManager.getChildren(new DeferredMethodWrapper(this, methodWrapper));
          if (children != null) return children;
        }
        return fetchChildren(methodWrapper);
      }
    }

    return EMPTY_ARRAY;
  }
 /*
  * (non-Javadoc)
  * @see org.eclipse.jface.viewers.ITreeContentProvider#hasChildren(java.lang.Object)
  */
 public boolean hasChildren(Object parent) {
   if (parent instanceof TreeParent) {
     return manager.mayHaveChildren(parent);
   }
   return false;
 }