コード例 #1
0
  private void setSettings() {
    final ScalaProjectSettings scalaProjectSettings = ScalaProjectSettings.getInstance(myProject);
    setValue(
        implicitParametersSearchDepthSpinner,
        scalaProjectSettings.getImplicitParametersSearchDepth());
    setValue(outputSpinner, scalaProjectSettings.getOutputLimit());
    setValue(runWorksheetInTheCheckBox, scalaProjectSettings.isInProcessMode());
    setValue(worksheetInteractiveModeCheckBox, scalaProjectSettings.isInteractiveMode());

    setValue(searchAllSymbolsIncludeCheckBox, scalaProjectSettings.isSearchAllSymbols());
    setValue(enableConversionOnCopyCheckBox, scalaProjectSettings.isEnableJavaToScalaConversion());
    setValue(donTShowDialogCheckBox, scalaProjectSettings.isDontShowConversionDialog());
    setValue(treatDocCommentAsBlockComment, scalaProjectSettings.isTreatDocCommentAsBlockComment());

    setValue(showImplicitConversionsInCheckBox, scalaProjectSettings.isShowImplisitConversions());
    setValue(
        showArgumentsToByNameParametersCheckBox,
        scalaProjectSettings.isShowArgumentsToByNameParams());
    setValue(
        includeBlockExpressionsExpressionsCheckBox,
        scalaProjectSettings.isIncludeBlockExpressions());
    setValue(includeLiteralsCheckBox, scalaProjectSettings.isIncludeLiterals());

    setValue(myResolveToAllClassesCheckBox, scalaProjectSettings.isIgnorePerformance());

    setValue(myDisableLanguageInjection, scalaProjectSettings.isDisableLangInjection());
    setValue(myDisablei18n, scalaProjectSettings.isDisableI18N());
    setValue(myDontCacheCompound, scalaProjectSettings.isDontCacheCompoundTypes());
    setValue(useScalaClassesPriorityCheckBox, scalaProjectSettings.isScalaPriority());
    collectionHighlightingChooser.setSelectedIndex(
        scalaProjectSettings.getCollectionTypeHighlightingLevel());

    injectionPrefixTable.loadSettings(scalaProjectSettings);
  }
コード例 #2
0
  @SuppressWarnings({"ConstantConditions", "RedundantIfStatement"})
  public boolean isModified() {

    final ScalaProjectSettings scalaProjectSettings = ScalaProjectSettings.getInstance(myProject);

    if (scalaProjectSettings.isShowImplisitConversions()
        != showImplicitConversionsInCheckBox.isSelected()) return true;
    if (scalaProjectSettings.isShowArgumentsToByNameParams()
        != showArgumentsToByNameParametersCheckBox.isSelected()) return true;
    if (scalaProjectSettings.isIncludeBlockExpressions()
        != includeBlockExpressionsExpressionsCheckBox.isSelected()) return true;
    if (scalaProjectSettings.isIncludeLiterals() != includeLiteralsCheckBox.isSelected())
      return true;

    if (scalaProjectSettings.getImplicitParametersSearchDepth()
        != (Integer) implicitParametersSearchDepthSpinner.getValue()) return true;
    if (scalaProjectSettings.getOutputLimit() != (Integer) outputSpinner.getValue()) return true;
    if (scalaProjectSettings.isInProcessMode() != runWorksheetInTheCheckBox.isSelected())
      return true;
    if (scalaProjectSettings.isInteractiveMode() != worksheetInteractiveModeCheckBox.isSelected())
      return true;

    if (scalaProjectSettings.isSearchAllSymbols() != searchAllSymbolsIncludeCheckBox.isSelected())
      return true;
    if (scalaProjectSettings.isEnableJavaToScalaConversion()
        != enableConversionOnCopyCheckBox.isSelected()) return true;
    if (scalaProjectSettings.isDontShowConversionDialog() != donTShowDialogCheckBox.isSelected())
      return true;
    if (scalaProjectSettings.isTreatDocCommentAsBlockComment()
        != treatDocCommentAsBlockComment.isSelected()) return true;

    if (scalaProjectSettings.isIgnorePerformance() != myResolveToAllClassesCheckBox.isSelected())
      return true;

    if (scalaProjectSettings.isDisableLangInjection() != myDisableLanguageInjection.isSelected())
      return true;

    if (scalaProjectSettings.isDisableI18N() != myDisablei18n.isSelected()) return true;

    if (scalaProjectSettings.isDontCacheCompoundTypes() != myDontCacheCompound.isSelected())
      return true;

    if (scalaProjectSettings.isScalaPriority() != useScalaClassesPriorityCheckBox.isSelected())
      return true;

    if (scalaProjectSettings.getCollectionTypeHighlightingLevel()
        != collectionHighlightingChooser.getSelectedIndex()) return true;

    if (injectionPrefixTable.isModified(scalaProjectSettings)) return true;

    return false;
  }