void (List<Module> obsoleteModules) { MavenUtil.invokeAndWaitWriteAction(myProject, () -> setMavenizedModules(obsoleteModules, false)); MavenUtil.invokeAndWaitWriteAction(myProject, () -> myModelsProvider.dispose()); }