コード例 #1
0
  public void addAll(@NotNull UpdaterTreeState state) {
    myToExpand.putAll(state.myToExpand);

    Object[] toSelect = state.getToSelect();
    for (Object each : toSelect) {
      if (!myAdjustedSelection.containsKey(each)) {
        myToSelect.put(each, each);
      }
    }

    myCanRunRestore = state.myCanRunRestore;
  }
コード例 #2
0
  private ActionCallback processHangByParent(Set<Object> elements) {
    if (elements.isEmpty()) return new ActionCallback.Done();

    ActionCallback result = new ActionCallback(elements.size());
    for (Object hangElement : elements) {
      if (!myAdjustmentCause2Adjustment.containsKey(hangElement)) {
        processHangByParent(hangElement).notify(result);
      } else {
        result.setDone();
      }
    }
    return result;
  }
コード例 #3
0
  private ActionCallback processHangByParent(Set<Object> elements) {
    if (elements.size() == 0) return new ActionCallback.Done();

    ActionCallback result = new ActionCallback(elements.size());
    for (Iterator<Object> iterator = elements.iterator(); iterator.hasNext(); ) {
      Object hangElement = iterator.next();
      if (!myAdjustmentCause2Adjustment.containsKey(hangElement)) {
        processHangByParent(hangElement).notify(result);
      } else {
        result.setDone();
      }
    }
    return result;
  }
コード例 #4
0
 private void invalidateToSelectWithRefsToParent(DefaultMutableTreeNode actionNode) {
   if (actionNode != null) {
     Object readyElement = myUi.getElementFor(actionNode);
     if (readyElement != null) {
       Iterator<Object> toSelect = myToSelect.keySet().iterator();
       while (toSelect.hasNext()) {
         Object eachToSelect = toSelect.next();
         if (readyElement.equals(myUi.getTreeStructure().getParentElement(eachToSelect))) {
           List<Object> children = myUi.getLoadedChildrenFor(readyElement);
           if (!children.contains(eachToSelect)) {
             toSelect.remove();
             if (!myToSelect.containsKey(readyElement)
                 && !myUi.getSelectedElements().contains(eachToSelect)) {
               addAdjustedSelection(eachToSelect, Conditions.alwaysFalse(), null);
             }
           }
         }
       }
     }
   }
 }
コード例 #5
0
 public boolean isQueuedForSelection(Object element) {
   return myToSelect.containsKey(element);
 }