コード例 #1
0
  public void reset() {
    basePackageField.setText(myData.getBasePackage());
    myFSCRadioButton.setSelected(myData.getFsc());
    myRunSeparateCompilerRadioButton.setSelected(!myData.getFsc());
    updateLibrariesList();
    setCompilerLibraryById(
        new LibraryId(myData.getCompilerLibraryName(), myData.getCompilerLibraryLevel()));
    myMaximumHeapSize.setText(Integer.toString(myData.getMaximumHeapSize()));
    myVmParameters.setText(myData.getVmOptions());

    myEnableWarnings.setSelected(myData.getWarnings());
    myDeprecationWarnings.setSelected(myData.getDeprecationWarnings());
    myUncheckedWarnings.setSelected(myData.getUncheckedWarnings());
    myOptimiseBytecode.setSelected(myData.getOptimiseBytecode());
    myExplainTypeErrors.setSelected(myData.getExplainTypeErrors());
    myEnableContinuations.setSelected(myData.getContinuations());

    myDebuggingInfoLevel.setSelectedItem(myData.getDebuggingInfoLevel());
    myCompilerOptions.setText(myData.getCompilerOptions());

    myPlugins =
        new ArrayList(
            CompilerPlugin.fromPaths(myData.getPluginPaths(), myEditorContext.getModule()));
    getPluginsModel().setItems(myPlugins);
  }
 @Override
 protected void resetEditorFrom(GoApplicationConfiguration configuration) {
   applicationName.setText(configuration.scriptName);
   appArguments.setText(configuration.scriptArguments);
   builderArguments.setText(configuration.builderArguments);
   buildBeforeRunCheckBox.setSelected(configuration.goBuildBeforeRun);
   buildDirectoryPathBrowser.setText(configuration.goOutputDir);
   workingDirectoryBrowser.setText(configuration.workingDir);
 }
コード例 #3
0
  @Override
  public void reset(@NotNull HttpConfigurable settings) {
    myNoProxyRb.setSelected(true); // default
    myAutoDetectProxyRb.setSelected(settings.USE_PROXY_PAC);
    myPacUrlCheckBox.setSelected(settings.USE_PAC_URL);
    myPacUrlTextField.setText(settings.PAC_URL);
    myUseHTTPProxyRb.setSelected(settings.USE_HTTP_PROXY);
    myProxyAuthCheckBox.setSelected(settings.PROXY_AUTHENTICATION);

    enableProxy(settings.USE_HTTP_PROXY);

    myProxyLoginTextField.setText(settings.getProxyLogin());
    myProxyPasswordTextField.setText(settings.getPlainProxyPassword());

    myProxyPortTextField.setNumber(settings.PROXY_PORT);
    myProxyHostTextField.setText(settings.PROXY_HOST);
    myProxyExceptions.setText(StringUtil.notNullize(settings.PROXY_EXCEPTIONS));

    myRememberProxyPasswordCheckBox.setSelected(settings.KEEP_PROXY_PASSWORD);
    mySocks.setSelected(settings.PROXY_TYPE_IS_SOCKS);
    myHTTP.setSelected(!settings.PROXY_TYPE_IS_SOCKS);

    boolean showError = !StringUtil.isEmptyOrSpaces(settings.LAST_ERROR);
    myErrorLabel.setVisible(showError);
    myErrorLabel.setText(showError ? errorText(settings.LAST_ERROR) : null);

    final String oldStyleText =
        CommonProxy.getMessageFromProps(CommonProxy.getOldStyleProperties());
    myOtherWarning.setVisible(oldStyleText != null);
    if (oldStyleText != null) {
      myOtherWarning.setText(oldStyleText);
      myOtherWarning.setIcon(Messages.getWarningIcon());
    }
  }
コード例 #4
0
 /** If we're using ghc-mod >= 5.4, ghc-modi will be configured as `ghc-mod legacy-interactive` */
 private void ghcModLegacyInteractivePreSaveHook() {
   // If ghc-mod is not configured or is not >= 5.4, we can't infer legacy-interactive.
   if (ghcModPath.getText().isEmpty() || !isGhcMod5_4(ghcModPath.getText())) return;
   // If ghc-modi is configured and it is not >= 5.4, leave it alone.
   if (!ghcModiPath.getText().isEmpty() && !isGhcMod5_4(ghcModiPath.getText())) return;
   // If all is good, configure ghc-modi as legacy-interactive.
   ghcModiPath.setText(ghcModPath.getText());
   // If the current ghc-modi flags contains the `legacy-interactive` command, do not add it back.
   if (!ghcModiFlags.getText().contains("legacy-interactive")) {
     ghcModiFlags.setText(ghcModiFlags.getText() + " legacy-interactive");
   }
 }
コード例 #5
0
  public void reset() {
    myEnableCompileServer.setSelected(mySettings.COMPILE_SERVER_ENABLED);
    myCompilationServerPort.setText(mySettings.COMPILE_SERVER_PORT);

    Sdk sdk =
        mySettings.COMPILE_SERVER_SDK == null
            ? null
            : ProjectJdkTable.getInstance().findJdk(mySettings.COMPILE_SERVER_SDK);
    myCompilationServerSdk.setSelectedJdk(sdk);

    myCompilationServerMaximumHeapSize.setText(mySettings.COMPILE_SERVER_MAXIMUM_HEAP_SIZE);
    myCompilationServerJvmParameters.setText(mySettings.COMPILE_SERVER_JVM_PARAMETERS);
    showTypeInfoOnCheckBox.setSelected(mySettings.SHOW_TYPE_TOOLTIP_ON_MOUSE_HOVER);
    delaySpinner.setValue(mySettings.SHOW_TYPE_TOOLTIP_DELAY);
  }
コード例 #6
0
  @Override
  protected void resetEditorFrom(@NotNull ErlangConsoleRunConfiguration config) {
    myModuleComboBox.removeAllItems();
    for (final Module module : config.getValidModules()) {
      if (ModuleType.get(module) == ErlangModuleType.getInstance()) {
        myModuleComboBox.addItem(module);
      }
    }
    myModuleComboBox.setSelectedItem(myInitialModule);
    //noinspection unchecked
    myModuleComboBox.setRenderer(getListCellRendererWrapper());

    myWorkingDirPathField.setText(config.getWorkingDirPath());
    myModuleComboBox.setSelectedItem(config.getConfigurationModule().getModule());
    myConsoleArgsEditor.setText(config.getConsoleArgs());
  }
コード例 #7
0
  @Override
  public void reset() {
    generateNoWarningsCheckBox.setSelected(commonCompilerArguments.suppressWarnings);
    additionalArgsOptionsField.setText(compilerSettings.getAdditionalArguments());
    scriptTemplatesField.setText(compilerSettings.getScriptTemplates());
    scriptTemplatesClasspathField.setText(compilerSettings.getScriptTemplatesClasspath());
    copyRuntimeFilesCheckBox.setSelected(compilerSettings.getCopyJsLibraryFiles());
    outputDirectory.setText(compilerSettings.getOutputDirectoryForJsLibraryFiles());

    if (compilerWorkspaceSettings != null) {
      enablePreciseIncrementalCheckBox.setSelected(
          compilerWorkspaceSettings.getPreciseIncrementalEnabled());
      keepAliveCheckBox.setSelected(compilerWorkspaceSettings.getEnableDaemon());
    }

    generateSourceMapsCheckBox.setSelected(k2jsCompilerArguments.sourceMap);
    outputPrefixFile.setText(k2jsCompilerArguments.outputPrefix);
    outputPostfixFile.setText(k2jsCompilerArguments.outputPostfix);

    moduleKindComboBox.setSelectedItem(getModuleKindOrDefault(k2jsCompilerArguments.moduleKind));
  }
コード例 #8
0
 public void reset(PackageSet packageSet, @Nullable Runnable runnable) {
   myCurrentScope = packageSet;
   myPatternField.setText(myCurrentScope == null ? "" : myCurrentScope.getText());
   rebuild(false, runnable, false, 0);
 }