I'd rather see

setPreferenceValue(module, IJBossToolingConstants.LOCAL_DEPLOYMENT_OUTPUT_NAME, name);

with 

protected void setPreferenceValue(IModule module, String propertyName, String value) throws IllegalStateException {
     verifyWorkingCopy();
     DeploymentPreferences prefs = DeploymentPreferencesLoader.loadPreferencesFromServer(getServerOrWC());
     DeploymentModulePrefs modPrefs = prefs.getOrCreatePreferences().getOrCreateModulePrefs(module);
     modPrefs.setProperty(propertyName, value);    
     DeploymentPreferencesLoader.savePreferencesToServerWorkingCopy(getWorkingCopy(), prefs);
  }