}
private void loadPreferences() {
EditableProperties properties = getEditableProperties();
ivyEnabled = Utilities.getBoolean(properties.get(IVY_ENABLED_KEY), false);
IvyOptions optionsLookup = Lookup.getDefault().lookup(IvyOptions.class);
if (ivyEnabled) {
Collection<String> propertiesFiles = Utilities.stringToCollection(properties.get(IVY_PROPERTIES_FILES_KEY));
setIvySettingsFile(properties.get(IVY_SETTINGS_FILE_KEY));
setIvyFile(properties.get(IVY_FILE_KEY));
for (String propertyFile : propertiesFiles) {
addPropertyFile(propertyFile);
}
globalRetrieveSettingsName = properties.get(IVY_GLOBAL_RETRIEVE_NAME_KEY);
if (Utilities.isNotNullOrEmpty(globalRetrieveSettingsName)) {
updateTemplateSettings(optionsLookup, properties);
} else {
projectRetrieveSettings = loadIvyRetrieveSettings(properties);
useGlobalRetrieveSettings = false;
}
autoResolve = Utilities.getBoolean(properties.get(IVY_AUTO_RESOLVE_KEY), true);
useCachePath = Utilities.getBoolean(properties.get(IVY_USE_CACHE_PATH_KEY), true);
allConfsSelected = Utilities.getBoolean(properties.get(IVY_ALL_CONFS_SELECTED_KEY), true);
if (!allConfsSelected){
Collection<String> savedSelectedConfs = Utilities.stringToCollection(properties.get(IVY_SELECTED_CONFS_KEY));
selectedConfs.addAll(savedSelectedConfs);
}
} else {
String templateName = optionsLookup.getDefaultTemplateName();
projectRetrieveSettings = optionsLookup.getIvyRetrieveSettingsTemplate(templateName);
useGlobalRetrieveSettings = true;
globalRetrieveSettingsName = templateName;
autoResolve = true;
}