TreeState (@NotNull JTree tree, @NotNull TreePath rootPath) { return new TreeState(createPaths(tree, TreeUtil.collectExpandedPaths(tree, rootPath)), createPaths(tree, TreeUtil.collectSelectedPaths(tree, rootPath))); }