Package org.eclipse.core.runtime.preferences

Examples of org.eclipse.core.runtime.preferences.IPreferencesService


        }

    }

    private void readPref() {
        IPreferencesService prefs = Platform.getPreferencesService();
        parsePref(prefs
                .getString(JSLintPlugin.PLUGIN_ID, EXCLUDE_PATH_REGEXES_PREFERENCE, "", null));
    }
View Full Code Here


    /** Set up the current instance of JSLint using the current preferences. */
    public void configure() {
        JSLint lint = getJsLint();
        lint.resetOptions();
        IPreferencesService prefs = Platform.getPreferencesService();
        for (Option o : Option.values()) {
            String value = prefs.getString(JSLintPlugin.PLUGIN_ID, o.getLowerName(), null, null);
            if (value != null) {
                lint.addOption(o, value);
            }
        }
    }
View Full Code Here

   *
   * @return The line separator to use.
   */
  private static String getLineSeparator(IResource r) {
    if(r != null) {
      final IPreferencesService prefs = Platform.getPreferencesService();
      IScopeContext[] scopeContext = new IScopeContext[] { new ProjectScope(r.getProject()) };
      String lineSeparator = prefs.getString(
        Platform.PI_RUNTIME, Platform.PREF_LINE_SEPARATOR, null, scopeContext);
      if(lineSeparator != null)
        return lineSeparator;
      // line delimiter in workspace preference
      scopeContext = new IScopeContext[] { InstanceScope.INSTANCE };
      lineSeparator = prefs.getString(Platform.PI_RUNTIME, Platform.PREF_LINE_SEPARATOR, null, scopeContext);
      if(lineSeparator != null)
        return lineSeparator;
    }
    return getLineSeparator();
  }
View Full Code Here

TOP

Related Classes of org.eclipse.core.runtime.preferences.IPreferencesService

Copyright © 2018 www.massapicom. 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.