Package org.osgi.service.prefs

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


  /* (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


        break;
      }
    }
    final Preferences preferences = getPrefs();
    try {
      preferences.node(id).removeNode();
    } catch (BackingStoreException e) {
      // TODO Error logging
    }
  }
 
View Full Code Here

    private Preferences getUserPrefs(User user, URL location, String customer, String name) {
        Preferences userPrefs = m_preferences.getUserPreferences(user.getName());
        Preferences userAdminPrefs = userPrefs.node(REPOSITORY_USER_ADMIN_PREFS);
        Preferences repoPref = userAdminPrefs.node(location.getAuthority() + location.getPath());
        Preferences customerPref = repoPref.node(customer);
        return customerPref.node(name);
    }

    /**
     * Creates a cached repository based on preferences.
     */
 
View Full Code Here

        String[] name = paramsNode.childrenNames();

        Preferences plugin = paramsNode.node(name[0]);
        name = plugin.childrenNames();

        return plugin.node(name[0]);
    }

    /**
     * @return Returns the layer.
     * @uml.property name="layer"
View Full Code Here

        String[] name = paramsNode.childrenNames();

        Preferences plugin = paramsNode.node(name[0]);
        name = plugin.childrenNames();

        return plugin.node(name[0]);
    }
    /**
     * Save this local catalog to the provided file.
     *
     * @param catalogLocation
View Full Code Here

        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);
                String name = child.get(NAME_ID, null);
View Full Code Here

    }

    private void firstRun() throws Exception {
        // getWindowConfigurer().getWindow().getShell().setMaximized(true);
        Preferences userPreferences = UiPlugin.getUserPreferences();
        userPreferences
                .node("org.locationtech.udig.ui.firstRun").putBoolean("org.locationtech.udig.ui.isFirstRun", false); //$NON-NLS-1$ //$NON-NLS-2$

//        if (Platform.getOS().equals(Platform.OS_LINUX)) {
//            MessageDialog.openWarning(getWindowConfigurer().getWindow()
//                    .getShell(), "Warning", "Some Linux users have experienced issues with map display being slow or strange artifacts on some versions of Linux. This is now very rare but if you experience this problem go into the preferences and disable *Advanced Graphics*.");
 
View Full Code Here

    private Preferences getRepositoryPrefs(Preferences userPrefs, URL location, String customer, String name) {
        // Note: we can only use the getAuthority part of the URL for indexing, because the full URL will contain
        // in the protocol part.
        Preferences repoPref = userPrefs.node(location.getAuthority() + location.getPath());
        Preferences customerPref = repoPref.node(customer);
        return customerPref.node(name);
    }

    /**
     * Helper method for login.
     * @throws IOException
View Full Code Here

            m_log.log(LogService.LOG_WARNING, "Could not store all preferences for " + workingNode.absolutePath());
            e.printStackTrace();
        }
       
        for (Map.Entry<RepositoryObject, WorkingState> entry : m_workingState.entrySet()) {
            workingNode.node(entry.getKey().getDefinition()).put(PREFS_LOCAL_WORKING_STATE_VALUE, entry.getValue().toString());
        }

        m_prefs.putLong(PREFS_LOCAL_FILE_VERSION, m_repository.getMostRecentVersion());
    }
View Full Code Here

        // First, get all nodes and their workingstate.
        try {
            String defaultWorkingState = WorkingState.Unchanged.toString();

            for (String node : workingNode.childrenNames()) {
                String state = workingNode.node(node).get(PREFS_LOCAL_WORKING_STATE_VALUE, defaultWorkingState);
                entries.put(node, WorkingState.valueOf(state));
            }
        }
        catch (BackingStoreException e) {
            // Something went wrong reading from the store, just work with whatever we have in the map.
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.