diff --git a/idea/line-indent-provider/src/org/jetbrains/kotlin/idea/formatter/lineIndent/KotlinLikeLangLineIndentProvider.kt b/idea/line-indent-provider/src/org/jetbrains/kotlin/idea/formatter/lineIndent/KotlinLikeLangLineIndentProvider.kt index dcaae86f567..f526d63d2e0 100644 --- a/idea/line-indent-provider/src/org/jetbrains/kotlin/idea/formatter/lineIndent/KotlinLikeLangLineIndentProvider.kt +++ b/idea/line-indent-provider/src/org/jetbrains/kotlin/idea/formatter/lineIndent/KotlinLikeLangLineIndentProvider.kt @@ -66,14 +66,15 @@ abstract class KotlinLikeLangLineIndentProvider : JavaLikeLangLineIndentProvider before.isAt(BlockOpeningBrace) && before.beforeIgnoringWhiteSpaceOrComment().isFunctionDeclaration() -> return factory.createIndentCalculator(Indent.getNormalIndent(), before.startOffset) - after.isAt(Quest) && after.after().isAt(Colon) -> { - val indent = if (settings.continuationIndentInElvis) - Indent.getContinuationIndent() - else - Indent.getNormalIndent() - - return factory.createIndentCalculator(indent, before.startOffset) - } +// KT-39716 +// after.isAt(Quest) && after.after().isAt(Colon) -> { +// val indent = if (settings.continuationIndentInElvis) +// Indent.getContinuationIndent() +// else +// Indent.getNormalIndent() +// +// return factory.createIndentCalculator(indent, before.startOffset) +// } before.isAt(Colon) && before.before().isAt(Quest) -> return factory.createIndentCalculator(Indent.getNoneIndent(), before.startOffset) diff --git a/idea/testData/indentationOnNewline/elvis/BeforeElvis.after.inv.kt b/idea/testData/indentationOnNewline/elvis/BeforeElvis.after.inv.kt index d8010681465..cd5b6aaf69f 100644 --- a/idea/testData/indentationOnNewline/elvis/BeforeElvis.after.inv.kt +++ b/idea/testData/indentationOnNewline/elvis/BeforeElvis.after.inv.kt @@ -3,4 +3,5 @@ fun test(some: Any?, error: Int) { ?: error } -// SET_FALSE: CONTINUATION_INDENT_IN_ELVIS \ No newline at end of file +// SET_FALSE: CONTINUATION_INDENT_IN_ELVIS +// WITHOUT_CUSTOM_LINE_INDENT_PROVIDER \ No newline at end of file diff --git a/idea/testData/indentationOnNewline/elvis/BeforeElvis.after.kt b/idea/testData/indentationOnNewline/elvis/BeforeElvis.after.kt index d92dac8561b..df5ed0f53d0 100644 --- a/idea/testData/indentationOnNewline/elvis/BeforeElvis.after.kt +++ b/idea/testData/indentationOnNewline/elvis/BeforeElvis.after.kt @@ -3,4 +3,5 @@ fun test(some: Any?, error: Int) { ?: error } -// SET_FALSE: CONTINUATION_INDENT_IN_ELVIS \ No newline at end of file +// SET_FALSE: CONTINUATION_INDENT_IN_ELVIS +// WITHOUT_CUSTOM_LINE_INDENT_PROVIDER \ No newline at end of file diff --git a/idea/testData/indentationOnNewline/elvis/BeforeElvis.kt b/idea/testData/indentationOnNewline/elvis/BeforeElvis.kt index 60e3e43ab5d..75075de3038 100644 --- a/idea/testData/indentationOnNewline/elvis/BeforeElvis.kt +++ b/idea/testData/indentationOnNewline/elvis/BeforeElvis.kt @@ -2,4 +2,5 @@ fun test(some: Any?, error: Int) { val test = some ?: error } -// SET_FALSE: CONTINUATION_INDENT_IN_ELVIS \ No newline at end of file +// SET_FALSE: CONTINUATION_INDENT_IN_ELVIS +// WITHOUT_CUSTOM_LINE_INDENT_PROVIDER \ No newline at end of file diff --git a/idea/testData/indentationOnNewline/elvis/BeforeElvisInBinaryExpression.after.inv.kt b/idea/testData/indentationOnNewline/elvis/BeforeElvisInBinaryExpression.after.inv.kt index 91432a2b471..f43df97f877 100644 --- a/idea/testData/indentationOnNewline/elvis/BeforeElvisInBinaryExpression.after.inv.kt +++ b/idea/testData/indentationOnNewline/elvis/BeforeElvisInBinaryExpression.after.inv.kt @@ -3,4 +3,5 @@ fun a() { ?: 2) } -// SET_FALSE: CONTINUATION_INDENT_IN_ELVIS \ No newline at end of file +// SET_FALSE: CONTINUATION_INDENT_IN_ELVIS +// WITHOUT_CUSTOM_LINE_INDENT_PROVIDER \ No newline at end of file diff --git a/idea/testData/indentationOnNewline/elvis/BeforeElvisInBinaryExpression.after.kt b/idea/testData/indentationOnNewline/elvis/BeforeElvisInBinaryExpression.after.kt index 97fbd9038c0..d5da68f484c 100644 --- a/idea/testData/indentationOnNewline/elvis/BeforeElvisInBinaryExpression.after.kt +++ b/idea/testData/indentationOnNewline/elvis/BeforeElvisInBinaryExpression.after.kt @@ -3,4 +3,5 @@ fun a() { ?: 2) } -// SET_FALSE: CONTINUATION_INDENT_IN_ELVIS \ No newline at end of file +// SET_FALSE: CONTINUATION_INDENT_IN_ELVIS +// WITHOUT_CUSTOM_LINE_INDENT_PROVIDER \ No newline at end of file diff --git a/idea/testData/indentationOnNewline/elvis/BeforeElvisInBinaryExpression.kt b/idea/testData/indentationOnNewline/elvis/BeforeElvisInBinaryExpression.kt index 19a166fc14a..9f176e8b1a8 100644 --- a/idea/testData/indentationOnNewline/elvis/BeforeElvisInBinaryExpression.kt +++ b/idea/testData/indentationOnNewline/elvis/BeforeElvisInBinaryExpression.kt @@ -2,4 +2,5 @@ fun a() { println(1 + null ?: 2) } -// SET_FALSE: CONTINUATION_INDENT_IN_ELVIS \ No newline at end of file +// SET_FALSE: CONTINUATION_INDENT_IN_ELVIS +// WITHOUT_CUSTOM_LINE_INDENT_PROVIDER \ No newline at end of file