use terms "lambda expression" and "anonymous function" instead of "function literal" and "function expression"
This commit is contained in:
@@ -48,7 +48,6 @@ add.semicolon.after.invocation=Add semicolon after invocation of ''{0}''
|
||||
add.semicolon.family=Add Semicolon
|
||||
change.function.return.type=Change ''{0}'' function return type to ''{1}''
|
||||
change.no.name.function.return.type=Change function return type to ''{0}''
|
||||
change.function.literal.return.type=Change function literal return type to ''{0}''
|
||||
remove.function.return.type=Remove explicitly specified return type in ''{0}'' function
|
||||
remove.no.name.function.return.type=Remove explicitly specified function return type
|
||||
change.element.type=Change ''{0}'' type to ''{1}''
|
||||
@@ -106,7 +105,7 @@ change.visibility.modifier=Change visibility modifier
|
||||
|
||||
options.kotlin.attribute.descriptor.builtin.annotation=Built-in annotation
|
||||
options.kotlin.attribute.descriptor.string.escape=Escape in string and template braces
|
||||
options.kotlin.attribute.descriptor.closure.braces=Function literal braces and arrow
|
||||
options.kotlin.attribute.descriptor.closure.braces=Lambda expression braces and arrow
|
||||
options.kotlin.attribute.descriptor.safe.access=Safe access dot
|
||||
options.kotlin.attribute.descriptor.arrow=Arrow
|
||||
options.kotlin.attribute.descriptor.kdoc.comment=KDoc comment
|
||||
@@ -124,7 +123,7 @@ options.kotlin.attribute.descriptor.property.with.backing=Property with backing
|
||||
options.kotlin.attribute.descriptor.field=Backing field variable
|
||||
options.kotlin.attribute.descriptor.extension.property=Extension property
|
||||
options.kotlin.attribute.descriptor.dynamic.property=Dynamic property
|
||||
options.kotlin.attribute.descriptor.it=Function literal default parameter
|
||||
options.kotlin.attribute.descriptor.it=Lambda expression default parameter
|
||||
options.kotlin.attribute.descriptor.fun=Function declaration
|
||||
options.kotlin.attribute.descriptor.fun.call=Function call
|
||||
options.kotlin.attribute.descriptor.dynamic.fun.call=Dynamic function call
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
<html>
|
||||
<body>
|
||||
This intention replaces the explicit parameter of a single-parameter function literal with the implicit 'it' parameter.
|
||||
This intention replaces the explicit parameter of a single-parameter lambda expression with the implicit 'it' parameter.
|
||||
</body>
|
||||
</html>
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
<html>
|
||||
<body>
|
||||
This intention replaces the implicit 'it' parameter in a function literal with an explicitly named parameter.
|
||||
This intention replaces the implicit 'it' parameter in a lambda expression with an explicitly named parameter.
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -116,8 +116,8 @@ public class ChangeFunctionLiteralReturnTypeFix extends KotlinQuickFixAction<KtF
|
||||
if (appropriateQuickFix != null) {
|
||||
return appropriateQuickFix.getText();
|
||||
}
|
||||
return KotlinBundle
|
||||
.message("change.function.literal.return.type", IdeDescriptorRenderers.SOURCE_CODE_SHORT_NAMES_IN_TYPES.renderType(type));
|
||||
return String.format("Change lambda expression return type to '%s'",
|
||||
IdeDescriptorRenderers.SOURCE_CODE_SHORT_NAMES_IN_TYPES.renderType(type));
|
||||
}
|
||||
|
||||
@NotNull
|
||||
|
||||
@@ -36,7 +36,7 @@ class ChangeFunctionLiteralSignatureFix private constructor(
|
||||
private val parameterTypes: List<KotlinType>
|
||||
) : ChangeFunctionSignatureFix(functionLiteral, functionDescriptor) {
|
||||
|
||||
override fun getText() = "Change the signature of function literal"
|
||||
override fun getText() = "Change the signature of lambda expression"
|
||||
|
||||
override fun invoke(project: Project, editor: Editor?, file: KtFile) {
|
||||
runChangeSignature(
|
||||
|
||||
@@ -312,7 +312,7 @@ public class QuickFixRegistrar : QuickFixContributor {
|
||||
MISSING_CONSTRUCTOR_KEYWORD.registerFactory(MissingConstructorKeywordFix,
|
||||
MissingConstructorKeywordFix.createWholeProjectFixFactory())
|
||||
|
||||
FUNCTION_EXPRESSION_WITH_NAME.registerFactory(RemoveNameFromFunctionExpressionFix)
|
||||
ANONYMOUS_FUNCTION_WITH_NAME.registerFactory(RemoveNameFromFunctionExpressionFix)
|
||||
|
||||
UNRESOLVED_REFERENCE.registerFactory(ReplaceObsoleteLabelSyntaxFix,
|
||||
ReplaceObsoleteLabelSyntaxFix.createWholeProjectFixFactory())
|
||||
|
||||
@@ -26,7 +26,7 @@ import org.jetbrains.kotlin.psi.psiUtil.forEachDescendantOfType
|
||||
import org.jetbrains.kotlin.resolve.BindingContext
|
||||
|
||||
public class RemoveNameFromFunctionExpressionFix(element: KtNamedFunction) : KotlinQuickFixAction<KtNamedFunction>(element), CleanupFix {
|
||||
override fun getText(): String = "Remove identifier from function expression"
|
||||
override fun getText(): String = "Remove identifier from anonymous function"
|
||||
override fun getFamilyName(): String = getText()
|
||||
|
||||
override fun invoke(project: Project, editor: Editor?, file: KtFile) = removeNameFromFunction(element)
|
||||
|
||||
Vendored
+1
-1
@@ -2,7 +2,7 @@ fun test(<warning textAttributesKey="NOT_USED_ELEMENT_ATTRIBUTES">unusedParam</w
|
||||
val str = ":)"
|
||||
str <warning textAttributesKey="NOT_USED_ELEMENT_ATTRIBUTES">as String</warning> // USELESS_CAST
|
||||
|
||||
// UNUSED_FUNCTION_LITERAL
|
||||
// UNUSED_LAMBDA_EXPRESSION
|
||||
<warning textAttributesKey="NOT_USED_ELEMENT_ATTRIBUTES">{
|
||||
test(0)
|
||||
}</warning>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Change the signature of function literal" "true"
|
||||
// "Change the signature of lambda expression" "true"
|
||||
// DISABLE-ERRORS
|
||||
|
||||
fun f(x: Int, y: Int, z : () -> Int) {
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// "Change the signature of function literal" "true"
|
||||
// "Change the signature of lambda expression" "true"
|
||||
// DISABLE-ERRORS
|
||||
|
||||
fun f(x: Int, y: Int, z : () -> Int) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Change the signature of function literal" "true"
|
||||
// "Change the signature of lambda expression" "true"
|
||||
// DISABLE-ERRORS
|
||||
|
||||
fun f(x: Int, y: Int, z : (Int, Int?, Any) -> Int) {
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// "Change the signature of function literal" "true"
|
||||
// "Change the signature of lambda expression" "true"
|
||||
// DISABLE-ERRORS
|
||||
|
||||
fun f(x: Int, y: Int, z : (Int, Int?, Any) -> Int) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Change the signature of function literal" "true"
|
||||
// "Change the signature of lambda expression" "true"
|
||||
|
||||
fun foo(f: Int.(Int, Int) -> Int) {
|
||||
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// "Change the signature of function literal" "true"
|
||||
// "Change the signature of lambda expression" "true"
|
||||
|
||||
fun foo(f: Int.(Int, Int) -> Int) {
|
||||
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// "Change the signature of function literal" "true"
|
||||
// "Change the signature of lambda expression" "true"
|
||||
// DISABLE-ERRORS
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// "Change the signature of function literal" "true"
|
||||
// "Change the signature of lambda expression" "true"
|
||||
// DISABLE-ERRORS
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Remove identifier from function expression" "true"
|
||||
// "Remove identifier from anonymous function" "true"
|
||||
|
||||
fun foo() {
|
||||
(fun bar<caret>() {
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// "Remove identifier from function expression" "true"
|
||||
// "Remove identifier from anonymous function" "true"
|
||||
|
||||
fun foo() {
|
||||
(bar@ fun() {
|
||||
|
||||
Reference in New Issue
Block a user