use of com.intellij.util.concurrency.InvokerSupplier in project consulo by consulo.
the class AbstractProjectViewPane method createTreeExpander.
@Nonnull
protected TreeExpander createTreeExpander() {
return new DefaultTreeExpander(this::getTree) {
private boolean isExpandAllAllowed() {
JTree tree = getTree();
TreeModel model = tree == null ? null : tree.getModel();
return model == null || model instanceof AsyncTreeModel || model instanceof InvokerSupplier;
}
@Override
public boolean isExpandAllVisible() {
// && Registry.is("ide.project.view.expand.all.action.visible", true);
return isExpandAllAllowed();
}
@Override
public boolean canExpand() {
return isExpandAllAllowed() && super.canExpand();
}
@Override
protected void collapseAll(@Nonnull JTree tree, boolean strict, int keepSelectionLevel) {
super.collapseAll(tree, false, keepSelectionLevel);
}
};
}
Aggregations