Package org.eclipse.core.runtime.preferences

Examples of org.eclipse.core.runtime.preferences.IEclipsePreferences.node()


  @Test
  public void enablingValidators() throws BackingStoreException {
    IEclipsePreferences rootNode = Platform.getPreferencesService().getRootNode();
    assertTrue(manager.isEnabled(scriptProject));

    final Preferences globalNode = rootNode.node(InstanceScope.SCOPE).node(PEXAnalysisPlugin.VALIDATORS_PREFERENCES_NODE_ID);
    globalNode.putBoolean(PreferenceConstants.ENABLED, false);
    assertFalse(manager.isEnabled(scriptProject));

    Preferences projectNode = rootNode.node(ProjectScope.SCOPE).node(project.getName()).node(PEXAnalysisPlugin.VALIDATORS_PREFERENCES_NODE_ID);
    projectNode.putBoolean(PreferenceConstants.ENABLED, true);
View Full Code Here


    final Preferences globalNode = rootNode.node(InstanceScope.SCOPE).node(PEXAnalysisPlugin.VALIDATORS_PREFERENCES_NODE_ID);
    globalNode.putBoolean(PreferenceConstants.ENABLED, false);
    assertFalse(manager.isEnabled(scriptProject));

    Preferences projectNode = rootNode.node(ProjectScope.SCOPE).node(project.getName()).node(PEXAnalysisPlugin.VALIDATORS_PREFERENCES_NODE_ID);
    projectNode.putBoolean(PreferenceConstants.ENABLED, true);
    assertTrue(manager.isEnabled(scriptProject));

    projectNode.remove(PreferenceConstants.ENABLED);
   
View Full Code Here

    final String uiName = UIPlugin.getDefault().getBundle()
        .getSymbolicName();
    try {
      if (rootNode.nodeExists(uiName)) {
        ((IEclipsePreferences) rootNode.node(uiName))
            .addPreferenceChangeListener(PlatformUIPreferenceListener
                .getSingleton());
      }
    } catch (BackingStoreException e) {
      IStatus status = new Status(IStatus.ERROR, UIPlugin.getDefault()
View Full Code Here

    final String workbenchName = WorkbenchPlugin.getDefault().getBundle()
        .getSymbolicName();
    try {
      if (rootNode.nodeExists(workbenchName)) {
        ((IEclipsePreferences) rootNode.node(workbenchName))
            .addPreferenceChangeListener(PlatformUIPreferenceListener
                .getSingleton());
      }
    } catch (BackingStoreException e) {
      IStatus status = new Status(IStatus.ERROR, WorkbenchPlugin
View Full Code Here

     * @param e
     */
    public void loadFromFileOld(IServiceFactory factory, Throwable e) {
        IPreferencesService prefs = Platform.getPreferencesService();
        IEclipsePreferences root = prefs.getRootNode();
        Preferences node = root.node(InstanceScope.SCOPE).node(
                CatalogPlugin.ID + ".services"); //$NON-NLS-1$
        ServiceParameterPersister persister = new ServiceParameterPersister(this, factory);
        persister.restore(node);
    }

View Full Code Here

     * @throws BackingStoreException
     */
    public void restoreFromPreferences() throws BackingStoreException {
        IPreferencesService prefs = Platform.getPreferencesService();
        IEclipsePreferences root = prefs.getRootNode();
        Preferences node = root.node(InstanceScope.SCOPE).node(
                getBundle().getSymbolicName() + ".bookmarks"); //$NON-NLS-1$

        for( String projectId : node.childrenNames() ) {
            URI projectURI = URI.createURI(URI.decode(projectId));
            Preferences projectNode = node.node(projectId);
View Full Code Here

        if (mgr == null) {
            return; // nothing to save!
        }
        IPreferencesService prefs = Platform.getPreferencesService();
        IEclipsePreferences root = prefs.getRootNode();
        Preferences node = root.node(InstanceScope.SCOPE).node(
                getBundle().getSymbolicName() + ".bookmarks"); //$NON-NLS-1$
        clearPreferences(node);
        for( URI project : mgr.getProjects() ) {
            String projectString = project.toString();
            String encPStr = URI.encodeSegment(projectString, true);
View Full Code Here

            IEclipsePreferences child = getChild(scope, null);
            if (child == null) {
                child = new SLDPreferences(this, scope);
                addChild(scope, child);
            }
            return child.node(endIndex == -1 ? "" : path.substring(endIndex + 1)); //$NON-NLS-1$
        }

        /*
         * @see org.osgi.service.prefs.Preferences#sync()
         */
 
View Full Code Here

    this.prefs = prefs;
  }

  public static Bpmn2Preferences getPreferences(IProject project) {
    IEclipsePreferences rootNode = Platform.getPreferencesService().getRootNode();
    Preferences prefs = rootNode.node(ProjectScope.SCOPE).node(project.getName())
        .node("org.eclipse.bpmn2.modeler.tools");
    return new Bpmn2Preferences(prefs);
  }

  public List<ToolEnablement> getAllElements() {
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.