use of com.intellij.psi.codeStyle.CommonCodeStyleSettings in project intellij-plugins by JetBrains.
the class DartFormatterInHtmlTest method setTestStyleSettings.
private static void setTestStyleSettings() {
final CommonCodeStyleSettings settings = getSettings(DartLanguage.INSTANCE);
CodeStyleSettings.IndentOptions indentOptions = settings.getIndentOptions();
assertNotNull(indentOptions);
indentOptions.INDENT_SIZE = 2;
indentOptions.CONTINUATION_INDENT_SIZE = 2;
indentOptions.TAB_SIZE = 2;
settings.KEEP_BLANK_LINES_IN_CODE = 2;
settings.METHOD_BRACE_STYLE = CommonCodeStyleSettings.END_OF_LINE;
settings.BRACE_STYLE = CommonCodeStyleSettings.END_OF_LINE;
settings.ALIGN_MULTILINE_PARAMETERS = false;
settings.ALIGN_MULTILINE_PARAMETERS_IN_CALLS = false;
settings.KEEP_FIRST_COLUMN_COMMENT = false;
}
use of com.intellij.psi.codeStyle.CommonCodeStyleSettings in project intellij-plugins by JetBrains.
the class DartFormatterTest method testBracePlacement1.
public void testBracePlacement1() throws Exception {
final CommonCodeStyleSettings settings = getSettings(DartLanguage.INSTANCE);
settings.KEEP_LINE_BREAKS = false;
settings.BRACE_STYLE = CommonCodeStyleSettings.NEXT_LINE_SHIFTED2;
settings.METHOD_BRACE_STYLE = CommonCodeStyleSettings.NEXT_LINE;
doTest();
}
use of com.intellij.psi.codeStyle.CommonCodeStyleSettings in project intellij-plugins by JetBrains.
the class DartFormatterTest method testSpaceBeforeParentheses.
public void testSpaceBeforeParentheses() throws Exception {
final CommonCodeStyleSettings settings = getSettings(DartLanguage.INSTANCE);
settings.KEEP_LINE_BREAKS = false;
settings.SPACE_BEFORE_METHOD_CALL_PARENTHESES = true;
settings.SPACE_BEFORE_METHOD_PARENTHESES = true;
settings.SPACE_BEFORE_IF_PARENTHESES = false;
settings.SPACE_BEFORE_FOR_PARENTHESES = false;
settings.SPACE_BEFORE_WHILE_PARENTHESES = false;
settings.SPACE_BEFORE_SWITCH_PARENTHESES = false;
settings.SPACE_BEFORE_CATCH_PARENTHESES = false;
doTest();
}
use of com.intellij.psi.codeStyle.CommonCodeStyleSettings in project intellij-plugins by JetBrains.
the class DartFormatterTest method testVarDecl.
public void testVarDecl() throws Exception {
final CommonCodeStyleSettings settings = getSettings(DartLanguage.INSTANCE);
settings.RIGHT_MARGIN = 40;
doTest();
}
use of com.intellij.psi.codeStyle.CommonCodeStyleSettings in project intellij-plugins by JetBrains.
the class DartFormatterTest method testOddCases.
public void testOddCases() throws Exception {
final CommonCodeStyleSettings settings = getSettings(DartLanguage.INSTANCE);
settings.BRACE_STYLE = CommonCodeStyleSettings.NEXT_LINE_IF_WRAPPED;
doTest();
}
Aggregations