/** * Writes and applies the modified preferences. * @throws BackingStoreException */ public void flush() throws BackingStoreException { preferences.flush(); }
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"); } }
/** * Gets the plugin ID. * @return The ID of the Eclipse plugin whose preferences should be * altered. */ public String getPluginId() { return preferences.name(); }
@Override public void map(Map<String, ColorThemeSetting> theme, Map<String, ColorThemeMapping> overrideMappings) { preferences.putBoolean("AbstractTextEditor.Color.Background.SystemDefault", false); preferences.putBoolean("AbstractTextEditor.Color.Foreground.SystemDefault", false); preferences.putBoolean("AbstractTextEditor.Color.SelectionBackground.SystemDefault", false); preferences.putBoolean("AbstractTextEditor.Color.SelectionForeground.SystemDefault", false); super.map(theme, overrideMappings); } }
public void preferenceChange(IEclipsePreferences.PreferenceChangeEvent event) { // if we are the ones making this change, then don't broadcast if (!notify) return; Object oldValue = event.getOldValue(); Object newValue = event.getNewValue(); String key = event.getKey(); if (newValue == null) newValue = getDefault(key, oldValue); else if (oldValue == null) oldValue = getDefault(key, newValue); firePropertyChangeEvent(key, oldValue, newValue); }
@Override public void putPreferences(IEclipsePreferences preferences, ColorThemeSetting setting) { // Set the color itself super.putPreferences(preferences, setting); // Enables the color setting preferences.putBoolean(pluginKey + "Enabled", true); // Set style preferences.putInt(pluginKey + "Style", getStyleValue(setting)); }
/** * Returns the default value for the string-valued property * with the given name. * Returns the default-default value (the empty string <code>""</code>) * is no default property with the given name, or if the default * value cannot be treated as a string. * * @param name the name of the property * @return the default value of the named property */ @Override public String getDefaultString(String name) { return getDefaultPreferences().get(name, STRING_DEFAULT_DEFAULT); }
/** * Sets the plugin ID and loads preferences. * @param plugin The ID of the Eclipse plugin whose preferences should be * altered. */ @SuppressWarnings("deprecation") public void setPluginId(String plugin) { preferences = new InstanceScope().getNode(plugin); }
/** * Returns the default value for the boolean-valued property * with the given name. * Returns the default-default value (<code>false</code>) if there * is no default property with the given name, or if the default * value cannot be treated as a boolean. * * @param name the name of the property * @return the default value of the named property */ @Override public boolean getDefaultBoolean(String name) { return getDefaultPreferences().getBoolean(name, BOOLEAN_DEFAULT_DEFAULT); }
/** * Returns the default value for the integer-valued property * with the given name. * Returns the default-default value (<code>0</code>) if there * is no default property with the given name, or if the default * value cannot be treated as an integer. * * @param name the name of the property * @return the default value of the named property */ @Override public int getDefaultInt(String name) { return getDefaultPreferences().getInt(name, INT_DEFAULT_DEFAULT); }
/** * Returns the default value for the long-valued property * with the given name. * Returns the default-default value (<code>0L</code>) if there * is no default property with the given name, or if the default * value cannot be treated as a long. * * @param name the name of the property * @return the default value of the named property */ @Override public long getDefaultLong(String name) { return getDefaultPreferences().getLong(name, LONG_DEFAULT_DEFAULT); }
/** * Returns the default value for the double-valued property * with the given name. * Returns the default-default value (<code>0.0</code>) if there * is no default property with the given name, or if the default * value cannot be treated as a double. * * @param name the name of the property * @return the default value of the named property */ @Override public double getDefaultDouble(String name) { return getDefaultPreferences().getDouble(name, DOUBLE_DEFAULT_DEFAULT); }
/** * Returns the default value for the float-valued property * with the given name. * Returns the default-default value (<code>0.0f</code>) if there * is no default property with the given name, or if the default * value cannot be treated as a float. * * @param name the name of the property * @return the default value of the named property */ @Override public float getDefaultFloat(String name) { return getDefaultPreferences().getFloat(name, FLOAT_DEFAULT_DEFAULT); }
@Override public void map(Map<String, ColorThemeSetting> theme, Map<String, ColorThemeMapping> overrideMappings) { preferences.putBoolean("groovy.editor.groovyDoc.tag.enabled", true); preferences.putBoolean("groovy.editor.groovyDoc.keyword.enabled", true); preferences.putBoolean("groovy.editor.groovyDoc.link.enabled", true); super.map(theme, overrideMappings); } }
/** * Flush the values of these plug-in preferences to disk. * * @throws BackingStoreException */ public void flush() throws BackingStoreException { IEclipsePreferences node = getPluginPreferences(false); if (node != null) node.flush(); }
public void removePreferences(IEclipsePreferences preferences) { preferences.remove(pluginKey); }
@Override public void map(Map<String, ColorThemeSetting> theme, Map<String, ColorThemeMapping> overrideMappings) { preferences.putBoolean("AbstractTextEditor.Color.Background.SystemDefault", false); preferences.putBoolean("AbstractTextEditor.Color.Foreground.SystemDefault", false); super.map(theme, overrideMappings); } }
@Override public void map(Map<String, ColorThemeSetting> theme, Map<String, ColorThemeMapping> overrideMappings) { preferences.putBoolean("sourceHoverBackgroundColor.SystemDefault", false); super.map(theme, overrideMappings); } }
@Override public void map(Map<String, ColorThemeSetting> theme, Map<String, ColorThemeMapping> overrideMappings) { preferences.putBoolean("sourceHoverBackgroundColor.SystemDefault", false); super.map(theme, overrideMappings); } }