Package org.osgi.service.prefs

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


    private Preferences findNode( String code ) {
        try {
            Preferences root = UiPlugin.getUserPreferences();
            Preferences node = root.node(InstanceScope.SCOPE).node(CUSTOM_ID);

            if (node.nodeExists(code)) {
                return node.node(code);
            }

            for( String id : node.childrenNames() ) {
                Preferences child = node.node(id);
View Full Code Here


    @Override
    public void postWindowOpen() {
        super.postWindowOpen();
        try {
            Preferences userPreferences = UiPlugin.getUserPreferences();
            if (!userPreferences.nodeExists("org.locationtech.udig.ui.firstRun")) { //$NON-NLS-1$
                firstRun();
            } else {
                showTip();
            }
        } catch (Exception e) {
View Full Code Here

    }

    protected boolean loadState() {
        try {
            Preferences prefs = preferences.getUserPreferences("FeaturesServiceState");
            if (prefs.nodeExists("repositories")) {
                Set<URI> repositories = loadSet(prefs.node("repositories"));
                for (URI repo : repositories) {
                    internalAddRepository(repo);
                }
                installed = loadMap(prefs.node("features"));
View Full Code Here

      // String path = project.getName() + IPath.SEPARATOR +
      // ResourcesPlugin.PI_RESOURCES + IPath.SEPARATOR +
      // ENCODING_PREF_NODE;
      // return node.nodeExists(path) ? node.node(path) : null;
      // for now, take the long way
      if (!node.nodeExists(project.getName()))
        return null;
      node = node.node(project.getName());
      if (!node.nodeExists(JSPCORE_ID))
        return null;
      node = node.node(JSPCORE_ID);
View Full Code Here

      // return node.nodeExists(path) ? node.node(path) : null;
      // for now, take the long way
      if (!node.nodeExists(project.getName()))
        return null;
      node = node.node(project.getName());
      if (!node.nodeExists(JSPCORE_ID))
        return null;
      node = node.node(JSPCORE_ID);
      if (!node.nodeExists(preferenceKey))
        return null;
      return node.node(preferenceKey);
View Full Code Here

        return null;
      node = node.node(project.getName());
      if (!node.nodeExists(JSPCORE_ID))
        return null;
      node = node.node(JSPCORE_ID);
      if (!node.nodeExists(preferenceKey))
        return null;
      return node.node(preferenceKey);
    }
    catch (BackingStoreException e) {
      // nodeExists failed
View Full Code Here

      // String path = project.getName() + IPath.SEPARATOR +
      // ResourcesPlugin.PI_RESOURCES + IPath.SEPARATOR +
      // ENCODING_PREF_NODE;
      // return node.nodeExists(path) ? node.node(path) : null;
      // for now, take the long way
      if (!node.nodeExists(project.getName()))
        return null;
      node = node.node(project.getName());
      if (!node.nodeExists(HTMLCORE_ID))
        return null;
      node = node.node(HTMLCORE_ID);
View Full Code Here

      // return node.nodeExists(path) ? node.node(path) : null;
      // for now, take the long way
      if (!node.nodeExists(project.getName()))
        return null;
      node = node.node(project.getName());
      if (!node.nodeExists(HTMLCORE_ID))
        return null;
      node = node.node(HTMLCORE_ID);
      if (!node.nodeExists(preferenceKey))
        return null;
      return node.node(preferenceKey);
View Full Code Here

        return null;
      node = node.node(project.getName());
      if (!node.nodeExists(HTMLCORE_ID))
        return null;
      node = node.node(HTMLCORE_ID);
      if (!node.nodeExists(preferenceKey))
        return null;
      return node.node(preferenceKey);
    }
    catch (BackingStoreException e) {
      // nodeExists failed
View Full Code Here

    }

    protected boolean loadState() {
        try {
            Preferences prefs = preferences.getUserPreferences("FeaturesServiceState");
            if (prefs.nodeExists("repositories")) {
                Set<URI> repositories = loadSet(prefs.node("repositories"));
                for (URI repo : repositories) {
                    internalAddRepository(repo);
                }
                installed = loadMap(prefs.node("features"));
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.