Implement "Surround with try/catch(/finally)" and "Surround with if/else" for expressions

Fixes #KT-14175
Fixes #KT-19782
This commit is contained in:
Kirill Rakhman
2017-09-11 20:12:08 +02:00
committed by Nikolay Krasko
parent e16d16fdb7
commit 08103d1cb4
32 changed files with 490 additions and 11 deletions
@@ -672,12 +672,16 @@ fun main(args: Array<String>) {
testClass<AbstractSurroundWithTest> {
model("codeInsight/surroundWith/if", testMethod = "doTestWithIfSurrounder")
model("codeInsight/surroundWith/ifElse", testMethod = "doTestWithIfElseSurrounder")
model("codeInsight/surroundWith/ifElseExpression", testMethod = "doTestWithIfElseExpressionSurrounder")
model("codeInsight/surroundWith/ifElseExpressionBraces", testMethod = "doTestWithIfElseExpressionBracesSurrounder")
model("codeInsight/surroundWith/not", testMethod = "doTestWithNotSurrounder")
model("codeInsight/surroundWith/parentheses", testMethod = "doTestWithParenthesesSurrounder")
model("codeInsight/surroundWith/stringTemplate", testMethod = "doTestWithStringTemplateSurrounder")
model("codeInsight/surroundWith/when", testMethod = "doTestWithWhenSurrounder")
model("codeInsight/surroundWith/tryCatch", testMethod = "doTestWithTryCatchSurrounder")
model("codeInsight/surroundWith/tryCatchExpression", testMethod = "doTestWithTryCatchExpressionSurrounder")
model("codeInsight/surroundWith/tryCatchFinally", testMethod = "doTestWithTryCatchFinallySurrounder")
model("codeInsight/surroundWith/tryCatchFinallyExpression", testMethod = "doTestWithTryCatchFinallyExpressionSurrounder")
model("codeInsight/surroundWith/tryFinally", testMethod = "doTestWithTryFinallySurrounder")
model("codeInsight/surroundWith/functionLiteral", testMethod = "doTestWithFunctionLiteralSurrounder")
model("codeInsight/surroundWith/withIfExpression", testMethod = "doTestWithSurroundWithIfExpression")