Package org.intellij.erlang.formatter.settings

Examples of org.intellij.erlang.formatter.settings.ErlangCodeStyleSettings


      }
    });
  }

  private static LookupElement createFieldLookupElement(@NotNull Project project, @NotNull String text, boolean withoutEq) {
    ErlangCodeStyleSettings customSettings = CodeStyleSettingsManager.getSettings(project).getCustomSettings(ErlangCodeStyleSettings.class);
    boolean surroundWithSpaces = customSettings.SPACE_AROUND_EQ_IN_RECORDS;
    return LookupElementBuilder.create(text).withIcon(ErlangIcons.FIELD).withInsertHandler(withoutEq ? null : new SingleCharInsertHandler('=', surroundWithSpaces));
  }
View Full Code Here


public class ErlangFormattingModelBuilder implements FormattingModelBuilder {
  @NotNull
  @Override
  public FormattingModel createModel(PsiElement element, CodeStyleSettings settings) {
    CommonCodeStyleSettings commonSettings = settings.getCommonSettings(ErlangLanguage.INSTANCE);
    ErlangCodeStyleSettings erlangSettings = settings.getCustomSettings(ErlangCodeStyleSettings.class);
    SpacingBuilder spacingBuilder = createSpacingBuilder(commonSettings, erlangSettings);
    ErlangFormattingBlock block = new ErlangFormattingBlock(element.getNode(), null, null, null, commonSettings, erlangSettings, spacingBuilder, -1);
    return FormattingModelProvider.createFormattingModelForPsiFile(element.getContainingFile(), block, settings);
  }
View Full Code Here

  public void test451()    throws Exception { getErlangSettings().ALIGN_RECORD_FIELD_ASSIGNMENTS = true; setUpCommaFirst(); doTest(); }
  public void test444()    throws Exception { getErlangSettings().ALIGN_MULTILINE_BLOCK = true; doTest(); }
  public void test478()    throws Exception { doTest(); }

  public void test292() throws Exception {
    ErlangCodeStyleSettings erlangSettings = getErlangSettings();
    erlangSettings.ALIGN_MULTILINE_BLOCK = true;
    erlangSettings.NEW_LINE_BEFORE_COMMA = true;
    erlangSettings.SPACE_AROUND_OR_IN_LISTS = false;
    doTest();
  }
View Full Code Here

TOP

Related Classes of org.intellij.erlang.formatter.settings.ErlangCodeStyleSettings

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.