use of com.intellij.psi.codeStyle.CommonCodeStyleSettings in project intellij-community by JetBrains.
the class WrapperTest method testCallParametersWrappingChoppedParenMoved.
public void testCallParametersWrappingChoppedParenMoved() throws Exception {
CommonCodeStyleSettings settings = getSettings(JavaLanguage.INSTANCE);
defaultCodeStyle();
settings.CALL_PARAMETERS_WRAP = CommonCodeStyleSettings.WRAP_AS_NEEDED | CommonCodeStyleSettings.WRAP_ON_EVERY_ITEM;
settings.CALL_PARAMETERS_RPAREN_ON_NEXT_LINE = true;
settings.ALIGN_MULTILINE_PARAMETERS_IN_CALLS = true;
settings.CALL_PARAMETERS_LPAREN_ON_NEXT_LINE = false;
settings.RIGHT_MARGIN = 50;
doTest("CallParameterList", "CallParameterList_chopped_parenmoved");
}
use of com.intellij.psi.codeStyle.CommonCodeStyleSettings in project intellij-community by JetBrains.
the class WrapperTest method testChainedCallsAndParams.
public void testChainedCallsAndParams() throws Exception {
CommonCodeStyleSettings settings = getSettings(JavaLanguage.INSTANCE);
defaultCodeStyle();
settings.CALL_PARAMETERS_WRAP = CommonCodeStyleSettings.WRAP_AS_NEEDED | CommonCodeStyleSettings.WRAP_ON_EVERY_ITEM;
settings.CALL_PARAMETERS_RPAREN_ON_NEXT_LINE = true;
settings.CALL_PARAMETERS_LPAREN_ON_NEXT_LINE = false;
settings.ALIGN_MULTILINE_PARAMETERS_IN_CALLS = true;
settings.METHOD_CALL_CHAIN_WRAP = CommonCodeStyleSettings.WRAP_AS_NEEDED;
settings.RIGHT_MARGIN = 120;
doTest("ChainedCallsAndParams", "ChainedCallsAndParams_normal");
}
use of com.intellij.psi.codeStyle.CommonCodeStyleSettings in project intellij-community by JetBrains.
the class WrapperTest method testBinaryOperationChopped.
public void testBinaryOperationChopped() throws Exception {
CommonCodeStyleSettings settings = getSettings(JavaLanguage.INSTANCE);
defaultCodeStyle();
settings.BINARY_OPERATION_WRAP = CommonCodeStyleSettings.WRAP_AS_NEEDED | CommonCodeStyleSettings.WRAP_ON_EVERY_ITEM;
settings.RIGHT_MARGIN = 27;
doTest("BinaryOperation", "BinaryOperation_chopped");
}
use of com.intellij.psi.codeStyle.CommonCodeStyleSettings in project intellij-community by JetBrains.
the class WrapperTest method testBinaryOperationChoppedSignMove.
public void testBinaryOperationChoppedSignMove() throws Exception {
CommonCodeStyleSettings settings = getSettings(JavaLanguage.INSTANCE);
defaultCodeStyle();
settings.BINARY_OPERATION_WRAP = CommonCodeStyleSettings.WRAP_AS_NEEDED | CommonCodeStyleSettings.WRAP_ON_EVERY_ITEM;
settings.BINARY_OPERATION_SIGN_ON_NEXT_LINE = true;
settings.RIGHT_MARGIN = 27;
doTest("BinaryOperation", "BinaryOperation_chopped_signmoved");
}
use of com.intellij.psi.codeStyle.CommonCodeStyleSettings in project intellij-plugins by JetBrains.
the class DartLanguageCodeStyleSettingsProvider method getDefaultCommonSettings.
@Override
public CommonCodeStyleSettings getDefaultCommonSettings() {
CommonCodeStyleSettings defaultSettings = new CommonCodeStyleSettings(getLanguage());
CommonCodeStyleSettings.IndentOptions indentOptions = defaultSettings.initIndentOptions();
indentOptions.INDENT_SIZE = 2;
indentOptions.CONTINUATION_INDENT_SIZE = 4;
indentOptions.TAB_SIZE = 2;
defaultSettings.RIGHT_MARGIN = 80;
defaultSettings.CALL_PARAMETERS_WRAP = CommonCodeStyleSettings.WRAP_AS_NEEDED;
defaultSettings.METHOD_PARAMETERS_WRAP = CommonCodeStyleSettings.WRAP_AS_NEEDED;
defaultSettings.ARRAY_INITIALIZER_WRAP = CommonCodeStyleSettings.WRAP_AS_NEEDED;
defaultSettings.BINARY_OPERATION_WRAP = CommonCodeStyleSettings.WRAP_AS_NEEDED;
// TODO Remove if not needed.
defaultSettings.ASSIGNMENT_WRAP = CommonCodeStyleSettings.WRAP_AS_NEEDED;
defaultSettings.ARRAY_INITIALIZER_WRAP = CommonCodeStyleSettings.WRAP_AS_NEEDED;
defaultSettings.TERNARY_OPERATION_WRAP = CommonCodeStyleSettings.WRAP_AS_NEEDED | CommonCodeStyleSettings.WRAP_ON_EVERY_ITEM;
defaultSettings.TERNARY_OPERATION_SIGNS_ON_NEXT_LINE = true;
defaultSettings.ALIGN_MULTILINE_TERNARY_OPERATION = false;
defaultSettings.ALIGN_MULTILINE_PARAMETERS = false;
defaultSettings.KEEP_SIMPLE_BLOCKS_IN_ONE_LINE = true;
defaultSettings.KEEP_SIMPLE_METHODS_IN_ONE_LINE = true;
defaultSettings.KEEP_SIMPLE_CLASSES_IN_ONE_LINE = true;
return defaultSettings;
}
Aggregations