void (@NotNull Project project) { for (AbstractProjectViewPane pane : AbstractProjectViewPane.EP.getExtensions(project)) { JTree tree = pane.getTree(); if (tree != null) { TreeUtil.collapseAll(tree, 0); } } }