void () { indicator.checkCanceled(); PathElement next = positionInPath == path.length - 1 ? null : path[positionInPath + 1]; if (next == null) return; Object parent = treePath.getLastPathComponent(); TreeModel model = tree.tree.getModel(); int childCount = model.getChildCount(parent); for (int j = 0; j < childCount; j++) { Object child = tree.tree.getModel().getChild(parent, j); if (next.isMatchTo(child)) { expandImpl(positionInPath + 1, path, treePath.pathByAddingChild(child), tree, indicator); break; } } }