Пример #1
0
  private void setupVMLanguages() {
    List<String> vmLanguageList = config.getVMLanguageList();

    addVMLanguages(config);

    vmLanguageList = config.getVMLanguageList();

    Collections.sort(vmLanguageList);

    languageList.addAll(vmLanguageList);

    comboBoxVMLanguage.getSelectionModel().select(VM_LANGUAGE_JAVA);
  }
Пример #2
0
  private void addVMLanguages(JITWatchConfig config) {
    List<String> vmLanguageList = config.getVMLanguageList();

    if (!vmLanguageList.contains(JITWatchConstants.VM_LANGUAGE_JAVA)) {
      config.addOrUpdateVMLanguage(VM_LANGUAGE_JAVA, System.getProperty("java.home"));
    }
    if (!vmLanguageList.contains(JITWatchConstants.VM_LANGUAGE_SCALA)) {
      config.addOrUpdateVMLanguage(VM_LANGUAGE_SCALA, S_EMPTY);
    }
    if (!vmLanguageList.contains(JITWatchConstants.VM_LANGUAGE_JRUBY)) {
      config.addOrUpdateVMLanguage(VM_LANGUAGE_JRUBY, S_EMPTY);
    }
    if (!vmLanguageList.contains(JITWatchConstants.VM_LANGUAGE_GROOVY)) {
      config.addOrUpdateVMLanguage(VM_LANGUAGE_GROOVY, S_EMPTY);
    }
    if (!vmLanguageList.contains(JITWatchConstants.VM_LANGUAGE_KOTLIN)) {
      config.addOrUpdateVMLanguage(VM_LANGUAGE_KOTLIN, S_EMPTY);
    }
    if (!vmLanguageList.contains(JITWatchConstants.VM_LANGUAGE_JAVASCRIPT)) {
      config.addOrUpdateVMLanguage(VM_LANGUAGE_JAVASCRIPT, System.getProperty("java.home"));
    }
    if (!vmLanguageList.contains(JITWatchConstants.VM_LANGUAGE_CLOJURE)) {
      config.addOrUpdateVMLanguage(VM_LANGUAGE_CLOJURE, S_EMPTY);
    }

    config.saveConfig();
  }