public void setRootElement(CompositePackagingElement<?> rootElement) { myContext .getOrCreateModifiableArtifactModel() .getOrCreateModifiableArtifact(myOriginalArtifact) .setRootElement(rootElement); myTreeStructure.updateRootElement(); final DefaultMutableTreeNode node = myTree.getRootNode(); node.setUserObject(myTreeStructure.getRootElement()); myBuilder.updateNode(node); rebuildTree(); myArtifactsEditor.getSourceItemsTree().rebuildTree(); }
public void updateAndSelect( PackagingElementNode<?> node, final List<? extends PackagingElement<?>> toSelect) { myArtifactsEditor.queueValidation(); myTreeStructure.clearCaches(); myBuilder .queueUpdateFrom(node, true) .doWhenDone( new Runnable() { @Override public void run() { List<PackagingElementNode<?>> nodes = myTree.findNodes(toSelect); myBuilder.select(ArrayUtil.toObjectArray(nodes), null); } }); }