void (boolean fromRoot, @NotNull Set<? extends VirtualFile> updatedFiles) { if (fromRoot) { updateAll(null); } else { long time = System.currentTimeMillis(); LOG.debug("found ", updatedFiles.size(), " changed files"); TreeCollector<VirtualFile> collector = TreeCollector.VirtualFileRoots.create(); for (VirtualFile file : updatedFiles) { if (!file.isDirectory()) file = file.getParent(); if (file != null && findArea(file, project) != null) collector.add(file); } List<VirtualFile> roots = collector.get(); LOG.debug("found ", roots.size(), " roots in ", System.currentTimeMillis() - time, "ms"); myStructureTreeModel.getInvoker().invoke(() -> roots.forEach(root -> updateByFile(root, true))); } }