void (@NotNull ModuleRootEvent event) { // todo is this logic necessary? List<VirtualFile> existingFiles = myWatcher.getProjectTree().getProjectsFiles(); List<VirtualFile> newFiles = new ArrayList<>(); List<VirtualFile> deletedFiles = new ArrayList<>(); for (VirtualFile f : myWatcher.getProjectTree().getExistingManagedFiles()) { if (!existingFiles.contains(f)) { newFiles.add(f); } } for (VirtualFile f : existingFiles) { if (!f.isValid()) deletedFiles.add(f); } if (!deletedFiles.isEmpty() || !newFiles.isEmpty()) { myProjectManager.scheduleUpdateMavenProjects(new MavenImportSpec(false, false, true), newFiles, deletedFiles); } }