Java 类com.intellij.ui.treeStructure.filtered.FilteringTreeBuilder 实例源码

项目:intellij-ce-playground    文件:DisposerDebugger.java   
private DisposerTree(Disposable parent) {
  myModificationToFilter = -1;

  final DisposerStructure structure = new DisposerStructure(this);
  final DefaultTreeModel model = new DefaultTreeModel(new DefaultMutableTreeNode());
  final Tree tree = new Tree(model);
  tree.setRootVisible(false);
  tree.setShowsRootHandles(true);
  tree.getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION);
  myTreeBuilder = new FilteringTreeBuilder(tree, DisposerTree.this, structure, AlphaComparator.INSTANCE) {
    @Override
    public boolean isAutoExpandNode(NodeDescriptor nodeDescriptor) {
      return structure.getRootElement() == getOriginalNode(nodeDescriptor);
    }
  };
  myTreeBuilder.setFilteringMerge(200, MergingUpdateQueue.ANY_COMPONENT);
  Disposer.register(this, myTreeBuilder);
  myTree = tree;

  setLayout(new BorderLayout());
  add(ScrollPaneFactory.createScrollPane(myTree), BorderLayout.CENTER);

  Disposer.getTree().addListener(this);

  Disposer.register(parent, this);
}
项目:tools-idea    文件:DisposerDebugger.java   
private DisposerTree(Disposable parent) {
  myModificationToFilter = -1;

  final DisposerStructure structure = new DisposerStructure(this);
  final DefaultTreeModel model = new DefaultTreeModel(new DefaultMutableTreeNode());
  final Tree tree = new Tree(model);
  tree.setRootVisible(false);
  tree.setShowsRootHandles(true);
  tree.getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION);
  myTreeBuilder = new FilteringTreeBuilder(tree, DisposerTree.this, structure, AlphaComparator.INSTANCE) {
    @Override
    public boolean isAutoExpandNode(NodeDescriptor nodeDescriptor) {
      return structure.getRootElement() == getOriginalNode(nodeDescriptor);
    }
  };
  myTreeBuilder.setFilteringMerge(200, MergingUpdateQueue.ANY_COMPONENT);
  Disposer.register(this, myTreeBuilder);
  myTree = tree;

  setLayout(new BorderLayout());
  add(ScrollPaneFactory.createScrollPane(myTree), BorderLayout.CENTER);

  Disposer.getTree().addListener(this);

  Disposer.register(parent, this);
}
项目:consulo    文件:DisposerDebugger.java   
private DisposerTree(Disposable parent) {
  myModificationToFilter = -1;

  final DisposerStructure structure = new DisposerStructure(this);
  final DefaultTreeModel model = new DefaultTreeModel(new DefaultMutableTreeNode());
  final Tree tree = new Tree(model);
  tree.setRootVisible(false);
  tree.setShowsRootHandles(true);
  tree.getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION);
  myTreeBuilder = new FilteringTreeBuilder(tree, DisposerTree.this, structure, AlphaComparator.INSTANCE) {
    @Override
    public boolean isAutoExpandNode(NodeDescriptor nodeDescriptor) {
      return structure.getRootElement() == getOriginalNode(nodeDescriptor);
    }
  };
  myTreeBuilder.setFilteringMerge(200, MergingUpdateQueue.ANY_COMPONENT);
  Disposer.register(this, myTreeBuilder);
  myTree = tree;

  setLayout(new BorderLayout());
  add(ScrollPaneFactory.createScrollPane(myTree), BorderLayout.CENTER);

  Disposer.getTree().addListener(this);

  Disposer.register(parent, this);
}
项目:intellij-ce-playground    文件:FilteringTreeBuilderTest.java   
private void initBuilder() throws Exception {
  myBuilder = new FilteringTreeBuilder(myTree, myFilter, myStructure, AlphaComparator.INSTANCE) {
    @Override
    protected AbstractTreeUpdater createUpdater() {
     return _createUpdater(this);
    }
  };

  showTree();

  Disposer.register(getRootDisposable(), myBuilder);
}
项目:tools-idea    文件:FilteringTreeBuilderTest.java   
private void initBuilder() throws Exception {
  myBuilder = new FilteringTreeBuilder(myTree, myFilter, myStructure, AlphaComparator.INSTANCE) {
    @Override
    protected AbstractTreeUpdater createUpdater() {
     return _createUpdater(this);
    }
  };

  showTree();

  Disposer.register(getRootDisposable(), myBuilder);
}
项目:consulo    文件:FilteringTreeBuilderTest.java   
private void initBuilder() throws Exception {
  myBuilder = new FilteringTreeBuilder(myTree, myFilter, myStructure, AlphaComparator.INSTANCE) {
    @Override
    protected AbstractTreeUpdater createUpdater() {
     return _createUpdater(this);
    }
  };

  showTree();

  Disposer.register(getRootDisposable(), myBuilder);
}
项目:intellij-ce-playground    文件:FacetStructureConfigurable.java   
private void revalidateTree() {
  FilteringTreeBuilder.revalidateTree(myTree);
}
项目:intellij-ce-playground    文件:FileStructureTestFixture.java   
public FilteringTreeBuilder getBuilder() {
  return getPopup().getTreeBuilder();
}
项目:intellij-ce-playground    文件:OptionsEditor.java   
private ActionCallback processSelected(final Configurable configurable, final Configurable oldConfigurable) {
  if (isShowing(configurable)) return ActionCallback.DONE;

  final ActionCallback result = new ActionCallback();

  if (configurable == null) {
    myOwnDetails.setContent(null);

    myFilter.updateSpotlight(true);
    checkModified(oldConfigurable);

    result.setDone();

  } else {
    getUiFor(configurable).doWhenDone(new EdtRunnable() {
      @Override
      public void runEdt() {
        if (myDisposed) return;

        final Configurable current = getContext().getCurrentConfigurable();
        if (current != configurable) {
          result.setRejected();
          return;
        }

        myHistory.pushQueryPlace();

        updateDetails();

        myOwnDetails.setContent(myContentWrapper);
        myOwnDetails.setBannerMinHeight(mySearchWrapper.getHeight());
        myOwnDetails.setText(getBannerText(configurable));
        if (myTreeView != null) {
          myOwnDetails.forProject(myTreeView.findConfigurableProject(configurable));
        }
        else if (Registry.is("ide.new.settings.dialog")) {
          myOwnDetails.forProject(myTree.getConfigurableProject(configurable));
        }

        final ConfigurableContent content = myConfigurable2Content.get(current);

        content.setText(getBannerText(configurable));
        content.setBannerActions(new Action[] {new ResetAction(configurable)});

        content.updateBannerActions();

        myLoadingDecorator.stopLoading();

        myFilter.updateSpotlight(false);

        checkModified(oldConfigurable);
        checkModified(configurable);

        FilteringTreeBuilder builder = myTreeView != null ? myTreeView.myBuilder : myTree.myBuilder;
        if (builder.getSelectedElements().size() == 0) {
          select(configurable).notify(result);
        } else {
          result.setDone();
        }
      }
    });
  }

  return result;
}
项目:intellij-ce-playground    文件:FileStructurePopup.java   
public FilteringTreeBuilder getTreeBuilder() {
  return myAbstractTreeBuilder;
}
项目:tools-idea    文件:FacetStructureConfigurable.java   
private void revalidateTree() {
  FilteringTreeBuilder.revalidateTree(myTree);
}
项目:tools-idea    文件:FileStructureTestBase.java   
protected FilteringTreeBuilder getBuilder() {
  return myPopup.getTreeBuilder();
}
项目:tools-idea    文件:FileStructurePopup.java   
public FilteringTreeBuilder getTreeBuilder() {
  return myAbstractTreeBuilder;
}
项目:consulo    文件:FileStructureTestBase.java   
protected FilteringTreeBuilder getBuilder() {
  return myPopup.getTreeBuilder();
}
项目:consulo    文件:FileStructurePopup.java   
public FilteringTreeBuilder getTreeBuilder() {
  return myAbstractTreeBuilder;
}