Examples of CommonCodeStyleSettings


Examples of com.intellij.psi.codeStyle.CommonCodeStyleSettings

    return RustLanguage.INSTANCE;
  }

  @Override
  public CommonCodeStyleSettings getDefaultCommonSettings() {
    CommonCodeStyleSettings defaultSettings =
        new CommonCodeStyleSettings(RustLanguage.INSTANCE);

    CommonCodeStyleSettings.IndentOptions indentOptions =
        defaultSettings.initIndentOptions();

    indentOptions.USE_TAB_CHARACTER = true;
    indentOptions.INDENT_SIZE = 4;
    indentOptions.TAB_SIZE = 4;
    indentOptions.CONTINUATION_INDENT_SIZE = 8;
View Full Code Here

Examples of com.intellij.psi.codeStyle.CommonCodeStyleSettings

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

Examples of com.intellij.psi.codeStyle.CommonCodeStyleSettings

        final String tabWidth = Utils.configValueForKey(outPairs, tabWidthKey);
        final String indentStyle = Utils.configValueForKey(outPairs, indentStyleKey);
        final FileType fileType = file.getFileType();
        final Language language = fileType instanceof LanguageFileType ? ((LanguageFileType)fileType).getLanguage() :
            PlainTextLanguage.INSTANCE;
        final CommonCodeStyleSettings commonSettings = codeStyleSettings.getCommonSettings(language);
        final CommonCodeStyleSettings.IndentOptions indentOptions = commonSettings.getIndentOptions();
        applyIndentOptions(indentOptions, indentSize, tabWidth, indentStyle, file.getCanonicalPath());
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.