Package org.eclipse.core.runtime.preferences

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


      if (projectOptions == null) {
        // get eclipse preferences
        IEclipsePreferences projectPreferences= getEclipsePreferences();
        if (projectPreferences == null) return options; // cannot do better (non-Java project)
        // create project options
        String[] propertyNames = projectPreferences.keys();
        projectOptions = new Hashtable(propertyNames.length);
        for (int i = 0; i < propertyNames.length; i++){
          String propertyName = propertyNames[i];
          String value = projectPreferences.get(propertyName, null);
          if (value != null && optionNames.contains(propertyName)){
View Full Code Here


        }
       
        // reset to default all options not in new map
        // @see https://bugs.eclipse.org/bugs/show_bug.cgi?id=26255
        // @see https://bugs.eclipse.org/bugs/show_bug.cgi?id=49691
        String[] pNames = projectPreferences.keys();
        int ln = pNames.length;
        for (int i=0; i<ln; i++) {
          String key = pNames[i];
          if (!newOptions.containsKey(key)) {
            projectPreferences.remove(key); // old preferences => remove from preferences table
View Full Code Here

  private void initialize() {
    this.userLibraries = new HashMap();
    IEclipsePreferences instancePreferences = JavaModelManager.getJavaModelManager().getInstancePreferences();
    String[] propertyNames;
    try {
      propertyNames = instancePreferences.keys();
    } catch (BackingStoreException e) {
      Util.log(e, "Exception while initializing user libraries"); //$NON-NLS-1$
      return;
    }
View Full Code Here

    public boolean hasAnyAtLowestScope() {
        final IScopeContext sc = storeContext;
        final IEclipsePreferences p = sc.getNode(qualifier);
        if (p != null) {
            try {
                final String[] keys = p.keys();
                return keys.length > 0;
            } catch (final BackingStoreException e) {
            }
        }
        return false;
View Full Code Here

    public void removeAllAtLowestScope() {
        final IScopeContext sc = storeContext;
        final IEclipsePreferences p = sc.getNode(qualifier);
        if (p != null) {
            try {
                final String[] keys = p.keys();
                for (final String key : keys) {
                    remove(key, sc);
                }
                flush();
            } catch (final BackingStoreException e) {
View Full Code Here

    IEclipsePreferences store = new InstanceScope().getNode(Activator.PLUGIN_ID);
    List<MavenCommand> commands = new ArrayList<MavenCommand>();
    int commandNumber = 0;
    String[] keys;
    try {
      keys = store.keys();

      if (keys != null)
        for (String key : keys) {
          if (key.contains(PreferencesConstants.MAVEN_COMMAND_ALIAS)) {
            String sId = key
View Full Code Here

    }
   
    private void readPreviousProperties() {
        IEclipsePreferences node = getProjectPreferences(UI_STATE_NODE_ID);
        try {
            for(String key: node.keys()) {
                String value = node.get(key, null);
                if (value==null) continue;
                properties.put(key, value);
            }
        } catch (BackingStoreException e) {
View Full Code Here

    private Configuration readPreviousMapState() {
        IEclipsePreferences node = getProjectPreferences(POINT_NODE_ID);
        Builder builder = Configuration.builder();
        try {
            for (String key: node.keys()) {
                String pointString = node.get(key, null);
                if (pointString == null) continue;
                String[] split = pointString.split("@");
                // cover legacy format
                if (split.length != 2 ) split = pointString.split("#");
View Full Code Here

      if (projectOptions == null) {
        // get eclipse preferences
        IEclipsePreferences projectPreferences= getEclipsePreferences();
        if (projectPreferences == null) return options; // cannot do better (non-Java project)
        // create project options
        String[] propertyNames = projectPreferences.keys();
        projectOptions = new Hashtable(propertyNames.length);
        for (int i = 0; i < propertyNames.length; i++){
          String propertyName = propertyNames[i];
          String value = projectPreferences.get(propertyName, null);
          if (value != null) {
View Full Code Here

        }

        // reset to default all options not in new map
        // @see https://bugs.eclipse.org/bugs/show_bug.cgi?id=26255
        // @see https://bugs.eclipse.org/bugs/show_bug.cgi?id=49691
        String[] pNames = projectPreferences.keys();
        int ln = pNames.length;
        for (int i=0; i<ln; i++) {
          String key = pNames[i];
          if (!newOptions.containsKey(key)) {
            projectPreferences.remove(key); // old preferences => remove from preferences table
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.