SOE if pass through mode is on and there are >= 144 elements in the tree

This commit is contained in:
Konstantin Bulenkov
2012-03-08 16:25:40 +01:00
parent 0cdd7a5904
commit 387d563991
@@ -4067,7 +4067,24 @@ public class AbstractTreeUi {
return preselectedRow;
}
private void expandAllWithoutRecursion(@Nullable final Runnable onDone) {
final JTree tree = getTree();
int myCurrentRow = 0;
if (tree.getRowCount() > 0) {
while (myCurrentRow < tree.getRowCount()) {
final TreePath path = tree.getPathForRow(myCurrentRow);
final Object last = path.getLastPathComponent();
final Object elem = getElementFor(last);
expand(elem, null);
myCurrentRow++;
}
}
runDone(onDone);
}
public void expandAll(@Nullable final Runnable onDone) {
if (isPassthroughMode()) expandAllWithoutRecursion(onDone);
final JTree tree = getTree();
if (tree.getRowCount() > 0) {
final int expandRecursionDepth = Math.max(2, Registry.intValue("ide.tree.expandRecursionDepth"));