コード例 #1
0
 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();
 }
コード例 #2
0
 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);
             }
           });
 }