Package org.eclipse.ui.preferences

Examples of org.eclipse.ui.preferences.ScopedPreferenceStore


     * @return the preference store
     */
    public IPreferenceStore getPreferenceStore() {
        // Create the preference store lazily.
        if (preferenceStore == null) {
            preferenceStore = new ScopedPreferenceStore(new InstanceScope(),getBundle().getSymbolicName());
        }
        return preferenceStore;
    }
View Full Code Here


  /** */
  public WindowCachePreferencePage() {
    super(GRID);
    setTitle(UIText.WindowCachePreferencePage_title);
    ScopedPreferenceStore store = new ScopedPreferenceStore(
        InstanceScope.INSTANCE, Activator.getPluginId());
    setPreferenceStore(store);
  }
View Full Code Here

  /**
   * The default constructor
   */
  public ProjectsPreferencePage() {
    super(GRID);
    ScopedPreferenceStore store = new ScopedPreferenceStore(
        InstanceScope.INSTANCE, Activator.getPluginId());
    setPreferenceStore(store);
  }
View Full Code Here

    return plugin;
  }

  public IPreferenceStore getPreferenceStore() {
    if (this.preferenceStore == null) {
      this.preferenceStore = new ScopedPreferenceStore(InstanceScope.INSTANCE, getBundle().getSymbolicName());

    }
    return this.preferenceStore;
  }
View Full Code Here

  public ProjectTemplateStore(IProject project) {
    fInstanceStore = PHPUiPlugin.getDefault().getCodeTemplateStore();
    if (project == null) {
      fProjectStore = null;
    } else {
      final ScopedPreferenceStore projectSettings = new ScopedPreferenceStore(
          new ProjectScope(project), PHPUiPlugin.ID);
      fProjectStore = new TemplateStore(projectSettings, KEY) {
        /*
         * Make sure we keep the id of added code templates - add
         * removes it in the usual add() method
         */
        public void add(TemplatePersistenceData data) {
          internalAdd(data);
        }

        public void save() throws IOException {

          StringWriter output = new StringWriter();
          TemplateReaderWriter writer = new TemplateReaderWriter();
          writer.save(getTemplateData(false), output);

          projectSettings.setValue(KEY, output.toString());
          projectSettings.save();
        }
      };
    }
  }
View Full Code Here

    }

    public ArduinoPreferencePage() {
  super(org.eclipse.jface.preference.FieldEditorPreferencePage.GRID);
  setDescription("Arduino Settings for this workspace");
  setPreferenceStore(new ScopedPreferenceStore(InstanceScope.INSTANCE, ArduinoConst.NODE_ARDUINO));
    }
View Full Code Here

      }
      public void removeListener(ILabelProviderListener listener) {
      }
    });
   
    ScopedPreferenceStore store = new ScopedPreferenceStore(
        new ProjectScope(getProject()), ClickPlugin.PLUGIN_ID);
    String vars = store.getString(ClickPlugin.PREF_VELOCITY_VARS);
    if(vars != null && vars.length() > 0){
      models = VariableModel.deserialize(vars);
    }
   
    viewer.setInput(models);
View Full Code Here

    models.clear();
    super.performDefaults();
  }

  public boolean performOk() {
    ScopedPreferenceStore store = new ScopedPreferenceStore(
        new ProjectScope(getProject()), ClickPlugin.PLUGIN_ID);
    store.setValue(ClickPlugin.PREF_VELOCITY_VARS, VariableModel.serialize(models));
    try {
      store.save();
    } catch(IOException ex){
      ClickPlugin.log(ex);
      return false;
    }
    return super.performOk();
View Full Code Here

            return processType(type, result, matchString, offset);
          }
        }
      }
      // prefeberce objects
      ScopedPreferenceStore store = new ScopedPreferenceStore(
          new ProjectScope(file.getProject()), ClickPlugin.PLUGIN_ID);
      String vars = store.getString(ClickPlugin.PREF_VELOCITY_VARS);
      if(vars != null && vars.length() > 0){
        preferenceObjects = VariableModel.deserialize(vars);
        for(int i=0;i<preferenceObjects.size();i++){
          VariableModel model = preferenceObjects.get(i);
          if(matchString.startsWith("$" + model.name + ".") || matchString.startsWith("${" + model.name + ".")){
View Full Code Here

  private IPreferenceStore corePreferenceStore;
 
    public IPreferenceStore getCorePreferenceStore() {
        // Create the preference store lazily.
        if (corePreferenceStore == null) {
          corePreferenceStore = new ScopedPreferenceStore(InstanceScope.INSTANCE, LangCore.PLUGIN_ID);
        }
        return corePreferenceStore;
    }
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.