/** * Sets the default value for the long-valued property with the * given name. * <p> * Note that the current value of the property is affected if * the property's current value was its old default value, in which * case it changes to the new default value. If the property's current * is different from its old default value, its current value is * unaffected. No property change events are reported by changing default * values. * </p> * * @param name the name of the property * @param value the new default value for the property */ @Override public void setDefault(String name, long value) { getDefaultPreferences().putLong(name, value); }
@Override public void setDefault(String name, long value) { getDefaultPreferences().putLong(name, value); }
/** * Sets a long in the {@link DefaultScope} * @param qualifier the preference qualifier * @param key the key * @param value the new value */ public static synchronized void setDefaultLong(String qualifier, String key, long value) { contexts[DEFAULT_CONTEXT].getNode(qualifier).putLong(key, value); }
public void setDefault(String name, long value) { getDefaultPreferences().putLong(name, value); }
/** * Sets the default value for the long-valued property with the * given name. * <p> * Note that the current value of the property is affected if * the property's current value was its old default value, in which * case it changes to the new default value. If the property's current * is different from its old default value, its current value is * unaffected. No property change events are reported by changing default * values. * </p> * * @param name the name of the property * @param value the new default value for the property */ @Override public void setDefault(String name, long value) { getDefaultPreferences().putLong(name, value); }
/** * Sets a long preference in the {@link InstanceScope} or the given {@link IScopeContext} if it * is not <code>null</code>. Preferences set in a given context are flushed as they are set. * @param qualifier the preference qualifier * @param key the key * @param value the value * @param context the context to set the value in */ public static synchronized void setLong(String qualifier, String key, long value, IScopeContext context) { if(context != null) { try { IEclipsePreferences node = context.getNode(qualifier); node.putLong(key, value); node.flush(); } catch(BackingStoreException bse) { DebugPlugin.log(bse); } } else { contexts[INSTANCE_CONTEXT].getNode(qualifier).putLong(key, value); } }
@Override public void setValue(String name, long value) { long oldValue = getLong(name); if (oldValue == value) { return; } try { silentRunning = true;// Turn off updates from the store if (getDefaultLong(name) == value) { getStorePreferences().remove(name); } else { getStorePreferences().putLong(name, value); } dirty = true; firePropertyChangeEvent(name, Long.valueOf(oldValue), Long.valueOf(value)); } finally { silentRunning = false;// Restart listening to preferences } }
public void setValue(String name, long value) { long oldValue = getLong(name); if (oldValue == value) { return; } try { silentRunning = true;// Turn off updates from the store if (getDefaultLong(name) == value) { getStorePreferences().remove(name); } else { getStorePreferences().putLong(name, value); } dirty = true; firePropertyChangeEvent(name, Long.valueOf(oldValue), Long.valueOf(value)); } finally { silentRunning = false;// Restart listening to preferences } }
@Override public void initializeDefaultPreferences() { IEclipsePreferences node = DefaultScope.INSTANCE.getNode(ResourcesPlugin.PI_RESOURCES); // auto-refresh default node.putBoolean(ResourcesPlugin.PREF_AUTO_REFRESH, PREF_AUTO_REFRESH_DEFAULT); node.putBoolean(ResourcesPlugin.PREF_LIGHTWEIGHT_AUTO_REFRESH, PREF_LIGHTWEIGHT_AUTO_REFRESH_DEFAULT); // linked resources default node.putBoolean(ResourcesPlugin.PREF_DISABLE_LINKING, PREF_DISABLE_LINKING_DEFAULT); // build manager defaults node.putBoolean(ResourcesPlugin.PREF_AUTO_BUILDING, PREF_AUTO_BUILDING_DEFAULT); node.put(ResourcesPlugin.PREF_BUILD_ORDER, PREF_BUILD_ORDER_DEFAULT); node.putInt(ResourcesPlugin.PREF_MAX_BUILD_ITERATIONS, PREF_MAX_BUILD_ITERATIONS_DEFAULT); node.putBoolean(ResourcesPlugin.PREF_DEFAULT_BUILD_ORDER, PREF_DEFAULT_BUILD_ORDER_DEFAULT); // history store defaults node.putBoolean(ResourcesPlugin.PREF_APPLY_FILE_STATE_POLICY, PREF_APPLY_FILE_STATE_POLICY_DEFAULT); node.putLong(ResourcesPlugin.PREF_FILE_STATE_LONGEVITY, PREF_FILE_STATE_LONGEVITY_DEFAULT); node.putLong(ResourcesPlugin.PREF_MAX_FILE_STATE_SIZE, PREF_MAX_FILE_STATE_SIZE_DEFAULT); node.putInt(ResourcesPlugin.PREF_MAX_FILE_STATES, PREF_MAX_FILE_STATES_DEFAULT); // save manager defaults node.putLong(ResourcesPlugin.PREF_SNAPSHOT_INTERVAL, PREF_SNAPSHOT_INTERVAL_DEFAULT); node.putInt(PREF_OPERATIONS_PER_SNAPSHOT, PREF_OPERATIONS_PER_SNAPSHOT_DEFAULT); node.putLong(PREF_DELTA_EXPIRATION, PREF_DELTA_EXPIRATION_DEFAULT); // encoding defaults node.put(ResourcesPlugin.PREF_ENCODING, PREF_ENCODING_DEFAULT); }
@Override public void initializeDefaultPreferences() { IEclipsePreferences node = DefaultScope.INSTANCE.getNode(ResourcesPlugin.PI_RESOURCES); // auto-refresh default node.putBoolean(ResourcesPlugin.PREF_AUTO_REFRESH, PREF_AUTO_REFRESH_DEFAULT); node.putBoolean(ResourcesPlugin.PREF_LIGHTWEIGHT_AUTO_REFRESH, PREF_LIGHTWEIGHT_AUTO_REFRESH_DEFAULT); // linked resources default node.putBoolean(ResourcesPlugin.PREF_DISABLE_LINKING, PREF_DISABLE_LINKING_DEFAULT); // build manager defaults node.putBoolean(ResourcesPlugin.PREF_AUTO_BUILDING, PREF_AUTO_BUILDING_DEFAULT); node.put(ResourcesPlugin.PREF_BUILD_ORDER, PREF_BUILD_ORDER_DEFAULT); node.putInt(ResourcesPlugin.PREF_MAX_BUILD_ITERATIONS, PREF_MAX_BUILD_ITERATIONS_DEFAULT); node.putBoolean(ResourcesPlugin.PREF_DEFAULT_BUILD_ORDER, PREF_DEFAULT_BUILD_ORDER_DEFAULT); // history store defaults node.putBoolean(ResourcesPlugin.PREF_APPLY_FILE_STATE_POLICY, PREF_APPLY_FILE_STATE_POLICY_DEFAULT); node.putLong(ResourcesPlugin.PREF_FILE_STATE_LONGEVITY, PREF_FILE_STATE_LONGEVITY_DEFAULT); node.putLong(ResourcesPlugin.PREF_MAX_FILE_STATE_SIZE, PREF_MAX_FILE_STATE_SIZE_DEFAULT); node.putInt(ResourcesPlugin.PREF_MAX_FILE_STATES, PREF_MAX_FILE_STATES_DEFAULT); // save manager defaults node.putLong(ResourcesPlugin.PREF_SNAPSHOT_INTERVAL, PREF_SNAPSHOT_INTERVAL_DEFAULT); node.putInt(PREF_OPERATIONS_PER_SNAPSHOT, PREF_OPERATIONS_PER_SNAPSHOT_DEFAULT); node.putLong(PREF_DELTA_EXPIRATION, PREF_DELTA_EXPIRATION_DEFAULT); // encoding defaults node.put(ResourcesPlugin.PREF_ENCODING, PREF_ENCODING_DEFAULT); }
@Override public void initializeDefaultPreferences() { IEclipsePreferences node = DefaultScope.INSTANCE.getNode(ResourcesPlugin.PI_RESOURCES); // auto-refresh default node.putBoolean(ResourcesPlugin.PREF_AUTO_REFRESH, PREF_AUTO_REFRESH_DEFAULT); node.putBoolean(ResourcesPlugin.PREF_LIGHTWEIGHT_AUTO_REFRESH, PREF_LIGHTWEIGHT_AUTO_REFRESH_DEFAULT); // linked resources default node.putBoolean(ResourcesPlugin.PREF_DISABLE_LINKING, PREF_DISABLE_LINKING_DEFAULT); // build manager defaults node.putBoolean(ResourcesPlugin.PREF_AUTO_BUILDING, PREF_AUTO_BUILDING_DEFAULT); node.put(ResourcesPlugin.PREF_BUILD_ORDER, PREF_BUILD_ORDER_DEFAULT); node.putInt(ResourcesPlugin.PREF_MAX_BUILD_ITERATIONS, PREF_MAX_BUILD_ITERATIONS_DEFAULT); node.putBoolean(ResourcesPlugin.PREF_DEFAULT_BUILD_ORDER, PREF_DEFAULT_BUILD_ORDER_DEFAULT); node.putInt(ResourcesPlugin.PREF_MISSING_NATURE_MARKER_SEVERITY, PREF_MISSING_NATURE_MARKER_SEVERITY_DEFAULT); // history store defaults node.putBoolean(ResourcesPlugin.PREF_APPLY_FILE_STATE_POLICY, PREF_APPLY_FILE_STATE_POLICY_DEFAULT); node.putLong(ResourcesPlugin.PREF_FILE_STATE_LONGEVITY, PREF_FILE_STATE_LONGEVITY_DEFAULT); node.putLong(ResourcesPlugin.PREF_MAX_FILE_STATE_SIZE, PREF_MAX_FILE_STATE_SIZE_DEFAULT); node.putInt(ResourcesPlugin.PREF_MAX_FILE_STATES, PREF_MAX_FILE_STATES_DEFAULT); // save manager defaults node.putLong(ResourcesPlugin.PREF_SNAPSHOT_INTERVAL, PREF_SNAPSHOT_INTERVAL_DEFAULT); node.putInt(PREF_OPERATIONS_PER_SNAPSHOT, PREF_OPERATIONS_PER_SNAPSHOT_DEFAULT); node.putLong(PREF_DELTA_EXPIRATION, PREF_DELTA_EXPIRATION_DEFAULT); // encoding defaults node.put(ResourcesPlugin.PREF_ENCODING, PREF_ENCODING_DEFAULT); // parallel builds defaults node.putInt(ResourcesPlugin.PREF_MAX_CONCURRENT_BUILDS, PREF_MAX_CONCURRENT_BUILDS_DEFAULT); }