Java Code Examples for org.eclipse.core.runtime.preferences.IEclipsePreferences#keys()
The following examples show how to use
org.eclipse.core.runtime.preferences.IEclipsePreferences#keys() .
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: AbstractProfileManager.java From xtext-xtend with Eclipse Public License 2.0 | 6 votes |
/** * @param uiPrefs * @param allOptions */ private void addAll(IEclipsePreferences uiPrefs, Map allOptions) { try { String[] keys = uiPrefs.keys(); for (int i = 0; i < keys.length; i++) { String key = keys[i]; String val = uiPrefs.get(key, null); if (val != null) { allOptions.put(key, val); } } } catch (BackingStoreException e) { // ignore } }
Example 2
Source File: ProfileManager.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 6 votes |
/** * @param uiPrefs * @param allOptions */ private void addAll(IEclipsePreferences uiPrefs, Map<String, String> allOptions) { try { String[] keys= uiPrefs.keys(); for (int i= 0; i < keys.length; i++) { String key= keys[i]; String val= uiPrefs.get(key, null); if (val != null) { allOptions.put(key, val); } } } catch (BackingStoreException e) { // ignore } }
Example 3
Source File: ExecutableEntry.java From ice with Eclipse Public License 1.0 | 6 votes |
/** * This operation loads the ExecutableEntry from Eclipse Preferences. * @param prefId */ public void loadFromPreferences(String prefId) { // Get the Application preferences IEclipsePreferences prefs = InstanceScope.INSTANCE.getNode(prefId); try { for (String key : prefs.keys()) { String pref = prefs.get(key, ""); if (!pref.isEmpty()) { allowedValues.add(pref); allowedValueToURI.put(pref, URI.create(key)); } } } catch (BackingStoreException e) { logger.error(getClass().getName() + " Exception!", e); } if (!allowedValues.isEmpty()) { allowedValues.add(0, "Select Application"); setDefaultValue(allowedValues.get(0)); } else { allowedValues.add("Import Application"); setDefaultValue(allowedValues.get(0)); } }
Example 4
Source File: CordovaEngineProvider.java From thym with Eclipse Public License 1.0 | 5 votes |
private List<HybridMobileEngine> getPreferencesEngines(){ List<HybridMobileEngine> preferencesEngines = new ArrayList<>(); IEclipsePreferences preferences = InstanceScope.INSTANCE.getNode(HybridCore.PLUGIN_ID); try { for(String key: preferences.keys()){ String value = preferences.get(key, ""); preferencesEngines.add(createEngine(key, value)); } } catch (BackingStoreException e) { // TODO Auto-generated catch block e.printStackTrace(); } return preferencesEngines; }