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);
             }
           }
         }
       }
     }
   }
 }
 @NotNull
 public Object[] getToExpand() {
   return myToExpand.keySet().toArray(new Object[myToExpand.size()]);
 }
 @NotNull
 public Object[] getToSelect() {
   return myToSelect.keySet().toArray(new Object[myToSelect.size()]);
 }