use of com.intellij.psi.codeStyle.CommonCodeStyleSettings in project intellij-community by JetBrains.
the class IndentTest method testBinaryOperation.
public void testBinaryOperation() throws Exception {
defaultSettings();
CommonCodeStyleSettings settings = getJavaSettings();
settings.ALIGN_MULTILINE_BINARY_OPERATION = true;
doTest("BinaryOperation.java", "BinaryOperation_after.java");
}
use of com.intellij.psi.codeStyle.CommonCodeStyleSettings in project intellij-community by JetBrains.
the class JavaEnterActionTest method testEnter_AfterLastChainedCall.
public void testEnter_AfterLastChainedCall() throws IOException {
CodeStyleSettings settings = getCodeStyleSettings();
CommonCodeStyleSettings javaCommon = settings.getCommonSettings(JavaLanguage.INSTANCE);
javaCommon.ALIGN_MULTILINE_CHAINED_METHODS = true;
setCodeStyleSettings(settings);
doTextTest("java", "class T {\n" + " public void main() {\n" + " ActionBarPullToRefresh.from(getActivity())\n" + " .theseChildrenArePullable(eventsListView)\n" + " .listener(this)\n" + " .useViewDelegate(StickyListHeadersListView.class, new AbsListViewDelegate())<caret>\n" + " }\n" + "}", "class T {\n" + " public void main() {\n" + " ActionBarPullToRefresh.from(getActivity())\n" + " .theseChildrenArePullable(eventsListView)\n" + " .listener(this)\n" + " .useViewDelegate(StickyListHeadersListView.class, new AbsListViewDelegate())\n" + " <caret>\n" + " }\n" + "}");
}
use of com.intellij.psi.codeStyle.CommonCodeStyleSettings in project intellij-community by JetBrains.
the class JavaFormatterTest method testSCR11799.
public void testSCR11799() throws Exception {
final CommonCodeStyleSettings settings = getSettings();
settings.getRootSettings().getIndentOptions(StdFileTypes.JAVA).CONTINUATION_INDENT_SIZE = 4;
settings.CLASS_BRACE_STYLE = CommonCodeStyleSettings.NEXT_LINE;
settings.METHOD_BRACE_STYLE = CommonCodeStyleSettings.NEXT_LINE;
doTest();
}
use of com.intellij.psi.codeStyle.CommonCodeStyleSettings in project intellij-community by JetBrains.
the class JavaFormatterTest method testIf.
public void testIf() throws Exception {
final CommonCodeStyleSettings settings = getSettings();
settings.BRACE_STYLE = CommonCodeStyleSettings.NEXT_LINE;
doTest();
settings.BRACE_STYLE = CommonCodeStyleSettings.END_OF_LINE;
doTest("If.java", "If.java");
settings.BRACE_STYLE = CommonCodeStyleSettings.END_OF_LINE;
settings.KEEP_LINE_BREAKS = false;
doTest("If_after.java", "If.java");
}
use of com.intellij.psi.codeStyle.CommonCodeStyleSettings in project intellij-community by JetBrains.
the class JavaFormatterTest method testSpaces.
public void testSpaces() throws Exception {
final CommonCodeStyleSettings settings = getSettings();
settings.SPACE_WITHIN_FOR_PARENTHESES = true;
settings.SPACE_WITHIN_IF_PARENTHESES = true;
settings.SPACE_WITHIN_METHOD_PARENTHESES = true;
settings.SPACE_WITHIN_METHOD_CALL_PARENTHESES = true;
settings.SPACE_BEFORE_METHOD_PARENTHESES = true;
settings.SPACE_BEFORE_METHOD_CALL_PARENTHESES = true;
doTest();
}
Aggregations