/** * 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); }
public ContentTypeManager() { super(null, new InstanceScope()); }
public IEclipsePreferences getPreferences() { return INSTANCE_SCOPE.getNode(PLUGIN_ID); }
public IScopeContext getInstanceScope() { return new InstanceScope(); }
private PreferenceListenerInstaller(PreferenceableOption2<?> option) { this.option = option; String qualifier = option.getPluginId(); INSTANCE_SCOPE_INSTANCE.getNode(qualifier).addPreferenceChangeListener(this); }
/** * Return the preferences node in the instance scope */ IEclipsePreferences getInstancePreferences(){ return new InstanceScope().getNode(ID); }
public ContentTypeManager() { super(null, new InstanceScope()); }
public void performFinish() { if (descriptor != null) { IEclipsePreferences node = INSTANCE_SCOPE.getNode(ConverterPlugin.ID); node.put(modelConverterManager.getClass().getName(), descriptor.getID()); try { node.flush(); } catch (BackingStoreException exception) { ConverterPlugin.INSTANCE.log(exception); } } }
/** * Accessor for the preference store for this bundle * * @return The {@link IEclipsePreferences} preference node at the instance scope for this bundle or null if it does * not exist. */ public static IEclipsePreferences getPreferences() { return new InstanceScope().getNode(TracingConstants.BUNDLE_ID); }
public ContentTypeManager() { super(null, new InstanceScope()); }
private IEclipsePreferences getPreferences() { return new InstanceScope().getNode(FrameworkUtil.getBundle( ThemeEngine.class).getSymbolicName()); }
@Override public IPreferenceStore getPreferenceStore() { // Create the preference store lazily. if(preferenceStore == null) { // InstanceScope.INSTANCE added in 3.7 preferenceStore = new ScopedPreferenceStore(new InstanceScope(), IMavenConstants.PLUGIN_ID); } return preferenceStore; }
/** * Saves INSTANCE preferences */ public static void save() { try { new InstanceScope().getNode(PDE.PLUGIN_ID).flush(); } catch (BackingStoreException e) { } } }
private static IPreferenceStore getPreferenceStore() { return new ScopedPreferenceStore(new InstanceScope(), QUALIFIER); }
private void installPreferenceListener() { fPreferenceChangeListener= new IPreferenceChangeListener() { public void preferenceChange(PreferenceChangeEvent event) { if (event.getKey().equals(CleanUpConstants.SHOW_CLEAN_UP_WIZARD)) { updateActionLabel(); } } }; new InstanceScope().getNode(JavaUI.ID_PLUGIN).addPreferenceChangeListener(fPreferenceChangeListener); }
/** * @return the preference store for this bundle * TODO: this is copied from AbstractUIPlugin; need to upgrade to new IPreferencesService */ public IPreferenceStore getPreferenceStore() { // Create the preference store lazily. if ( this.preferenceStore == null) { this.preferenceStore = new ScopedPreferenceStore(new InstanceScope(),getBundle().getSymbolicName()); } return this.preferenceStore; } }
public void dispose() { if (fPreferenceChangeListener != null) { new InstanceScope().getNode(JavaUI.ID_PLUGIN).removePreferenceChangeListener(fPreferenceChangeListener); fPreferenceChangeListener= null; } } }
private Hashtable loadProfiles() { List list= CleanUpPreferenceUtil.loadProfiles(new InstanceScope()); Hashtable profileIdsTable= new Hashtable(); for (Iterator iterator= list.iterator(); iterator.hasNext();) { Profile profile= (Profile)iterator.next(); profileIdsTable.put(profile.getID(), profile); } return profileIdsTable; }
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); }
/** * Returns the line delimiter of the Eclipse platform. * * @return The line delimiter used by the Eclipse platform. * @since 3.3 */ public static String getLineSeparator() { IScopeContext scope = new InstanceScope(); IEclipsePreferences node = scope.getNode(Platform.PI_RUNTIME); return node.get(Platform.PREF_LINE_SEPARATOR, System.getProperty("line.separator")); //$NON-NLS-1$ } }