Renamed intention to more clear name

This commit is contained in:
Valentin Kipyatkov
2015-04-29 17:29:03 +03:00
parent 7d6145e105
commit 1b7ac6bb02
20 changed files with 48 additions and 50 deletions
@@ -290,8 +290,6 @@ add.name.to.argument.single=Add name to argument\: ''{0}''
add.name.to.argument.multiple=Add name to argument... add.name.to.argument.multiple=Add name to argument...
add.name.to.argument.action=Add name to argument... add.name.to.argument.action=Add name to argument...
add.name.to.parameter.name.chooser.title=Choose parameter name add.name.to.parameter.name.chooser.title=Choose parameter name
replace.with.dot.qualified.method.call.intention=Replace with simple method call
replace.with.dot.qualified.method.call.intention.family=Replace with Simple Method Call
replace.with.infix.function.call.intention=Replace with infix function call replace.with.infix.function.call.intention=Replace with infix function call
replace.with.infix.function.call.intention.family=Replace with Infix Function Call replace.with.infix.function.call.intention.family=Replace with Infix Function Call
replace.with.infix.function.call.intention.error.resolution.failed=The element cannot be resolved replace.with.infix.function.call.intention.error.resolution.failed=The element cannot be resolved
+1 -1
View File
@@ -719,7 +719,7 @@
</intentionAction> </intentionAction>
<intentionAction> <intentionAction>
<className>org.jetbrains.kotlin.idea.intentions.ReplaceWithDotQualifiedMethodCallIntention</className> <className>org.jetbrains.kotlin.idea.intentions.InfixCallToOrdinaryIntention</className>
<category>Kotlin</category> <category>Kotlin</category>
</intentionAction> </intentionAction>
@@ -23,7 +23,7 @@ import org.jetbrains.kotlin.psi.JetFunctionLiteralExpression
import org.jetbrains.kotlin.psi.JetParenthesizedExpression import org.jetbrains.kotlin.psi.JetParenthesizedExpression
import org.jetbrains.kotlin.lexer.JetTokens import org.jetbrains.kotlin.lexer.JetTokens
public class ReplaceWithDotQualifiedMethodCallIntention : JetSelfTargetingOffsetIndependentIntention<JetBinaryExpression>("replace.with.dot.qualified.method.call.intention", javaClass()) { public class InfixCallToOrdinaryIntention : JetSelfTargetingOffsetIndependentIntention<JetBinaryExpression>(javaClass(), "Replace infix call with ordinary call") {
override fun isApplicableTo(element: JetBinaryExpression): Boolean { override fun isApplicableTo(element: JetBinaryExpression): Boolean {
return element.getLeft() != null && element.getRight() != null && element.getOperationToken() == JetTokens.IDENTIFIER return element.getLeft() != null && element.getRight() != null && element.getOperationToken() == JetTokens.IDENTIFIER
} }
@@ -0,0 +1 @@
org.jetbrains.kotlin.idea.intentions.InfixCallToOrdinaryIntention
@@ -1 +0,0 @@
org.jetbrains.kotlin.idea.intentions.ReplaceWithDotQualifiedMethodCallIntention
@@ -4181,6 +4181,51 @@ public class IntentionTestGenerated extends AbstractIntentionTest {
} }
} }
@TestMetadata("idea/testData/intentions/infixCallToOrdinary")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class InfixCallToOrdinary extends AbstractIntentionTest {
public void testAllFilesPresentInInfixCallToOrdinary() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/infixCallToOrdinary"), Pattern.compile("^(.+)\\.kt$"), true);
}
@TestMetadata("functionCallAfterInfixCall.kt")
public void testFunctionCallAfterInfixCall() throws Exception {
String fileName = JetTestUtils.navigationMetadata("idea/testData/intentions/infixCallToOrdinary/functionCallAfterInfixCall.kt");
doTest(fileName);
}
@TestMetadata("functionLiteralArgument.kt")
public void testFunctionLiteralArgument() throws Exception {
String fileName = JetTestUtils.navigationMetadata("idea/testData/intentions/infixCallToOrdinary/functionLiteralArgument.kt");
doTest(fileName);
}
@TestMetadata("nonApplicableBinaryOperation.kt")
public void testNonApplicableBinaryOperation() throws Exception {
String fileName = JetTestUtils.navigationMetadata("idea/testData/intentions/infixCallToOrdinary/nonApplicableBinaryOperation.kt");
doTest(fileName);
}
@TestMetadata("nullAssertedCall.kt")
public void testNullAssertedCall() throws Exception {
String fileName = JetTestUtils.navigationMetadata("idea/testData/intentions/infixCallToOrdinary/nullAssertedCall.kt");
doTest(fileName);
}
@TestMetadata("parenthesesAroundRightHandArgument.kt")
public void testParenthesesAroundRightHandArgument() throws Exception {
String fileName = JetTestUtils.navigationMetadata("idea/testData/intentions/infixCallToOrdinary/parenthesesAroundRightHandArgument.kt");
doTest(fileName);
}
@TestMetadata("simpleInfixFunctionCall.kt")
public void testSimpleInfixFunctionCall() throws Exception {
String fileName = JetTestUtils.navigationMetadata("idea/testData/intentions/infixCallToOrdinary/simpleInfixFunctionCall.kt");
doTest(fileName);
}
}
@TestMetadata("idea/testData/intentions/insertCurlyBracesToTemplate") @TestMetadata("idea/testData/intentions/insertCurlyBracesToTemplate")
@TestDataPath("$PROJECT_ROOT") @TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
@@ -5310,51 +5355,6 @@ public class IntentionTestGenerated extends AbstractIntentionTest {
} }
} }
@TestMetadata("idea/testData/intentions/replaceWithDotQualifiedMethodCall")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class ReplaceWithDotQualifiedMethodCall extends AbstractIntentionTest {
public void testAllFilesPresentInReplaceWithDotQualifiedMethodCall() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/replaceWithDotQualifiedMethodCall"), Pattern.compile("^(.+)\\.kt$"), true);
}
@TestMetadata("functionCallAfterInfixCall.kt")
public void testFunctionCallAfterInfixCall() throws Exception {
String fileName = JetTestUtils.navigationMetadata("idea/testData/intentions/replaceWithDotQualifiedMethodCall/functionCallAfterInfixCall.kt");
doTest(fileName);
}
@TestMetadata("functionLiteralArgument.kt")
public void testFunctionLiteralArgument() throws Exception {
String fileName = JetTestUtils.navigationMetadata("idea/testData/intentions/replaceWithDotQualifiedMethodCall/functionLiteralArgument.kt");
doTest(fileName);
}
@TestMetadata("nonApplicableBinaryOperation.kt")
public void testNonApplicableBinaryOperation() throws Exception {
String fileName = JetTestUtils.navigationMetadata("idea/testData/intentions/replaceWithDotQualifiedMethodCall/nonApplicableBinaryOperation.kt");
doTest(fileName);
}
@TestMetadata("nullAssertedCall.kt")
public void testNullAssertedCall() throws Exception {
String fileName = JetTestUtils.navigationMetadata("idea/testData/intentions/replaceWithDotQualifiedMethodCall/nullAssertedCall.kt");
doTest(fileName);
}
@TestMetadata("parenthesesAroundRightHandArgument.kt")
public void testParenthesesAroundRightHandArgument() throws Exception {
String fileName = JetTestUtils.navigationMetadata("idea/testData/intentions/replaceWithDotQualifiedMethodCall/parenthesesAroundRightHandArgument.kt");
doTest(fileName);
}
@TestMetadata("simpleInfixFunctionCall.kt")
public void testSimpleInfixFunctionCall() throws Exception {
String fileName = JetTestUtils.navigationMetadata("idea/testData/intentions/replaceWithDotQualifiedMethodCall/simpleInfixFunctionCall.kt");
doTest(fileName);
}
}
@TestMetadata("idea/testData/intentions/replaceWithInfixFunctionCall") @TestMetadata("idea/testData/intentions/replaceWithInfixFunctionCall")
@TestDataPath("$PROJECT_ROOT") @TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)