use of org.osgi.service.prefs.Preferences in project azure-tools-for-java by Microsoft.
the class PreferenceUtil method getPreferenceKeys.
public static String[] getPreferenceKeys() {
String[] keys = null;
try {
Preferences prefs = PluginUtil.getPrefs(com.microsoft.azuretools.core.utils.Messages.prefFileName);
keys = prefs.keys();
} catch (BackingStoreException e) {
Activator.getDefault().log("Error", e);
}
return keys;
}
use of org.osgi.service.prefs.Preferences in project azure-tools-for-java by Microsoft.
the class PreferenceUtil method savePreferences.
public static void savePreferences(String name, String[] values) {
Preferences prefs = PluginUtil.getPrefs(com.microsoft.azuretools.core.utils.Messages.prefFileName);
prefs.put(name, convertToPreference(values));
try {
prefs.flush();
} catch (BackingStoreException e) {
Activator.getDefault().log("Error", e);
}
}
use of org.osgi.service.prefs.Preferences in project azure-tools-for-java by Microsoft.
the class PreferenceUtil method savePreference.
public static void savePreference(String name, String value) {
try {
Preferences prefs = PluginUtil.getPrefs(com.microsoft.azuretools.core.utils.Messages.prefFileName);
prefs.put(name, value);
prefs.flush();
} catch (BackingStoreException e) {
Activator.getDefault().log("Error", e);
}
}
use of org.osgi.service.prefs.Preferences in project jop by jop-devel.
the class JOPUIUtils method setProjectSetting.
public static void setProjectSetting(ILaunchConfiguration configuration, String key, String value) {
String projectName = getProjectName(configuration);
if (projectName == null) {
return;
}
IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);
IScopeContext scopeContext = new ProjectScope(project);
Preferences projectPrefs = scopeContext.getNode(IJOPUIConstants.PLUGIN_ID);
projectPrefs.put(key, value);
}
use of org.osgi.service.prefs.Preferences in project jop by jop-devel.
the class JOPPropertyPage method performOk.
/* (non-Javadoc)
* @see org.eclipse.jface.preference.FieldEditorPreferencePage#performOk()
*/
@Override
public boolean performOk() {
IScopeContext scopeContext = new ProjectScope(getProject());
Preferences projectPrefs = scopeContext.getNode(IJOPUIConstants.PLUGIN_ID);
if (isValid()) {
projectPrefs.put(IJOPLaunchConfigurationConstants.ATTR_JOP_HOME, jopDirectoryEditor.getStringValue());
projectPrefs.put(IJOPLaunchConfigurationConstants.ATTR_QUARTUS_PROJECT, quartusProjectFileEditor.getStringValue());
}
return super.performOk();
}
Aggregations