private static void checkRenameModule(@NotNull Module module, @NotNull String newName) throws ConfigurationException {
    final ModifiableModuleModel modifiableModel = ModuleManager.getInstance(module.getProject()).getModifiableModel();
    try {
      modifiableModel.renameModule(module, newName);
    }
    catch (ModuleWithNameAlreadyExists moduleWithNameAlreadyExists) {
      throw new ConfigurationException(IdeBundle.message("error.module.already.exists", newName));
    }
  }
private static void checkRenameModule(@NotNull Module module, @NotNull String newName)