Java Code Examples for org.eclipse.core.runtime.preferences.DefaultScope#getNode()

The following examples show how to use org.eclipse.core.runtime.preferences.DefaultScope#getNode() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ProfileManager.java    From APICloud-Studio with GNU General Public License v3.0 6 votes vote down vote up
private Map<String, String> loadDefaultSettings()
{
	Map<String, String> settings = new HashMap<String, String>();
	PreferenceKey[] keys = getPreferenceKeys();
	if (keys != null)
	{
		DefaultScope scope = EclipseUtil.defaultScope();
		for (PreferenceKey key : keys)
		{
			String name = key.getName();
			IEclipsePreferences preferences = scope.getNode(key.getQualifier());
			String value = preferences.get(name, null);
			if (value != null)
				settings.put(name, value);
		}
	}
	return settings;
}
 
Example 2
Source File: SettingsPreferenceStore.java    From elexis-3-core with Eclipse Public License 1.0 2 votes vote down vote up
/**
 * Constructor for the SettingsPreferenceStore registered initializers
 * (org.eclipse.core.runtime.preferences) will be executed.
 * 
 * @param base
 * @param pluginId
 */
public SettingsPreferenceStore(Settings base, String pluginId){
	this.base = base;
	defaultContext = new DefaultScope();
	defaultContext.getNode(pluginId);
}