Fixed case for intention actions texts.
This commit is contained in:
@@ -32,12 +32,12 @@ new.kotlin.file.action=Kotlin File
|
||||
import.fix=Import
|
||||
imports.chooser.title=Imports
|
||||
specify.type.explicitly.action.family.name=Specify Type Explicitly
|
||||
specify.type.explicitly.add.return.type.action.name=Specify Return Type Explicitly
|
||||
specify.type.explicitly.add.action.name=Specify Type Explicitly
|
||||
specify.type.explicitly.remove.action.name=Remove Explicitly Specified Type
|
||||
specify.type.explicitly.add.return.type.action.name=Specify return type explicitly
|
||||
specify.type.explicitly.add.action.name=Specify type explicitly
|
||||
specify.type.explicitly.remove.action.name=Remove explicitly specified type
|
||||
|
||||
add.kotlin.signature.action.family.name=Specify Custom Kotlin Signature
|
||||
add.kotlin.signature.action.text=Specify Custom Kotlin Signature
|
||||
add.kotlin.signature.action.text=Specify custom Kotlin signature
|
||||
|
||||
goto.super.function.chooser.title=Choose super function
|
||||
goto.super.property.chooser.title=Choose super property
|
||||
|
||||
@@ -18,7 +18,6 @@ package org.jetbrains.jet.plugin.quickfix;
|
||||
|
||||
import com.intellij.openapi.editor.Editor;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.util.text.StringUtil;
|
||||
import com.intellij.psi.PsiElement;
|
||||
import com.intellij.psi.util.PsiTreeUtil;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
@@ -40,10 +39,10 @@ public class SpecifyTypeExplicitlyFix extends SpecifyTypeExplicitlyAction {
|
||||
//noinspection unchecked
|
||||
JetNamedDeclaration declaration = PsiTreeUtil.getParentOfType(element, JetProperty.class, JetNamedFunction.class);
|
||||
if (declaration instanceof JetProperty) {
|
||||
setText(getQuickFixText(JetBundle.message("specify.type.explicitly.add.action.name")));
|
||||
setText(JetBundle.message("specify.type.explicitly.add.action.name"));
|
||||
}
|
||||
else if (declaration instanceof JetNamedFunction) {
|
||||
setText(getQuickFixText(JetBundle.message("specify.type.explicitly.add.return.type.action.name")));
|
||||
setText(JetBundle.message("specify.type.explicitly.add.return.type.action.name"));
|
||||
}
|
||||
else {
|
||||
assert false : "Couldn't find property or function";
|
||||
@@ -51,10 +50,4 @@ public class SpecifyTypeExplicitlyFix extends SpecifyTypeExplicitlyAction {
|
||||
|
||||
return !ErrorUtils.isErrorType(getTypeForDeclaration(declaration));
|
||||
}
|
||||
|
||||
// There is an implicit rule that quick fix text has only first letter capitalized, while intention text
|
||||
@NotNull
|
||||
private static String getQuickFixText(@NotNull String intentionText) {
|
||||
return StringUtil.capitalize(intentionText.toLowerCase());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
// "Specify Type Explicitly" "false"
|
||||
// "Specify type explicitly" "false"
|
||||
val x = "<caret>"
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Specify Type Explicitly" "true"
|
||||
// "Specify type explicitly" "true"
|
||||
fun getEntry() : Map.Entry<jet.Array<String>, java.sql.Array> {
|
||||
}
|
||||
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
// "Specify Type Explicitly" "true"
|
||||
// "Specify type explicitly" "true"
|
||||
val x: (Int) -> String = { (a: Int) -> ""}
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Specify Type Explicitly" "true"
|
||||
// "Specify type explicitly" "true"
|
||||
import java.util.HashMap
|
||||
|
||||
fun foo(map : HashMap<String, Int>) {
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
// "Remove Explicitly Specified Type" "true"
|
||||
// "Remove explicitly specified type" "true"
|
||||
|
||||
val x = null
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Specify Type Explicitly" "true"
|
||||
// "Specify type explicitly" "true"
|
||||
class String {}
|
||||
|
||||
val x: jet.String = ""
|
||||
@@ -1,2 +1,2 @@
|
||||
// "Remove Explicitly Specified Type" "true"
|
||||
// "Remove explicitly specified type" "true"
|
||||
val x = ""
|
||||
@@ -1,2 +1,2 @@
|
||||
// "Specify Type Explicitly" "true"
|
||||
// "Specify type explicitly" "true"
|
||||
val x: Unit = Unit.VALUE
|
||||
@@ -1,2 +1,2 @@
|
||||
// "Specify Type Explicitly" "false"
|
||||
// "Specify type explicitly" "false"
|
||||
val <caret>x = BadType()
|
||||
@@ -1,2 +1,2 @@
|
||||
// "Specify Type Explicitly" "false"
|
||||
// "Specify type explicitly" "false"
|
||||
val x = "<caret>"
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Specify Type Explicitly" "true"
|
||||
// "Specify type explicitly" "true"
|
||||
fun getEntry() : Map.Entry<jet.Array<String>, java.sql.Array> {
|
||||
}
|
||||
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
// "Specify Type Explicitly" "true"
|
||||
// "Specify type explicitly" "true"
|
||||
val x<caret> = { (a: Int) -> ""}
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Specify Type Explicitly" "true"
|
||||
// "Specify type explicitly" "true"
|
||||
import java.util.HashMap
|
||||
|
||||
fun foo(map : HashMap<String, Int>) {
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
// "Remove Explicitly Specified Type" "true"
|
||||
// "Remove explicitly specified type" "true"
|
||||
|
||||
val x : Map.Entry<Stri<caret>ng, Int>? = null
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Specify Type Explicitly" "true"
|
||||
// "Specify type explicitly" "true"
|
||||
class String {}
|
||||
|
||||
val <caret>x = ""
|
||||
@@ -1,2 +1,2 @@
|
||||
// "Remove Explicitly Specified Type" "true"
|
||||
// "Remove explicitly specified type" "true"
|
||||
val x<caret> : String = ""
|
||||
@@ -1,2 +1,2 @@
|
||||
// "Specify Type Explicitly" "true"
|
||||
// "Specify type explicitly" "true"
|
||||
val x <caret>= Unit.VALUE
|
||||
@@ -1,2 +1,2 @@
|
||||
// "Specify Type Explicitly" "false"
|
||||
// "Specify type explicitly" "false"
|
||||
val <caret>x = BadType()
|
||||
Reference in New Issue
Block a user