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