Package org.osgi.service.prefs

Examples of org.osgi.service.prefs.Preferences.node()


    {
        final Preferences prefs = getPreferencesRoot( createIfNecessary );
       
        if( prefs != null && ( prefs.nodeExists( PREFS_GLOBAL ) || createIfNecessary ) )
        {
            return prefs.node( PREFS_GLOBAL );
        }
       
        return null;
    }
   
View Full Code Here


       
        Preferences prefs = getPreferencesRoot( createIfNecessary );
       
        if( prefs != null && ( prefs.nodeExists( level1 ) || createIfNecessary ) )
        {
            prefs = prefs.node( level1 );
           
            if( prefs.nodeExists( level2 ) || createIfNecessary )
            {
                return prefs.node( level2 );
            }
View Full Code Here

        {
            prefs = prefs.node( level1 );
           
            if( prefs.nodeExists( level2 ) || createIfNecessary )
            {
                return prefs.node( level2 );
            }
        }
       
        return null;
    }
View Full Code Here

        final Preferences prefs = scope.getNode( this.pluginId );
        final String editorId = getClass().getName();
       
        if( prefs.nodeExists( editorId ) || createIfNecessary )
        {
            return prefs.node( editorId );
        }
       
        return null;
    }
View Full Code Here

  protected static void load(Collection<FabricDetails> cloudDetailList) {
    Preferences node = exemplar.getConfigurationNode();
    try {
      String[] childrenNames = node.childrenNames();
      for (String name : childrenNames) {
        cloudDetailList.add(new FabricDetails(name, node.node(name)));
      }
    } catch (BackingStoreException e) {
      FabricPlugin.showUserError("Failed to load fabric details", e.getMessage(), e);
    }
  }
View Full Code Here

  }

  public static FabricDetails copy(FabricDetails copy) {
    Preferences node = exemplar.getConfigurationNode();
    String id = copy.getId();
    return new FabricDetails(id, node.node(id));
  }

  @Override
  protected void store(Preferences node) {
    node.put("name", name);
View Full Code Here

    protected static void load(Collection<CloudDetails> cloudDetailList) {
        Preferences node = exemplar.getConfigurationNode();
        try {
            String[] childrenNames = node.childrenNames();
            for (String name : childrenNames) {
                cloudDetailList.add(new CloudDetails(name, node.node(name)));
            }
        } catch (BackingStoreException e) {
            FabricPlugin.showUserError("Failed to load cloud providers", e.getMessage(), e);
        }
    }
View Full Code Here

    }

    public static CloudDetails copy(CloudDetails copy) {
        Preferences node = exemplar.getConfigurationNode();
        String id = copy.getId();
        return new CloudDetails(id, node.node(id));
    }


    public CloudDetails() {
    }
View Full Code Here

  /* (non-Javadoc)
   * @see org.eclipse.core.runtime.preferences.PreferenceModifyListener#preApply(org.eclipse.core.runtime.preferences.IEclipsePreferences)
   */
  public IEclipsePreferences preApply(IEclipsePreferences node) {
    Preferences instance = node.node(InstanceScope.SCOPE);
    cleanJavaCore(instance.node(JavaCore.PLUGIN_ID));
    return super.preApply(node);
  }

  /**
   * Clean imported preferences from obsolete keys.
View Full Code Here

      // we must not create empty preference nodes, so first check if the node exists
      if (root.nodeExists(InstanceScope.SCOPE)) {
        Preferences instance = root.node(InstanceScope.SCOPE);
        // we must not create empty preference nodes, so first check if the node exists
        if (instance.nodeExists(JavaCore.PLUGIN_ID)) {
          cleanJavaCore(instance.node(JavaCore.PLUGIN_ID));
        }
      }
    } catch (BackingStoreException e) {
      // do nothing
    }
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.