Examples of IPersistentPreferenceStore


Examples of org.eclipse.jface.preference.IPersistentPreferenceStore

  /**
   * Save palette item customizations
   * @param paletteRoot
   */
  public static void save(DesignerPaletteRoot paletteRoot) {
    IPersistentPreferenceStore prefs = getPreferenceStore();

    for (Iterator it=paletteRoot.getChildren().iterator();it.hasNext();){
      PaletteEntry entry = (PaletteEntry)it.next();
      if (entry instanceof TaglibPaletteDrawer){
        TaglibPaletteDrawer pd = (TaglibPaletteDrawer)entry;
        prefs.putValue(PREFS_TAGLIBHIDE_PREFIX + pd.getURI(), Boolean.toString(! pd.isVisible()));
      }
    }
    PaletteItemManager.notifyPaletteItemManagersOfCustomizationsUpdate(paletteRoot.getPaletteManager());
   
  }
View Full Code Here

Examples of org.eclipse.jface.preference.IPersistentPreferenceStore

  /**
   * Hide a category (TaglibPaletteDrawer) that will be persisted as a customization
   * @param taglibPaletteDrawer
   */
  public static void hideTaglibDrawer(TaglibPaletteDrawer taglibPaletteDrawer){
    IPersistentPreferenceStore prefs = getPreferenceStore();
    taglibPaletteDrawer.setVisible(false);
    prefs.putValue(PREFS_TAGLIBHIDE_PREFIX + taglibPaletteDrawer.getURI(), Boolean.TRUE.toString());
    save((DesignerPaletteRoot)taglibPaletteDrawer.getParent());
  }
View Full Code Here

Examples of org.eclipse.jface.preference.IPersistentPreferenceStore

   *
   */
  public static void save() {
    IPreferenceStore store = getPreferenceStore();
    if (store instanceof IPersistentPreferenceStore) {
      IPersistentPreferenceStore pstore = (IPersistentPreferenceStore) store;
      if (pstore.needsSaving()) {
        try {
          pstore.save();
        } catch (IOException up) {
          // hmm, what should we do?
        }
      }
    }
View Full Code Here

Examples of org.eclipse.jface.preference.IPersistentPreferenceStore

    final MenuManager mgr = new MenuManager();
    Control c = getControl();
    c.setMenu(mgr.createContextMenu(c));

    IPersistentPreferenceStore pstore = (IPersistentPreferenceStore) store;

    showTagSequencePrefAction = new BooleanPrefAction(pstore,
        UIPreferences.HISTORY_SHOW_TAG_SEQUENCE,
        UIText.ResourceHistory_ShowTagSequence) {
      @Override
View Full Code Here

Examples of org.eclipse.jface.preference.IPersistentPreferenceStore

      options.put(name, value);
      DLTKCore.setOptions((Hashtable)options);
    }*/
    if(VERSION.equals(name)){
      getValues().put(VERSION, value);
      IPersistentPreferenceStore store = getPreferences();
      store.setValue(name.substring(PREFIX.length()), value);
      store.save();
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.