public void removeModule(@NotNull Module module){
  checkInitialized();
  String moduleGradlePath=getModuleGradlePath(module);
  if (moduleGradlePath != null) {
    removeModule(moduleGradlePath);
  }
}

public void removeModule ( @ NotNull Module module ) { checkInitialized ( ) ; String moduleGradlePath = getModuleGradlePath ( module ) ; if ( moduleGradlePath != null ) { removeModule ( moduleGradlePath ) ; } }
removes the reference to the module from the settings file , if present . must be run inside a write action .
