/**
  * Gets the workspace preference.
  *
  * @param name the name
  * @param clazz the clazz
  * @return the workspace preference
  */
 private static Object getWorkspacePreference(String name, Class<?> clazz) {
   return PreferencesFacade.getPreference(DWSCorePlugin.getDefault(), name, clazz);
 }
Example #2
0
 /** Inits the defaults. */
 public static void initDefaults() {
   defaultValues = new HashMap<String, String>();
   defaultValues.put(PropertiesNames.P_USE_WORSPACE_PREFERENCES, "true");
   defaultValues.put(
       PropertiesNames.P_MAVEN_CONSIDER_OPTIONAL_LIBRARIES,
       PreferencesFacade.getPreference(
           DWSCorePlugin.getDefault(),
           PreferencesNames.P_MAVEN_CONSIDER_OPTIONAL_LIBRARIES,
           Boolean.class));
   defaultValues.put(
       PropertiesNames.P_MAVEN_CONFLICTING_AUTOMATICALLY_REMOVE,
       PreferencesFacade.getPreference(
           DWSCorePlugin.getDefault(),
           PreferencesNames.P_MAVEN_CONFLICTING_AUTOMATICALLY_REMOVE,
           Boolean.class));
   defaultValues.put(
       PropertiesNames.P_MAVEN_DEAL_WITH_DEPENDENCIES_OF_UNDETERMINED_OR_RESTRICTIVE_SCOPE,
       PreferencesFacade.getPreference(
           DWSCorePlugin.getDefault(),
           PreferencesNames.P_MAVEN_DEAL_WITH_DEPENDENCIES_OF_UNDETERMINED_OR_RESTRICTIVE_SCOPE,
           Boolean.class));
   defaultValues.put(
       PropertiesNames.P_MAVEN_DEAL_WITH_TRANSITIVE_DEPENDENCIES,
       PreferencesFacade.getPreference(
           DWSCorePlugin.getDefault(),
           PreferencesNames.P_MAVEN_DEAL_WITH_TRANSITIVE_DEPENDENCIES,
           Boolean.class));
   defaultValues.put(
       PropertiesNames.P_MAVEN_TRANSITIVE_DEPENDENCIES_AUTOMATICALLY_ADD,
       PreferencesFacade.getPreference(
           DWSCorePlugin.getDefault(),
           PreferencesNames.P_MAVEN_TRANSITIVE_DEPENDENCIES_AUTOMATICALLY_ADD,
           Boolean.class));
   defaultValues.put(
       PropertiesNames.P_MAVEN_UNDETERMINED_OR_RESTRICTIVE_AUTOMATICALLY_ADD,
       PreferencesFacade.getPreference(
           DWSCorePlugin.getDefault(),
           PreferencesNames.P_MAVEN_UNDETERMINED_OR_RESTRICTIVE_AUTOMATICALLY_ADD,
           Boolean.class));
   defaultValues.put(
       PropertiesNames.P_MAVEN_FOLDER,
       PreferencesFacade.getPreference(
           DWSCorePlugin.getDefault(), PreferencesNames.P_MAVEN_DEFAULT_FOLDER, String.class));
   defaultValues.put(
       PropertiesNames.P_MAVEN_WEBAPP_FOLDER,
       PreferencesFacade.getPreference(
           DWSCorePlugin.getDefault(),
           PreferencesNames.P_MAVEN_DEFAULT_WEBAPP_FOLDER,
           String.class));
   defaultValues.put(
       PropertiesNames.P_MAVEN_POM_FILE_NAMES,
       PreferencesFacade.getPreference(
           DWSCorePlugin.getDefault(), PreferencesNames.P_MAVEN_POM_FILE_NAMES, String.class));
   defaultValues.put(
       PropertiesNames.P_MAVEN_POM_FILE_ENCODING,
       PreferencesFacade.getPreference(
           DWSCorePlugin.getDefault(), PreferencesNames.P_MAVEN_POM_FILE_ENCODING, String.class));
   defaultValues.put(
       PropertiesNames.P_MAVEN_USE_LIBRARY_CONTAINER,
       PreferencesFacade.getPreference(
           DWSCorePlugin.getDefault(),
           PreferencesNames.P_MAVEN_USE_LIBRARY_CONTAINER,
           Boolean.class));
   // defaultValues.put(PropertiesNames.P_MAVEN_USE_VARIABLE,
   // PreferencesFacade.getPreference(DWSCorePlugin.getDefault(),
   // PreferencesNames.P_MAVEN_USE_VARIABLE, Boolean.class));
   defaultValues.put(
       PropertiesNames.P_MAVEN_VARIABLE_NAME,
       PreferencesFacade.getPreference(
           DWSCorePlugin.getDefault(), PreferencesNames.P_MAVEN_VARIABLE_NAME, String.class));
   defaultValues.put(
       PropertiesNames.P_MAVEN_APPEND_REPOSITORY_NAME,
       PreferencesFacade.getPreference(
           DWSCorePlugin.getDefault(),
           PreferencesNames.P_MAVEN_APPEND_REPOSITORY_NAME,
           String.class));
   defaultValues.put(PropertiesNames.P_MAVEN_PROJECT_SKIPPED_DEPENDENCIES, "");
 }