public void removePreferences(IEclipsePreferences preferences) { preferences.remove(pluginKey + separator + "enabled"); preferences.remove(pluginKey + separator + "color"); preferences.remove(pluginKey + separator + "bold"); preferences.remove(pluginKey + separator + "italic"); preferences.remove(pluginKey + separator + "underline"); preferences.remove(pluginKey + separator + "strikethrough"); } }
public void removePreferences(IEclipsePreferences preferences) { preferences.remove(pluginKey); }
/** * Sets the current value of the property with the given name back * to its default value. Has no effect if the property does not have * its own current value. * <p> * Note that the recommended way of re-initializing a property to the * appropriate default value is to call <code>setToDefault</code>. * This is implemented by removing the named value from the object, * thereby exposing the default value. * </p> * <p> * A property change event is always reported. In the event * object, the property name is the name of the property, and the * old and new values are either strings, or <code>null</code> * indicating the default-default value. * </p> * * @param name the name of the property */ @Override public void setToDefault(String name) { IEclipsePreferences preferences = getPluginPreferences(true); Object oldValue = preferences.get(name, null); if (oldValue != null) preferences.remove(name); }
@Override public void putPreferences(IEclipsePreferences preferences, ColorThemeSetting setting) { preferences.put(pluginKey, setting.getColor().asRGB()); if (pluginKey.endsWith("TexColor")) { String styleKey = pluginKey.replaceAll("Color", "Style"); if (setting.isBoldEnabled() != null && setting.isBoldEnabled()) { preferences.putInt(styleKey, 1); } else if (setting.isItalicEnabled() != null && setting.isItalicEnabled()) { preferences.putInt(styleKey, 2); } else { preferences.remove(styleKey); } } } }
public static void removeProjectValues(IEclipsePreferences projectNode) { for (int i = 0; i < keys.length; i++) { projectNode.remove(keys[i]); } }
@Override void write(String key, String value) { if (value == null) { this.preferences.remove(key); } else { this.preferences.put(key, value); } }
@Override public boolean visit(IEclipsePreferences node) throws BackingStoreException { if (node.name().equals(PDECore.PLUGIN_ID)) { // Importing the preferences should not change the current target platform node.remove(ICoreConstants.WORKSPACE_TARGET_HANDLE); return false; } return true; }
private void removeExportedPreferences() { ignoreEvents = true; for (MPerspective persp : exportedPersps) { preferences.remove(persp.getLabel() + PERSPECTIVE_SUFFIX_4X); } ignoreEvents = false; exportedPersps.clear(); }
/** * {@inheritDoc} */ public void disableProjectSettings() { fContext.getNode(JavaUI.ID_PLUGIN).remove(getPreferenceKey()); }
public void setStoredValue(IScopeContext context, String value, IWorkingCopyManager manager) { if (value != null) { getNode(context, manager).put(fKey, value); } else { getNode(context, manager).remove(fKey); } }
public void setValue(String name, String value) { // Do not turn on silent running here as Strings are propagated if (getDefaultString(name).equals(value)) { getStorePreferences().remove(name); } else { getStorePreferences().put(name, value); } dirty = true; }
@Override public void setValue(String name, String value) { // Do not turn on silent running here as Strings are propagated if (getDefaultString(name).equals(value)) { getStorePreferences().remove(name); } else { getStorePreferences().put(name, value); } dirty = true; }
@Override public void disableProjectSettings() { super.disableProjectSettings(); IEclipsePreferences node= fContext.getNode(JavaUI.ID_PLUGIN); Set<String> keys= JavaPlugin.getDefault().getCleanUpRegistry().getDefaultOptions(CleanUpConstants.DEFAULT_SAVE_ACTION_OPTIONS).getKeys(); for (Iterator<String> iterator= keys.iterator(); iterator.hasNext();) { String key= iterator.next(); node.remove(CleanUpPreferenceUtil.SAVE_PARTICIPANT_KEY_PREFIX + key); } }
public void setStoredValue(IScopeContext context, String value, IWorkingCopyManager manager) { if (value != null) { getNode(context, manager).put(fKey, value); } else { getNode(context, manager).remove(fKey); } }
public void performDefaults() { fPrefs.remove(JavaCore.JAVA_FORMATTER); if (fFormatterCombo == null) { return; } int index= getFormatterIndex(fDefaultFormatterId); fFormatterCombo.select(index); handleFormatterChanged(); }
public void clearAllSettings(IScopeContext context) { for (int i= 0; i < fKeySets.length; i++) { updatePreferences(context.getNode(fKeySets[i].getNodeName()), fKeySets[i].getKeys(), Collections.<String, String>emptyMap()); } final IEclipsePreferences uiPrefs= context.getNode(JavaUI.ID_PLUGIN); uiPrefs.remove(fProfileKey); }
public void clearAllSettings(IScopeContext context) { for (int i= 0; i < fKeySets.length; i++) { updatePreferences(context.getNode(fKeySets[i].getNodeName()), fKeySets[i].getKeys(), Collections.<String, String>emptyMap()); } final IEclipsePreferences uiPrefs= context.getNode(JavaUI.ID_PLUGIN); uiPrefs.remove(fProfileKey); }
public void clearAllSettings(IScopeContext context) { for (int i= 0; i < fKeySets.length; i++) { updatePreferences(context.getNode(fKeySets[i].getNodeName()), fKeySets[i].getKeys(), Collections.EMPTY_MAP); } final IEclipsePreferences uiPrefs= context.getNode(JavaUI.ID_PLUGIN); uiPrefs.remove(fProfileKey); }
public static void setFlag(String flagId, int value) { if (getDefaultFlag(flagId) == value) new InstanceScope().getNode(PDE.PLUGIN_ID).remove(flagId); else new InstanceScope().getNode(PDE.PLUGIN_ID).putInt(flagId, value); }