Package org.eclipse.ui.preferences

Examples of org.eclipse.ui.preferences.ScopedPreferenceStore


public class FullScreenPreferenceInitializer extends
    AbstractPreferenceInitializer {

  public void initializeDefaultPreferences() {
    ScopedPreferenceStore preferences = new ScopedPreferenceStore(
        InstanceScope.INSTANCE, FullScreenActivator.ID);
    preferences.setDefault(FullScreenActivator.HIDE_MENU_BAR, true);
    preferences.setDefault(FullScreenActivator.HIDE_STATUS_BAR, true);
    preferences.setDefault(FullScreenActivator.FULLSCREEN_STARTUP, false);
  }
View Full Code Here


  private ScopedPreferenceStore preferences;

  public FullScreenPreferencePage() {
    super(GRID);
    preferences = new ScopedPreferenceStore(InstanceScope.INSTANCE,
        FullScreenActivator.ID);
    setPreferenceStore(preferences);
  }
View Full Code Here

        // .fbprefs
        // so check if the file is there...
        IFile file = getUserPreferencesFile(project);
        boolean projectPropsEnabled = file.isAccessible();
        if (projectPropsEnabled) {
            ScopedPreferenceStore store = new ScopedPreferenceStore(new ProjectScope(project), PLUGIN_ID);
            // so if the file is there, we can check if after 1.3.8 the flag is
            // set
            // to use workspace properties instead
            projectPropsEnabled = !store.contains(FindBugsConstants.PROJECT_PROPS_DISABLED)
                    || !store.getBoolean(FindBugsConstants.PROJECT_PROPS_DISABLED);
        }
        // remember in the session to speedup access, don't touch the store
        setProjectSettingsEnabled(project, null, projectPropsEnabled);
        return projectPropsEnabled;
    }
View Full Code Here

     * @return the preferences for the project or prefs from workspace
     */
    public static IPreferenceStore getPluginPreferences(IProject project) {
        if (project == null || !isProjectSettingsEnabled(project)) {
            // read workspace (user) settings from instance area
            return new ScopedPreferenceStore(new InstanceScope(), FindbugsPlugin.PLUGIN_ID);
        }

        // use project settings
        return new ScopedPreferenceStore(new ProjectScope(project), FindbugsPlugin.PLUGIN_ID);
    }
View Full Code Here

    public synchronized IPreferenceStore getPreferenceStore()
    {
        // Create the preference store lazily.
        if (this.preferenceStore == null)
        {
            this.preferenceStore = new ScopedPreferenceStore(
                    new InstanceScope(), getBundle().getSymbolicName());

        }
        return this.preferenceStore;
    }
View Full Code Here

      adapter = getElement().getAdapter(IResource.class);
    }
    if (adapter != null && adapter instanceof IResource) {
      String preferenceKey = TagModelQuery.createPreferenceKey(((IResource) adapter).getFullPath());
      new DefaultScope().getNode(JSPCorePlugin.getDefault().getBundle().getSymbolicName()).put(preferenceKey, fValues[0]);
      ScopedPreferenceStore store = new ScopedPreferenceStore(new ProjectScope(((IResource) adapter).getProject()), JSPCorePlugin.getDefault().getBundle().getSymbolicName());

      String[][] entryNamesAndValues = new String[][]{{fDisplayTypes[0], fValues[0]}, {fDisplayTypes[1], fValues[1]}};
      fComboFieldEditor = new ComboFieldEditor(preferenceKey, JSPUIMessages.JSPFContentSettingsPropertyPage_2, entryNamesAndValues, composite);
      fComboFieldEditor.fillIntoGrid(composite, 2);
      fComboFieldEditor.setPreferenceStore(store);
View Full Code Here

  public static final IEclipsePreferences getInstanceNode() {
    return InstanceScope.INSTANCE.getNode(Resources.PLUGIN_ID);
  }

  public static final ScopedPreferenceStore getInstanceStore() {
    return new ScopedPreferenceStore(
        InstanceScope.INSTANCE, Resources.PLUGIN_ID);
  }
View Full Code Here

        return parent;
    }

    private void initPreferencesStore(IProject currProject) {
        workspaceStore = new ScopedPreferenceStore(new InstanceScope(), FindbugsPlugin.PLUGIN_ID);
        if (currProject != null) {
            projectStore = new ScopedPreferenceStore(new ProjectScope(currProject), FindbugsPlugin.PLUGIN_ID);
            projectPropsInitiallyEnabled = FindbugsPlugin.isProjectSettingsEnabled(currProject);
            if (!projectPropsInitiallyEnabled) {
                // use workspace properties instead
                currProject = null;
            }
View Full Code Here

  public static String getDevicePortNumber() {
      return plugin.getPreferenceStore().getString(PORT_NUMBER_SETTING);
  }

  public static String getPathToAdb() {
      IPreferenceStore ps = new ScopedPreferenceStore(InstanceScope.INSTANCE,
              "com.android.ide.eclipse.adt");
      return ps.getString("com.android.ide.eclipse.adt.sdk") + File.separator + "platform-tools" + File.separator;
  }
View Full Code Here

  private ScopedPreferenceStore preferenceStore;

  public static final String LINK_WITH_EDITOR_KEY = "linkWithEditor";

  public RailroadViewPreferences() {
    preferenceStore = new ScopedPreferenceStore(ConfigurationScope.INSTANCE, "ANTLR Syntax Diagram");
  }
View Full Code Here

TOP

Related Classes of org.eclipse.ui.preferences.ScopedPreferenceStore

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.