ActionCallback (Object fromElement, boolean updateStructure) { assertIsDispatchThread(); try { if (getUpdater() == null) { return ActionCallback.REJECTED; } ActionCallback result = new ActionCallback(); DefaultMutableTreeNode nodeToUpdate = null; boolean updateElementStructure = updateStructure; for (Object element = fromElement; element != null; element = getTreeStructure().getParentElement(element)) { DefaultMutableTreeNode node = getFirstNode(element); if (node != null) { nodeToUpdate = node; break; } updateElementStructure = true; // always update children if element does not exist } addSubtreeToUpdate(nodeToUpdate != null? nodeToUpdate : getRootNode(), new TreeRunnable("AbstractTreeUi.queueUpdate") { @Override public void perform() { result.setDone(); } }, updateElementStructure); return result; } catch (ProcessCanceledException e) { return ActionCallback.REJECTED; } }