Пример #1
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();
  }
Пример #2
0
  private void saveEditorPaneConfig() {
    List<String> editorPanePaths = new ArrayList<>();

    for (Tab tab : tabPane.getTabs()) {
      EditorPane pane = (EditorPane) tab.getContent();

      if (pane != null && pane.getSourceFile() != null) {
        String editorPanePath = pane.getSourceFile().getAbsolutePath();
        editorPanePaths.add(editorPanePath);
      }
    }

    config.setLastEditorPaneList(editorPanePaths);
    config.saveConfig();
  }