void (DebuggerTreeNodeImpl scopeNode) { final TreePath rootPath = new TreePath(scopeNode.getPath()); final int rowCount = getRowCount(); for (int idx = rowCount - 1; idx >= 0; idx--) { final TreePath treePath = getPathForRow(idx); if (treePath != null) { if (!rootPath.isDescendant(treePath)) { continue; } final DebuggerTreeNodeImpl pathNode = (DebuggerTreeNodeImpl)treePath.getLastPathComponent(); final NodeDescriptorImpl descriptor = pathNode.getDescriptor(); if (descriptor != null && descriptor.myIsVisible) { final Rectangle visibleRect = descriptor.getUserData(VISIBLE_RECT); if (visibleRect != null) { // prefer visible rect scrollRectToVisible(visibleRect); } else { scrollPathToVisible(treePath); } break; } } } }