Package org.eclim.plugin.core.preference

Examples of org.eclim.plugin.core.preference.Preferences


    Preferences.addOptionHandler("com.android.ide.eclipse.adt", new OptionHandler());
    ProjectNatureFactory.addNature("android", NATURE);
    ProjectManagement.addProjectManager(NATURE, new AndroidProjectManager());

    Preferences preferences = Preferences.getInstance();
    Option option = new Option();
    option.setNature(NATURE);
    option.setPath("Android");
    option.setName(AdtPrefs.PREFS_SDK_DIR);
    option.setValidator(new SdkValidator());
    preferences.addOption(option);

    String sdkLocation = AdtPrefs.getPrefs().getOsSdkFolder();
    if (sdkLocation == null || sdkLocation.length() == 0){
      logger.warn("Android SDK Location not set.");
    }else if (!new File(sdkLocation).exists()){
View Full Code Here


      OccurrencesAnalyzer analyzer = new OccurrencesAnalyzer();
      IMessage[] messages = analyzer.analyzeDocument(
        nature, module, analysisPreferences, document,
        new NullProgressMonitor(), indentPrefs);

      Preferences prefs = getPreferences();

      //Map<String,String> builtins = Preferences.getInstance()
      //  .getMapValue(project, "org.eclim.python.builtins");
      HashMap<Integer,Set<String>> ignores = new HashMap<Integer,Set<String>>();
      ignores.put(
          IAnalysisPreferences.TYPE_UNRESOLVED_IMPORT,
          prefs.getSetValue(project, "org.eclim.python.ignore.unresolved.imports"));
      ignores.put(
          IAnalysisPreferences.TYPE_ASSIGNMENT_TO_BUILT_IN_SYMBOL,
          prefs.getSetValue(project, "org.eclim.python.ignore.builtin.reserved"));

      ArrayList<Error> errors = new ArrayList<Error>();
      for (IMessage message : messages){
        // this results in a lot of false positives for runtime added attributes
        if (message.getType() ==
View Full Code Here

  {
    String name = commandLine.getValue(Options.PROJECT_OPTION);
    String file = commandLine.getValue(Options.FILE_OPTION);

    IProject project = ProjectUtils.getProject(name, true);
    Preferences prefs = getPreferences();

    String configFile =
      prefs.getValue(project, "org.eclim.java.checkstyle.config");
    String propsFile =
      prefs.getValue(project, "org.eclim.java.checkstyle.properties");

    Properties properties = System.getProperties();
    if (propsFile != null && !propsFile.equals(StringUtils.EMPTY)){
      FileInputStream fis = null;
      try{
View Full Code Here

    try{
      in = new FileReader(file);
      JsonStreamParser parser = new JsonStreamParser(in);
      JsonObject obj = (JsonObject)parser.next();

      Preferences preferences = getPreferences();
      for (Map.Entry<String,JsonElement> entry : obj.entrySet()){
        String name = entry.getKey();
        String value = entry.getValue().getAsString();
        try{
          preferences.setValue(name, value);
        }catch(IllegalArgumentException iae){
          errors.add(new Error(iae.getMessage(), null, 0, 0));
        }
      }
    }finally{
View Full Code Here

  {
    String name = commandLine.getValue(Options.PROJECT_OPTION);
    IProject project = ProjectUtils.getProject(name, true);
    String setting = commandLine.getValue(Options.SETTING_OPTION);

    Preferences preferences = getPreferences();

    if (commandLine.hasOption(Options.VALUE_OPTION)){
      String value = commandLine.getValue(Options.VALUE_OPTION);
      preferences.setValue(project, setting, value);
      return null;
    }

    return preferences.getValue(project, setting);
  }
View Full Code Here

    try{
      in = new FileReader(file);
      JsonStreamParser parser = new JsonStreamParser(in);
      JsonObject obj = (JsonObject)parser.next();

      Preferences preferences = getPreferences();
      for (Map.Entry<String,JsonElement> entry : obj.entrySet()){
        String name = entry.getKey();
        String value = entry.getValue().getAsString();
        try{
          preferences.setValue(project, name, value);
        }catch(IllegalArgumentException iae){
          errors.add(new Error(iae.getMessage(), null, 0, 0));
        }
      }
    }finally{
View Full Code Here

TOP

Related Classes of org.eclim.plugin.core.preference.Preferences

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.