void (@NotNull final Module moduleToRemove, @NotNull Collection<? extends ModifiableRootModel> otherModuleRootModels, @NotNull final ModifiableModuleModel moduleModel) { removeDependenciesOnModules(Collections.singleton(moduleToRemove.getName()), otherModuleRootModels); moduleModel.disposeModule(moduleToRemove); }