コード例 #1
0
 @Override
 public Object[] getChildren(Object parent) {
   Set<ITask> children = new HashSet<ITask>();
   if (parent instanceof Person) {
     for (ITaskContainer container : applyFilter(TasksUiPlugin.getTaskList().getRootElements())) {
       for (ITask task : getAllTasks(container.getChildren())) {
         if (task.getOwner() != null
             && task.getOwner().equals(((Person) parent).getHandleIdentifier())
             && TasksUiInternal.shouldShowIncoming(task)) {
           children.add(task);
         }
       }
     }
   }
   return children.toArray();
 }
コード例 #2
0
 @Override
 public Object[] getElements(Object parent) {
   people.clear();
   if (parent instanceof Person) {
     return getChildren(parent);
   } else {
     for (ITaskContainer container : applyFilter(TasksUiPlugin.getTaskList().getRootElements())) {
       for (ITask task : getAllTasks(container.getChildren())) {
         if (task.getOwner() != null && TasksUiInternal.shouldShowIncoming(task)) {
           people.add(
               new Person(task.getOwner(), task.getConnectorKind(), task.getRepositoryUrl()));
         }
       }
     }
   }
   return people.toArray();
 }