i18n: add bundle for idea/highlighter
This commit is contained in:
@@ -181,7 +181,7 @@ inspection.migration.title=Code Migration
|
|||||||
inspection.migration.profile.name=Migration
|
inspection.migration.profile.name=Migration
|
||||||
|
|
||||||
options.color.attribute.descriptor.annotation=Annotation//Annotation name
|
options.color.attribute.descriptor.annotation=Annotation//Annotation name
|
||||||
options.color.attribute.descriptor.annotation.attribute.name=Annotation//Annotation attribute name
|
description.text.annotation.attribute.name=Annotation//Annotation attribute name
|
||||||
options.color.attribute.descriptor.builtin.annotation=Keywords//Modifier
|
options.color.attribute.descriptor.builtin.annotation=Keywords//Modifier
|
||||||
options.color.attribute.descriptor.builtin.keyword.val=Keywords//'val'
|
options.color.attribute.descriptor.builtin.keyword.val=Keywords//'val'
|
||||||
options.color.attribute.descriptor.builtin.keyword.var=Keywords//'var'
|
options.color.attribute.descriptor.builtin.keyword.var=Keywords//'var'
|
||||||
|
|||||||
@@ -0,0 +1,88 @@
|
|||||||
|
action.text.go.to.actual.declarations=Go to actual declarations
|
||||||
|
action.text.go.to.expected.declaration=Go to expected declaration
|
||||||
|
action.text.go.to.implementations=Go to implementations
|
||||||
|
action.text.go.to.overridden.methods=Go to overridden methods
|
||||||
|
action.text.go.to.overridden.properties=Go to overridden properties
|
||||||
|
action.text.go.to.subclasses=Go to subclasses
|
||||||
|
action.text.go.to.super.method=Go to super method
|
||||||
|
action.text.go.to.super.property=Go to super property
|
||||||
|
description.text.android.extensions.property=Properties and Variables//Android Extensions synthetic properties
|
||||||
|
description.text.annotation=Annotation
|
||||||
|
description.text.arrow=Braces and Operators//Arrow
|
||||||
|
description.text.builtin.annotation=Keywords//Modifier
|
||||||
|
description.text.builtin.keyword.val=Keywords//'val'
|
||||||
|
description.text.builtin.keyword.var=Keywords//'var'
|
||||||
|
description.text.builtin.keyword=Keywords//Keyword
|
||||||
|
description.text.captured.variable=Properties and Variables//Variables and values captured in a closure
|
||||||
|
description.text.closure.braces=Braces and Operators//Lambda expression braces and arrow
|
||||||
|
description.text.colon=Braces and Operators//Colon
|
||||||
|
description.text.constructor.call=Functions//Constructor call
|
||||||
|
description.text.double.colon=Braces and Operators//Double colon
|
||||||
|
description.text.dynamic.fun.call=Functions//Dynamic function call
|
||||||
|
description.text.dynamic.property=Properties and Variables//Dynamic property
|
||||||
|
description.text.enumEntry=Classes and Interfaces//Enum entry
|
||||||
|
description.text.exclexcl=Braces and Operators//Non-null assertion
|
||||||
|
description.text.extension.fun.call=Functions//Extension function call
|
||||||
|
description.text.extension.property=Properties and Variables//Extension property
|
||||||
|
description.text.field=Properties and Variables//Backing field variable
|
||||||
|
description.text.fun.call=Functions//Function call
|
||||||
|
description.text.fun=Functions//Function declaration
|
||||||
|
description.text.instance.property.custom.property.declaration=Properties and Variables//Instance property with custom property declarations
|
||||||
|
description.text.instance.property=Properties and Variables//Instance property
|
||||||
|
description.text.it=Parameters//Lambda expression default parameter
|
||||||
|
description.text.kdoc.comment=Comments//KDoc//KDoc comment
|
||||||
|
description.text.kdoc.tag=Comments//KDoc//KDoc tag
|
||||||
|
description.text.kdoc.value=Comments//KDoc//Link in KDoc tag
|
||||||
|
description.text.label=Label
|
||||||
|
description.text.local.variable=Properties and Variables//Local variable or value
|
||||||
|
description.text.named.argument=Named argument
|
||||||
|
description.text.object=Classes and Interfaces//Object
|
||||||
|
description.text.package.fun.call=Functions//Package-level function call
|
||||||
|
description.text.package.property.custom.property.declaration=Properties and Variables//Package-level property with custom property declarations
|
||||||
|
description.text.package.property=Properties and Variables//Package-level property
|
||||||
|
description.text.quest=Braces and Operators//Type nullability marker
|
||||||
|
description.text.safe.access=Braces and Operators//Safe access dot
|
||||||
|
description.text.smart.cast.receiver=Smart-casts//Smart-cast implicit receiver
|
||||||
|
description.text.smart.cast=Smart-casts//Smart-cast value
|
||||||
|
description.text.smart.constant=Smart-casts//Smart constant
|
||||||
|
description.text.string.escape=String//Escape in string and template braces
|
||||||
|
description.text.suspend.fun.call=Functions//Suspend function call
|
||||||
|
description.text.synthetic.extension.property=Properties and Variables//Synthetic extension property
|
||||||
|
description.text.typeAlias=Classes and Interfaces//Type alias
|
||||||
|
description.text.var=Properties and Variables//Var (mutable variable, parameter or property)
|
||||||
|
description.text.variable.as.function.call=Properties and Variables//Variable as function call
|
||||||
|
description.text.variable.as.function.like.call=Properties and Variables//Variable as function-like call
|
||||||
|
message.suspend.function.call=Suspend function call
|
||||||
|
message.suspending.iteration=Suspending iteration
|
||||||
|
name.dsl.markers=DSL markers
|
||||||
|
name.dsl=Dsl//
|
||||||
|
name.implemented.declaration=Implemented declaration
|
||||||
|
name.implementing.declaration=Implementing declaration
|
||||||
|
name.kotlin.line.markers=Kotlin line markers
|
||||||
|
name.multiplatform.actual.declaration=Multiplatform actual declaration
|
||||||
|
name.multiplatform.expect.declaration=Multiplatform expect declaration
|
||||||
|
name.overridden.declaration=Overridden declaration
|
||||||
|
name.overriding.declaration=Overriding declaration
|
||||||
|
name.style=Style
|
||||||
|
notification.text.navigation.to.overriding.classes.is.not.possible.during.index.update=Navigation to overriding classes is not possible during index update
|
||||||
|
prefix.text.has.actuals.in=Has actuals in
|
||||||
|
text.click.for.navigate=Click {0}to navigate
|
||||||
|
text.has.functional.implementations=Has functional implementations
|
||||||
|
text.implements=Implements
|
||||||
|
text.in={0} in '{1}'
|
||||||
|
text.modules=\ ({0} modules)
|
||||||
|
text.or.press=\ or press {0}
|
||||||
|
text.overrides=Overrides
|
||||||
|
title.actuals.for=Actuals for {0}
|
||||||
|
title.choose.actual.for=Choose actual for {0}
|
||||||
|
title.choose.expected.for=Choose expected for {0}
|
||||||
|
title.expected.for=Expected for {0}
|
||||||
|
title.overriding.declarations.of=Overriding declarations of {0}
|
||||||
|
title.searching.for.overriding.declarations=Searching for overriding declarations
|
||||||
|
title.searching.for.overriding.methods=Searching for overriding methods
|
||||||
|
tool.tip.has.declaration.in.common.module=Has declaration in common module
|
||||||
|
tool.tip.marker.annotation.for.dsl=Marker annotation for DSL
|
||||||
|
tool.tip.text.function=function
|
||||||
|
tool.tip.text.property=property
|
||||||
|
tool.tip.text.recursive.call=Recursive call
|
||||||
|
tool.tip.text.run.test=Run Test
|
||||||
@@ -130,72 +130,71 @@ var <PACKAGE_PROPERTY_CUSTOM_PROPERTY_DECLARATION><MUTABLE_VARIABLE>globalCounte
|
|||||||
infix fun String.to(key: TextAttributesKey) = AttributesDescriptor(this, key)
|
infix fun String.to(key: TextAttributesKey) = AttributesDescriptor(this, key)
|
||||||
|
|
||||||
return arrayOf(
|
return arrayOf(
|
||||||
KotlinBundle.message("options.color.attribute.descriptor.builtin.keyword") to KotlinHighlightingColors.KEYWORD,
|
KotlinHighlighterBundle.message("description.text.builtin.keyword") to KotlinHighlightingColors.KEYWORD,
|
||||||
KotlinBundle.message("options.color.attribute.descriptor.builtin.keyword.val") to KotlinHighlightingColors.VAL_KEYWORD,
|
KotlinHighlighterBundle.message("description.text.builtin.keyword.val") to KotlinHighlightingColors.VAL_KEYWORD,
|
||||||
KotlinBundle.message("options.color.attribute.descriptor.builtin.keyword.var") to KotlinHighlightingColors.VAR_KEYWORD,
|
KotlinHighlighterBundle.message("description.text.builtin.keyword.var") to KotlinHighlightingColors.VAR_KEYWORD,
|
||||||
KotlinBundle.message("options.color.attribute.descriptor.builtin.annotation") to KotlinHighlightingColors.BUILTIN_ANNOTATION,
|
KotlinHighlighterBundle.message("description.text.builtin.annotation") to KotlinHighlightingColors.BUILTIN_ANNOTATION,
|
||||||
OptionsBundle.message("options.java.attribute.descriptor.number") to KotlinHighlightingColors.NUMBER,
|
OptionsBundle.message("options.java.attribute.descriptor.number") to KotlinHighlightingColors.NUMBER,
|
||||||
OptionsBundle.message("options.java.attribute.descriptor.string") to KotlinHighlightingColors.STRING,
|
OptionsBundle.message("options.java.attribute.descriptor.string") to KotlinHighlightingColors.STRING,
|
||||||
KotlinBundle.message("options.color.attribute.descriptor.string.escape") to KotlinHighlightingColors.STRING_ESCAPE,
|
KotlinHighlighterBundle.message("description.text.string.escape") to KotlinHighlightingColors.STRING_ESCAPE,
|
||||||
OptionsBundle.message("options.java.attribute.descriptor.invalid.escape.in.string") to KotlinHighlightingColors.INVALID_STRING_ESCAPE,
|
OptionsBundle.message("options.java.attribute.descriptor.invalid.escape.in.string") to KotlinHighlightingColors.INVALID_STRING_ESCAPE,
|
||||||
OptionsBundle.message("options.java.attribute.descriptor.operator.sign") to KotlinHighlightingColors.OPERATOR_SIGN,
|
OptionsBundle.message("options.java.attribute.descriptor.operator.sign") to KotlinHighlightingColors.OPERATOR_SIGN,
|
||||||
OptionsBundle.message("options.java.attribute.descriptor.parentheses") to KotlinHighlightingColors.PARENTHESIS,
|
OptionsBundle.message("options.java.attribute.descriptor.parentheses") to KotlinHighlightingColors.PARENTHESIS,
|
||||||
OptionsBundle.message("options.java.attribute.descriptor.braces") to KotlinHighlightingColors.BRACES,
|
OptionsBundle.message("options.java.attribute.descriptor.braces") to KotlinHighlightingColors.BRACES,
|
||||||
KotlinBundle.message("options.color.attribute.descriptor.closure.braces") to KotlinHighlightingColors.FUNCTION_LITERAL_BRACES_AND_ARROW,
|
KotlinHighlighterBundle.message("description.text.closure.braces") to KotlinHighlightingColors.FUNCTION_LITERAL_BRACES_AND_ARROW,
|
||||||
KotlinBundle.message("options.color.attribute.descriptor.arrow") to KotlinHighlightingColors.ARROW,
|
KotlinHighlighterBundle.message("description.text.arrow") to KotlinHighlightingColors.ARROW,
|
||||||
OptionsBundle.message("options.java.attribute.descriptor.brackets") to KotlinHighlightingColors.BRACKETS,
|
OptionsBundle.message("options.java.attribute.descriptor.brackets") to KotlinHighlightingColors.BRACKETS,
|
||||||
OptionsBundle.message("options.java.attribute.descriptor.comma") to KotlinHighlightingColors.COMMA,
|
OptionsBundle.message("options.java.attribute.descriptor.comma") to KotlinHighlightingColors.COMMA,
|
||||||
OptionsBundle.message("options.java.attribute.descriptor.semicolon") to KotlinHighlightingColors.SEMICOLON,
|
OptionsBundle.message("options.java.attribute.descriptor.semicolon") to KotlinHighlightingColors.SEMICOLON,
|
||||||
KotlinBundle.message("options.color.attribute.descriptor.colon") to KotlinHighlightingColors.COLON,
|
KotlinHighlighterBundle.message("description.text.colon") to KotlinHighlightingColors.COLON,
|
||||||
KotlinBundle.message("options.color.attribute.descriptor.double.colon") to KotlinHighlightingColors.DOUBLE_COLON,
|
KotlinHighlighterBundle.message("description.text.double.colon") to KotlinHighlightingColors.DOUBLE_COLON,
|
||||||
OptionsBundle.message("options.java.attribute.descriptor.dot") to KotlinHighlightingColors.DOT,
|
OptionsBundle.message("options.java.attribute.descriptor.dot") to KotlinHighlightingColors.DOT,
|
||||||
KotlinBundle.message("options.color.attribute.descriptor.safe.access") to KotlinHighlightingColors.SAFE_ACCESS,
|
KotlinHighlighterBundle.message("description.text.safe.access") to KotlinHighlightingColors.SAFE_ACCESS,
|
||||||
KotlinBundle.message("options.color.attribute.descriptor.quest") to KotlinHighlightingColors.QUEST,
|
KotlinHighlighterBundle.message("description.text.quest") to KotlinHighlightingColors.QUEST,
|
||||||
KotlinBundle.message("options.color.attribute.descriptor.exclexcl") to KotlinHighlightingColors.EXCLEXCL,
|
KotlinHighlighterBundle.message("description.text.exclexcl") to KotlinHighlightingColors.EXCLEXCL,
|
||||||
OptionsBundle.message("options.java.attribute.descriptor.line.comment") to KotlinHighlightingColors.LINE_COMMENT,
|
OptionsBundle.message("options.java.attribute.descriptor.line.comment") to KotlinHighlightingColors.LINE_COMMENT,
|
||||||
OptionsBundle.message("options.java.attribute.descriptor.block.comment") to KotlinHighlightingColors.BLOCK_COMMENT,
|
OptionsBundle.message("options.java.attribute.descriptor.block.comment") to KotlinHighlightingColors.BLOCK_COMMENT,
|
||||||
KotlinBundle.message("options.color.attribute.descriptor.kdoc.comment") to KotlinHighlightingColors.DOC_COMMENT,
|
KotlinHighlighterBundle.message("description.text.kdoc.comment") to KotlinHighlightingColors.DOC_COMMENT,
|
||||||
KotlinBundle.message("options.color.attribute.descriptor.kdoc.tag") to KotlinHighlightingColors.KDOC_TAG,
|
KotlinHighlighterBundle.message("description.text.kdoc.tag") to KotlinHighlightingColors.KDOC_TAG,
|
||||||
KotlinBundle.message("options.color.attribute.descriptor.kdoc.value") to KotlinHighlightingColors.KDOC_LINK,
|
KotlinHighlighterBundle.message("description.text.kdoc.value") to KotlinHighlightingColors.KDOC_LINK,
|
||||||
OptionsBundle.message("options.java.attribute.descriptor.class") to KotlinHighlightingColors.CLASS,
|
OptionsBundle.message("options.java.attribute.descriptor.class") to KotlinHighlightingColors.CLASS,
|
||||||
OptionsBundle.message("options.java.attribute.descriptor.type.parameter") to KotlinHighlightingColors.TYPE_PARAMETER,
|
OptionsBundle.message("options.java.attribute.descriptor.type.parameter") to KotlinHighlightingColors.TYPE_PARAMETER,
|
||||||
OptionsBundle.message("options.java.attribute.descriptor.abstract.class") to KotlinHighlightingColors.ABSTRACT_CLASS,
|
OptionsBundle.message("options.java.attribute.descriptor.abstract.class") to KotlinHighlightingColors.ABSTRACT_CLASS,
|
||||||
OptionsBundle.message("options.java.attribute.descriptor.interface") to KotlinHighlightingColors.TRAIT,
|
OptionsBundle.message("options.java.attribute.descriptor.interface") to KotlinHighlightingColors.TRAIT,
|
||||||
KotlinBundle.message("options.color.attribute.descriptor.annotation") to KotlinHighlightingColors.ANNOTATION,
|
KotlinHighlighterBundle.message("description.text.annotation") to KotlinHighlightingColors.ANNOTATION,
|
||||||
KotlinBundle.message("options.color.attribute.descriptor.annotation.attribute.name") to KotlinHighlightingColors.ANNOTATION_ATTRIBUTE_NAME_ATTRIBUTES,
|
KotlinBundle.message("description.text.annotation.attribute.name") to KotlinHighlightingColors.ANNOTATION_ATTRIBUTE_NAME_ATTRIBUTES,
|
||||||
KotlinBundle.message("options.color.attribute.descriptor.object") to KotlinHighlightingColors.OBJECT,
|
KotlinHighlighterBundle.message("description.text.object") to KotlinHighlightingColors.OBJECT,
|
||||||
KotlinBundle.message("options.color.attribute.descriptor.enumEntry") to KotlinHighlightingColors.ENUM_ENTRY,
|
KotlinHighlighterBundle.message("description.text.enumEntry") to KotlinHighlightingColors.ENUM_ENTRY,
|
||||||
KotlinBundle.message("options.color.attribute.descriptor.typeAlias") to KotlinHighlightingColors.TYPE_ALIAS,
|
KotlinHighlighterBundle.message("description.text.typeAlias") to KotlinHighlightingColors.TYPE_ALIAS,
|
||||||
KotlinBundle.message("options.color.attribute.descriptor.var") to KotlinHighlightingColors.MUTABLE_VARIABLE,
|
KotlinHighlighterBundle.message("description.text.var") to KotlinHighlightingColors.MUTABLE_VARIABLE,
|
||||||
KotlinBundle.message("options.color.attribute.descriptor.local.variable") to KotlinHighlightingColors.LOCAL_VARIABLE,
|
KotlinHighlighterBundle.message("description.text.local.variable") to KotlinHighlightingColors.LOCAL_VARIABLE,
|
||||||
OptionsBundle.message("options.java.attribute.descriptor.parameter") to KotlinHighlightingColors.PARAMETER,
|
OptionsBundle.message("options.java.attribute.descriptor.parameter") to KotlinHighlightingColors.PARAMETER,
|
||||||
KotlinBundle.message("options.color.attribute.descriptor.captured.variable") to KotlinHighlightingColors.WRAPPED_INTO_REF,
|
KotlinHighlighterBundle.message("description.text.captured.variable") to KotlinHighlightingColors.WRAPPED_INTO_REF,
|
||||||
KotlinBundle.message("options.color.attribute.descriptor.instance.property") to KotlinHighlightingColors.INSTANCE_PROPERTY,
|
KotlinHighlighterBundle.message("description.text.instance.property") to KotlinHighlightingColors.INSTANCE_PROPERTY,
|
||||||
KotlinBundle.message("options.color.attribute.descriptor.instance.property.custom.property.declaration") to KotlinHighlightingColors.INSTANCE_PROPERTY_CUSTOM_PROPERTY_DECLARATION,
|
KotlinHighlighterBundle.message("description.text.instance.property.custom.property.declaration") to KotlinHighlightingColors.INSTANCE_PROPERTY_CUSTOM_PROPERTY_DECLARATION,
|
||||||
KotlinBundle.message("options.color.attribute.descriptor.package.property.custom.property.declaration") to KotlinHighlightingColors.PACKAGE_PROPERTY_CUSTOM_PROPERTY_DECLARATION,
|
KotlinHighlighterBundle.message("description.text.package.property.custom.property.declaration") to KotlinHighlightingColors.PACKAGE_PROPERTY_CUSTOM_PROPERTY_DECLARATION,
|
||||||
KotlinBundle.message("options.color.attribute.descriptor.package.property") to KotlinHighlightingColors.PACKAGE_PROPERTY,
|
KotlinHighlighterBundle.message("description.text.package.property") to KotlinHighlightingColors.PACKAGE_PROPERTY,
|
||||||
KotlinBundle.message("options.color.attribute.descriptor.field") to KotlinHighlightingColors.BACKING_FIELD_VARIABLE,
|
KotlinHighlighterBundle.message("description.text.field") to KotlinHighlightingColors.BACKING_FIELD_VARIABLE,
|
||||||
KotlinBundle.message("options.color.attribute.descriptor.extension.property") to KotlinHighlightingColors.EXTENSION_PROPERTY,
|
KotlinHighlighterBundle.message("description.text.extension.property") to KotlinHighlightingColors.EXTENSION_PROPERTY,
|
||||||
KotlinBundle.message("options.color.attribute.descriptor.synthetic.extension.property") to KotlinHighlightingColors.SYNTHETIC_EXTENSION_PROPERTY,
|
KotlinHighlighterBundle.message("description.text.synthetic.extension.property") to KotlinHighlightingColors.SYNTHETIC_EXTENSION_PROPERTY,
|
||||||
KotlinBundle.message("options.color.attribute.descriptor.dynamic.property") to KotlinHighlightingColors.DYNAMIC_PROPERTY_CALL,
|
KotlinHighlighterBundle.message("description.text.dynamic.property") to KotlinHighlightingColors.DYNAMIC_PROPERTY_CALL,
|
||||||
KotlinBundle.message("options.color.attribute.descriptor.android.extensions.property") to KotlinHighlightingColors.ANDROID_EXTENSIONS_PROPERTY_CALL,
|
KotlinHighlighterBundle.message("description.text.android.extensions.property") to KotlinHighlightingColors.ANDROID_EXTENSIONS_PROPERTY_CALL,
|
||||||
KotlinBundle.message("options.color.attribute.descriptor.it") to KotlinHighlightingColors.FUNCTION_LITERAL_DEFAULT_PARAMETER,
|
KotlinHighlighterBundle.message("description.text.it") to KotlinHighlightingColors.FUNCTION_LITERAL_DEFAULT_PARAMETER,
|
||||||
KotlinBundle.message("options.color.attribute.descriptor.fun") to KotlinHighlightingColors.FUNCTION_DECLARATION,
|
KotlinHighlighterBundle.message("description.text.fun") to KotlinHighlightingColors.FUNCTION_DECLARATION,
|
||||||
KotlinBundle.message("options.color.attribute.descriptor.fun.call") to KotlinHighlightingColors.FUNCTION_CALL,
|
KotlinHighlighterBundle.message("description.text.fun.call") to KotlinHighlightingColors.FUNCTION_CALL,
|
||||||
KotlinBundle.message("options.color.attribute.descriptor.dynamic.fun.call") to KotlinHighlightingColors.DYNAMIC_FUNCTION_CALL,
|
KotlinHighlighterBundle.message("description.text.dynamic.fun.call") to KotlinHighlightingColors.DYNAMIC_FUNCTION_CALL,
|
||||||
KotlinBundle.message("options.color.attribute.descriptor.suspend.fun.call") to KotlinHighlightingColors.SUSPEND_FUNCTION_CALL,
|
KotlinHighlighterBundle.message("description.text.suspend.fun.call") to KotlinHighlightingColors.SUSPEND_FUNCTION_CALL,
|
||||||
KotlinBundle.message("options.color.attribute.descriptor.package.fun.call") to KotlinHighlightingColors.PACKAGE_FUNCTION_CALL,
|
KotlinHighlighterBundle.message("description.text.package.fun.call") to KotlinHighlightingColors.PACKAGE_FUNCTION_CALL,
|
||||||
KotlinBundle.message("options.color.attribute.descriptor.extension.fun.call") to KotlinHighlightingColors.EXTENSION_FUNCTION_CALL,
|
KotlinHighlighterBundle.message("description.text.extension.fun.call") to KotlinHighlightingColors.EXTENSION_FUNCTION_CALL,
|
||||||
KotlinBundle.message("options.color.attribute.descriptor.constructor.call") to KotlinHighlightingColors.CONSTRUCTOR_CALL,
|
KotlinHighlighterBundle.message("description.text.constructor.call") to KotlinHighlightingColors.CONSTRUCTOR_CALL,
|
||||||
KotlinBundle.message("options.color.attribute.descriptor.variable.as.function.call") to KotlinHighlightingColors.VARIABLE_AS_FUNCTION_CALL,
|
KotlinHighlighterBundle.message("description.text.variable.as.function.call") to KotlinHighlightingColors.VARIABLE_AS_FUNCTION_CALL,
|
||||||
KotlinBundle.message("options.color.attribute.descriptor.variable.as.function.like.call") to KotlinHighlightingColors.VARIABLE_AS_FUNCTION_LIKE_CALL,
|
KotlinHighlighterBundle.message("description.text.variable.as.function.like.call") to KotlinHighlightingColors.VARIABLE_AS_FUNCTION_LIKE_CALL,
|
||||||
KotlinBundle.message("options.color.attribute.descriptor.smart.cast") to KotlinHighlightingColors.SMART_CAST_VALUE,
|
KotlinHighlighterBundle.message("description.text.smart.cast") to KotlinHighlightingColors.SMART_CAST_VALUE,
|
||||||
KotlinBundle.message("options.color.attribute.descriptor.smart.constant") to KotlinHighlightingColors.SMART_CONSTANT,
|
KotlinHighlighterBundle.message("description.text.smart.constant") to KotlinHighlightingColors.SMART_CONSTANT,
|
||||||
KotlinBundle.message("options.color.attribute.descriptor.smart.cast.receiver") to KotlinHighlightingColors.SMART_CAST_RECEIVER,
|
KotlinHighlighterBundle.message("description.text.smart.cast.receiver") to KotlinHighlightingColors.SMART_CAST_RECEIVER,
|
||||||
KotlinBundle.message("options.color.attribute.descriptor.label") to KotlinHighlightingColors.LABEL,
|
KotlinHighlighterBundle.message("description.text.label") to KotlinHighlightingColors.LABEL,
|
||||||
"Named argument" to KotlinHighlightingColors.NAMED_ARGUMENT
|
KotlinHighlighterBundle.message("description.text.named.argument") to KotlinHighlightingColors.NAMED_ARGUMENT
|
||||||
) +
|
) + DslHighlighterExtension.descriptionsToStyles.map { (description, key) -> description to key }.toTypedArray()
|
||||||
DslHighlighterExtension.descriptionsToStyles.map { (description, key) -> description to key }.toTypedArray()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun getColorDescriptors(): Array<ColorDescriptor> = ColorDescriptor.EMPTY_ARRAY
|
override fun getColorDescriptors(): Array<ColorDescriptor> = ColorDescriptor.EMPTY_ARRAY
|
||||||
|
|||||||
@@ -0,0 +1,18 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||||
|
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package org.jetbrains.kotlin.idea.highlighter
|
||||||
|
|
||||||
|
import org.jetbrains.annotations.NonNls
|
||||||
|
import org.jetbrains.annotations.PropertyKey
|
||||||
|
import org.jetbrains.kotlin.util.AbstractKotlinBundle
|
||||||
|
|
||||||
|
@NonNls
|
||||||
|
private const val BUNDLE = "messages.KotlinHighlighterBundle"
|
||||||
|
|
||||||
|
object KotlinHighlighterBundle : AbstractKotlinBundle(BUNDLE) {
|
||||||
|
@JvmStatic
|
||||||
|
fun message(@PropertyKey(resourceBundle = BUNDLE) key: String, vararg params: Any): String = getMessage(key, *params)
|
||||||
|
}
|
||||||
+1
-1
@@ -124,7 +124,7 @@ class KotlinRecursiveCallLineMarkerProvider : LineMarkerProvider {
|
|||||||
callElement.textRange,
|
callElement.textRange,
|
||||||
AllIcons.Gutter.RecursiveMethod,
|
AllIcons.Gutter.RecursiveMethod,
|
||||||
Pass.LINE_MARKERS,
|
Pass.LINE_MARKERS,
|
||||||
{ "Recursive call" },
|
{ KotlinHighlighterBundle.message("tool.tip.text.recursive.call") },
|
||||||
null,
|
null,
|
||||||
GutterIconRenderer.Alignment.RIGHT
|
GutterIconRenderer.Alignment.RIGHT
|
||||||
) {
|
) {
|
||||||
|
|||||||
+5
-2
@@ -67,9 +67,12 @@ class KotlinSuspendCallLineMarkerProvider : LineMarkerProvider {
|
|||||||
|
|
||||||
markedLineNumbers += lineNumber
|
markedLineNumbers += lineNumber
|
||||||
result += if (element is KtForExpression) {
|
result += if (element is KtForExpression) {
|
||||||
SuspendCallMarkerInfo(getElementForLineMark(element.loopRange!!), "Suspending iteration")
|
SuspendCallMarkerInfo(
|
||||||
|
getElementForLineMark(element.loopRange!!),
|
||||||
|
KotlinHighlighterBundle.message("message.suspending.iteration")
|
||||||
|
)
|
||||||
} else {
|
} else {
|
||||||
SuspendCallMarkerInfo(getElementForLineMark(element), "Suspend function call")
|
SuspendCallMarkerInfo(getElementForLineMark(element), KotlinHighlighterBundle.message("message.suspend.function.call"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -67,6 +67,6 @@ class KotlinTestRunLineMarkerContributor : RunLineMarkerContributor() {
|
|||||||
|
|
||||||
val targetPlatform = declaration.module?.platform ?: return null
|
val targetPlatform = declaration.module?.platform ?: return null
|
||||||
val icon = targetPlatform.idePlatformKind.tooling.getTestIcon(declaration, descriptor) ?: return null
|
val icon = targetPlatform.idePlatformKind.tooling.getTestIcon(declaration, descriptor) ?: return null
|
||||||
return Info(icon, Function { "Run Test" }, *ExecutorAction.getActions())
|
return Info(icon, Function { KotlinHighlighterBundle.message("tool.tip.text.run.test") }, *ExecutorAction.getActions())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ import org.jetbrains.kotlin.descriptors.CallableDescriptor
|
|||||||
import org.jetbrains.kotlin.descriptors.ClassDescriptor
|
import org.jetbrains.kotlin.descriptors.ClassDescriptor
|
||||||
import org.jetbrains.kotlin.descriptors.DeclarationDescriptor
|
import org.jetbrains.kotlin.descriptors.DeclarationDescriptor
|
||||||
import org.jetbrains.kotlin.idea.highlighter.HighlighterExtension
|
import org.jetbrains.kotlin.idea.highlighter.HighlighterExtension
|
||||||
|
import org.jetbrains.kotlin.idea.highlighter.KotlinHighlighterBundle
|
||||||
import org.jetbrains.kotlin.resolve.calls.DslMarkerUtils
|
import org.jetbrains.kotlin.resolve.calls.DslMarkerUtils
|
||||||
import org.jetbrains.kotlin.resolve.calls.model.ResolvedCall
|
import org.jetbrains.kotlin.resolve.calls.model.ResolvedCall
|
||||||
import org.jetbrains.kotlin.resolve.descriptorUtil.annotationClass
|
import org.jetbrains.kotlin.resolve.descriptorUtil.annotationClass
|
||||||
@@ -44,10 +45,10 @@ class DslHighlighterExtension : HighlighterExtension() {
|
|||||||
fun externalKeyName(index: Int) = "KOTLIN_DSL_STYLE$index"
|
fun externalKeyName(index: Int) = "KOTLIN_DSL_STYLE$index"
|
||||||
|
|
||||||
val descriptionsToStyles = (1..numStyles).associate { index ->
|
val descriptionsToStyles = (1..numStyles).associate { index ->
|
||||||
"Dsl//${styleOptionDisplayName(index)}" to styleById(index)
|
KotlinHighlighterBundle.message("name.dsl") + styleOptionDisplayName(index) to styleById(index)
|
||||||
}
|
}
|
||||||
|
|
||||||
fun styleOptionDisplayName(index: Int) = "Style$index"
|
fun styleOptionDisplayName(index: Int) = KotlinHighlighterBundle.message("name.style") + index
|
||||||
|
|
||||||
fun styleIdByMarkerAnnotation(markerAnnotation: ClassDescriptor): Int? {
|
fun styleIdByMarkerAnnotation(markerAnnotation: ClassDescriptor): Int? {
|
||||||
val markerAnnotationFqName = markerAnnotation.fqNameSafe
|
val markerAnnotationFqName = markerAnnotation.fqNameSafe
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ import org.jetbrains.kotlin.descriptors.ClassDescriptor
|
|||||||
import org.jetbrains.kotlin.descriptors.ClassKind
|
import org.jetbrains.kotlin.descriptors.ClassKind
|
||||||
import org.jetbrains.kotlin.idea.KotlinLanguage
|
import org.jetbrains.kotlin.idea.KotlinLanguage
|
||||||
import org.jetbrains.kotlin.idea.core.toDescriptor
|
import org.jetbrains.kotlin.idea.core.toDescriptor
|
||||||
|
import org.jetbrains.kotlin.idea.highlighter.KotlinHighlighterBundle
|
||||||
import org.jetbrains.kotlin.idea.highlighter.dsl.DslHighlighterExtension
|
import org.jetbrains.kotlin.idea.highlighter.dsl.DslHighlighterExtension
|
||||||
import org.jetbrains.kotlin.idea.highlighter.dsl.isDslHighlightingMarker
|
import org.jetbrains.kotlin.idea.highlighter.dsl.isDslHighlightingMarker
|
||||||
import org.jetbrains.kotlin.psi.KtClass
|
import org.jetbrains.kotlin.psi.KtClass
|
||||||
@@ -31,7 +32,7 @@ private val navHandler = GutterIconNavigationHandler<PsiElement> { event, elemen
|
|||||||
}
|
}
|
||||||
|
|
||||||
private val toolTipHandler = Function<PsiElement, String> {
|
private val toolTipHandler = Function<PsiElement, String> {
|
||||||
"Marker annotation for DSL"
|
KotlinHighlighterBundle.message("tool.tip.marker.annotation.for.dsl")
|
||||||
}
|
}
|
||||||
|
|
||||||
fun collectHighlightingColorsMarkers(
|
fun collectHighlightingColorsMarkers(
|
||||||
|
|||||||
@@ -23,10 +23,11 @@ import org.jetbrains.kotlin.descriptors.ModuleDescriptor
|
|||||||
import org.jetbrains.kotlin.idea.caches.project.ModuleSourceInfo
|
import org.jetbrains.kotlin.idea.caches.project.ModuleSourceInfo
|
||||||
import org.jetbrains.kotlin.idea.core.isAndroidModule
|
import org.jetbrains.kotlin.idea.core.isAndroidModule
|
||||||
import org.jetbrains.kotlin.idea.core.toDescriptor
|
import org.jetbrains.kotlin.idea.core.toDescriptor
|
||||||
|
import org.jetbrains.kotlin.idea.highlighter.KotlinHighlighterBundle
|
||||||
import org.jetbrains.kotlin.idea.util.actualsForExpected
|
import org.jetbrains.kotlin.idea.util.actualsForExpected
|
||||||
|
import org.jetbrains.kotlin.platform.isCommon
|
||||||
import org.jetbrains.kotlin.psi.KtDeclaration
|
import org.jetbrains.kotlin.psi.KtDeclaration
|
||||||
import org.jetbrains.kotlin.resolve.descriptorUtil.module
|
import org.jetbrains.kotlin.resolve.descriptorUtil.module
|
||||||
import org.jetbrains.kotlin.platform.isCommon
|
|
||||||
|
|
||||||
private fun ModuleDescriptor?.getPlatformName(): String? {
|
private fun ModuleDescriptor?.getPlatformName(): String? {
|
||||||
if (this == null) return null
|
if (this == null) return null
|
||||||
@@ -52,8 +53,8 @@ fun getPlatformActualTooltip(declaration: KtDeclaration): String? {
|
|||||||
.groupBy { it.getPlatformName() }
|
.groupBy { it.getPlatformName() }
|
||||||
.filter { (platform, _) -> platform != null }
|
.filter { (platform, _) -> platform != null }
|
||||||
.entries
|
.entries
|
||||||
.joinToString(prefix = "Has actuals in ") { (platform, modules) ->
|
.joinToString(prefix = KotlinHighlighterBundle.message("prefix.text.has.actuals.in") + " ") { (platform, modules) ->
|
||||||
val modulesSuffix = if (modules.size <= 1) "" else " (${modules.size} modules)"
|
val modulesSuffix = if (modules.size <= 1) "" else KotlinHighlighterBundle.message("text.modules", modules.size)
|
||||||
if (platform == null) {
|
if (platform == null) {
|
||||||
throw AssertionError("Platform should not be null")
|
throw AssertionError("Platform should not be null")
|
||||||
}
|
}
|
||||||
@@ -68,9 +69,9 @@ class ActualExpectedPsiElementCellRenderer : DefaultPsiElementCellRenderer() {
|
|||||||
override fun getContainerText(element: PsiElement?, name: String?) = ""
|
override fun getContainerText(element: PsiElement?, name: String?) = ""
|
||||||
}
|
}
|
||||||
|
|
||||||
fun KtDeclaration.navigateToActualTitle() = "Choose actual for $name"
|
fun KtDeclaration.navigateToActualTitle() = KotlinHighlighterBundle.message("title.choose.actual.for", name.toString())
|
||||||
|
|
||||||
fun KtDeclaration.navigateToActualUsagesTitle() = "Actuals for $name"
|
fun KtDeclaration.navigateToActualUsagesTitle() = KotlinHighlighterBundle.message("title.actuals.for", name.toString())
|
||||||
|
|
||||||
fun buildNavigateToActualDeclarationsPopup(element: PsiElement?): NavigationPopupDescriptor? {
|
fun buildNavigateToActualDeclarationsPopup(element: PsiElement?): NavigationPopupDescriptor? {
|
||||||
return element?.markerDeclaration?.let {
|
return element?.markerDeclaration?.let {
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ import org.jetbrains.kotlin.descriptors.MemberDescriptor
|
|||||||
import org.jetbrains.kotlin.idea.caches.project.implementedDescriptors
|
import org.jetbrains.kotlin.idea.caches.project.implementedDescriptors
|
||||||
import org.jetbrains.kotlin.idea.caches.resolve.findModuleDescriptor
|
import org.jetbrains.kotlin.idea.caches.resolve.findModuleDescriptor
|
||||||
import org.jetbrains.kotlin.idea.core.toDescriptor
|
import org.jetbrains.kotlin.idea.core.toDescriptor
|
||||||
|
import org.jetbrains.kotlin.idea.highlighter.KotlinHighlighterBundle
|
||||||
import org.jetbrains.kotlin.idea.util.expectedDeclarationIfAny
|
import org.jetbrains.kotlin.idea.util.expectedDeclarationIfAny
|
||||||
import org.jetbrains.kotlin.idea.util.hasDeclarationOf
|
import org.jetbrains.kotlin.idea.util.hasDeclarationOf
|
||||||
import org.jetbrains.kotlin.psi.KtDeclaration
|
import org.jetbrains.kotlin.psi.KtDeclaration
|
||||||
@@ -32,15 +33,15 @@ fun getExpectedDeclarationTooltip(declaration: KtDeclaration): String? {
|
|||||||
val commonModuleDescriptors = platformModuleDescriptor.implementedDescriptors
|
val commonModuleDescriptors = platformModuleDescriptor.implementedDescriptors
|
||||||
if (!commonModuleDescriptors.any { it.hasDeclarationOf(descriptor) }) return null
|
if (!commonModuleDescriptors.any { it.hasDeclarationOf(descriptor) }) return null
|
||||||
|
|
||||||
return "Has declaration in common module"
|
return KotlinHighlighterBundle.message("tool.tip.has.declaration.in.common.module")
|
||||||
}
|
}
|
||||||
|
|
||||||
fun KtDeclaration.allNavigatableExpectedDeclarations(): List<KtDeclaration> =
|
fun KtDeclaration.allNavigatableExpectedDeclarations(): List<KtDeclaration> =
|
||||||
listOfNotNull(expectedDeclarationIfAny()) + findMarkerBoundDeclarations().mapNotNull { it.expectedDeclarationIfAny() }
|
listOfNotNull(expectedDeclarationIfAny()) + findMarkerBoundDeclarations().mapNotNull { it.expectedDeclarationIfAny() }
|
||||||
|
|
||||||
fun KtDeclaration.navigateToExpectedTitle() = "Choose expected for $name"
|
fun KtDeclaration.navigateToExpectedTitle() = KotlinHighlighterBundle.message("title.choose.expected.for", name.toString())
|
||||||
|
|
||||||
fun KtDeclaration.navigateToExpectedUsagesTitle() = "Expected for $name"
|
fun KtDeclaration.navigateToExpectedUsagesTitle() = KotlinHighlighterBundle.message("title.expected.for", name.toString())
|
||||||
|
|
||||||
fun buildNavigateToExpectedDeclarationsPopup(element: PsiElement?): NavigationPopupDescriptor? {
|
fun buildNavigateToExpectedDeclarationsPopup(element: PsiElement?): NavigationPopupDescriptor? {
|
||||||
return element?.markerDeclaration?.let {
|
return element?.markerDeclaration?.let {
|
||||||
|
|||||||
@@ -8,22 +8,43 @@ package org.jetbrains.kotlin.idea.highlighter.markers
|
|||||||
import com.intellij.codeInsight.daemon.GutterIconDescriptor
|
import com.intellij.codeInsight.daemon.GutterIconDescriptor
|
||||||
import com.intellij.icons.AllIcons
|
import com.intellij.icons.AllIcons
|
||||||
import org.jetbrains.kotlin.idea.KotlinIcons
|
import org.jetbrains.kotlin.idea.KotlinIcons
|
||||||
|
import org.jetbrains.kotlin.idea.highlighter.KotlinHighlighterBundle
|
||||||
|
|
||||||
internal object KotlinLineMarkerOptions {
|
internal object KotlinLineMarkerOptions {
|
||||||
val overriddenOption = GutterIconDescriptor.Option("kotlin.overridden", "Overridden declaration", AllIcons.Gutter.OverridenMethod)
|
val overriddenOption = GutterIconDescriptor.Option(
|
||||||
|
"kotlin.overridden",
|
||||||
|
KotlinHighlighterBundle.message("name.overridden.declaration"), AllIcons.Gutter.OverridenMethod
|
||||||
|
)
|
||||||
|
|
||||||
val implementedOption = GutterIconDescriptor.Option("kotlin.implemented", "Implemented declaration", AllIcons.Gutter.ImplementedMethod)
|
val implementedOption = GutterIconDescriptor.Option(
|
||||||
|
"kotlin.implemented",
|
||||||
|
KotlinHighlighterBundle.message("name.implemented.declaration"), AllIcons.Gutter.ImplementedMethod
|
||||||
|
)
|
||||||
|
|
||||||
val overridingOption = GutterIconDescriptor.Option("kotlin.overriding", "Overriding declaration", AllIcons.Gutter.OverridingMethod)
|
val overridingOption = GutterIconDescriptor.Option(
|
||||||
|
"kotlin.overriding",
|
||||||
|
KotlinHighlighterBundle.message("name.overriding.declaration"), AllIcons.Gutter.OverridingMethod
|
||||||
|
)
|
||||||
|
|
||||||
val implementingOption =
|
val implementingOption =
|
||||||
GutterIconDescriptor.Option("kotlin.implementing", "Implementing declaration", AllIcons.Gutter.ImplementingMethod)
|
GutterIconDescriptor.Option(
|
||||||
|
"kotlin.implementing",
|
||||||
|
KotlinHighlighterBundle.message("name.implementing.declaration"),
|
||||||
|
AllIcons.Gutter.ImplementingMethod
|
||||||
|
)
|
||||||
|
|
||||||
val actualOption = GutterIconDescriptor.Option("kotlin.actual", "Multiplatform actual declaration", KotlinIcons.ACTUAL)
|
val actualOption = GutterIconDescriptor.Option(
|
||||||
|
"kotlin.actual",
|
||||||
|
KotlinHighlighterBundle.message("name.multiplatform.actual.declaration"), KotlinIcons.ACTUAL
|
||||||
|
)
|
||||||
|
|
||||||
val expectOption = GutterIconDescriptor.Option("kotlin.expect", "Multiplatform expect declaration", KotlinIcons.EXPECT)
|
val expectOption = GutterIconDescriptor.Option(
|
||||||
|
"kotlin.expect",
|
||||||
|
KotlinHighlighterBundle.message("name.multiplatform.expect.declaration"), KotlinIcons.EXPECT
|
||||||
|
)
|
||||||
|
|
||||||
val dslOption = GutterIconDescriptor.Option("kotlin.dsl", "DSL markers", KotlinIcons.DSL_MARKER_ANNOTATION)
|
val dslOption =
|
||||||
|
GutterIconDescriptor.Option("kotlin.dsl", KotlinHighlighterBundle.message("name.dsl.markers"), KotlinIcons.DSL_MARKER_ANNOTATION)
|
||||||
|
|
||||||
val options = arrayOf(
|
val options = arrayOf(
|
||||||
overriddenOption, implementedOption,
|
overriddenOption, implementedOption,
|
||||||
|
|||||||
@@ -37,6 +37,7 @@ import org.jetbrains.kotlin.idea.core.isInheritable
|
|||||||
import org.jetbrains.kotlin.idea.core.isOverridable
|
import org.jetbrains.kotlin.idea.core.isOverridable
|
||||||
import org.jetbrains.kotlin.idea.core.toDescriptor
|
import org.jetbrains.kotlin.idea.core.toDescriptor
|
||||||
import org.jetbrains.kotlin.idea.editor.fixers.startLine
|
import org.jetbrains.kotlin.idea.editor.fixers.startLine
|
||||||
|
import org.jetbrains.kotlin.idea.highlighter.KotlinHighlighterBundle
|
||||||
import org.jetbrains.kotlin.idea.presentation.DeclarationByModuleRenderer
|
import org.jetbrains.kotlin.idea.presentation.DeclarationByModuleRenderer
|
||||||
import org.jetbrains.kotlin.idea.search.declarationsSearch.toPossiblyFakeLightMethods
|
import org.jetbrains.kotlin.idea.search.declarationsSearch.toPossiblyFakeLightMethods
|
||||||
import org.jetbrains.kotlin.idea.util.*
|
import org.jetbrains.kotlin.idea.util.*
|
||||||
@@ -49,7 +50,7 @@ import java.util.*
|
|||||||
import javax.swing.ListCellRenderer
|
import javax.swing.ListCellRenderer
|
||||||
|
|
||||||
class KotlinLineMarkerProvider : LineMarkerProviderDescriptor() {
|
class KotlinLineMarkerProvider : LineMarkerProviderDescriptor() {
|
||||||
override fun getName() = "Kotlin line markers"
|
override fun getName() = KotlinHighlighterBundle.message("name.kotlin.line.markers")
|
||||||
|
|
||||||
override fun getOptions(): Array<Option> = KotlinLineMarkerOptions.options
|
override fun getOptions(): Array<Option> = KotlinLineMarkerOptions.options
|
||||||
|
|
||||||
@@ -278,7 +279,9 @@ private fun collectSuperDeclarationMarkers(declaration: KtDeclaration, result: M
|
|||||||
)
|
)
|
||||||
NavigateAction.setNavigateAction(
|
NavigateAction.setNavigateAction(
|
||||||
lineMarkerInfo,
|
lineMarkerInfo,
|
||||||
if (declaration is KtNamedFunction) "Go to super method" else "Go to super property",
|
if (declaration is KtNamedFunction) KotlinHighlighterBundle.message("action.text.go.to.super.method") else KotlinHighlighterBundle.message(
|
||||||
|
"action.text.go.to.super.property"
|
||||||
|
),
|
||||||
IdeActions.ACTION_GOTO_SUPER
|
IdeActions.ACTION_GOTO_SUPER
|
||||||
)
|
)
|
||||||
result.add(lineMarkerInfo)
|
result.add(lineMarkerInfo)
|
||||||
@@ -308,7 +311,9 @@ private fun collectInheritedClassMarker(element: KtClass, result: MutableCollect
|
|||||||
)
|
)
|
||||||
NavigateAction.setNavigateAction(
|
NavigateAction.setNavigateAction(
|
||||||
lineMarkerInfo,
|
lineMarkerInfo,
|
||||||
if (element.isInterface()) "Go to implementations" else "Go to subclasses",
|
if (element.isInterface()) KotlinHighlighterBundle.message("action.text.go.to.implementations") else KotlinHighlighterBundle.message(
|
||||||
|
"action.text.go.to.subclasses"
|
||||||
|
),
|
||||||
IdeActions.ACTION_GOTO_IMPLEMENTATION
|
IdeActions.ACTION_GOTO_IMPLEMENTATION
|
||||||
)
|
)
|
||||||
result.add(lineMarkerInfo)
|
result.add(lineMarkerInfo)
|
||||||
@@ -346,7 +351,7 @@ private fun collectOverriddenPropertyAccessors(
|
|||||||
)
|
)
|
||||||
NavigateAction.setNavigateAction(
|
NavigateAction.setNavigateAction(
|
||||||
lineMarkerInfo,
|
lineMarkerInfo,
|
||||||
"Go to overridden properties",
|
KotlinHighlighterBundle.message("action.text.go.to.overridden.properties"),
|
||||||
IdeActions.ACTION_GOTO_IMPLEMENTATION
|
IdeActions.ACTION_GOTO_IMPLEMENTATION
|
||||||
)
|
)
|
||||||
result.add(lineMarkerInfo)
|
result.add(lineMarkerInfo)
|
||||||
@@ -478,7 +483,7 @@ private fun collectActualMarkers(
|
|||||||
)
|
)
|
||||||
NavigateAction.setNavigateAction(
|
NavigateAction.setNavigateAction(
|
||||||
lineMarkerInfo,
|
lineMarkerInfo,
|
||||||
"Go to actual declarations",
|
KotlinHighlighterBundle.message("action.text.go.to.actual.declarations"),
|
||||||
IdeActions.ACTION_GOTO_IMPLEMENTATION
|
IdeActions.ACTION_GOTO_IMPLEMENTATION
|
||||||
)
|
)
|
||||||
result.add(lineMarkerInfo)
|
result.add(lineMarkerInfo)
|
||||||
@@ -509,7 +514,7 @@ private fun collectExpectedMarkers(
|
|||||||
)
|
)
|
||||||
NavigateAction.setNavigateAction(
|
NavigateAction.setNavigateAction(
|
||||||
lineMarkerInfo,
|
lineMarkerInfo,
|
||||||
"Go to expected declaration",
|
KotlinHighlighterBundle.message("action.text.go.to.expected.declaration"),
|
||||||
null
|
null
|
||||||
)
|
)
|
||||||
result.add(lineMarkerInfo)
|
result.add(lineMarkerInfo)
|
||||||
@@ -548,7 +553,7 @@ private fun collectOverriddenFunctions(functions: Collection<KtNamedFunction>, r
|
|||||||
)
|
)
|
||||||
NavigateAction.setNavigateAction(
|
NavigateAction.setNavigateAction(
|
||||||
lineMarkerInfo,
|
lineMarkerInfo,
|
||||||
"Go to overridden methods",
|
KotlinHighlighterBundle.message("action.text.go.to.overridden.methods"),
|
||||||
IdeActions.ACTION_GOTO_IMPLEMENTATION
|
IdeActions.ACTION_GOTO_IMPLEMENTATION
|
||||||
)
|
)
|
||||||
result.add(lineMarkerInfo)
|
result.add(lineMarkerInfo)
|
||||||
|
|||||||
@@ -38,6 +38,7 @@ import gnu.trove.THashSet
|
|||||||
import org.jetbrains.kotlin.asJava.classes.KtLightClass
|
import org.jetbrains.kotlin.asJava.classes.KtLightClass
|
||||||
import org.jetbrains.kotlin.asJava.elements.KtLightMethod
|
import org.jetbrains.kotlin.asJava.elements.KtLightMethod
|
||||||
import org.jetbrains.kotlin.asJava.elements.isTraitFakeOverride
|
import org.jetbrains.kotlin.asJava.elements.isTraitFakeOverride
|
||||||
|
import org.jetbrains.kotlin.idea.highlighter.KotlinHighlighterBundle
|
||||||
import org.jetbrains.kotlin.idea.presentation.DeclarationByModuleRenderer
|
import org.jetbrains.kotlin.idea.presentation.DeclarationByModuleRenderer
|
||||||
import org.jetbrains.kotlin.idea.search.declarationsSearch.forEachDeclaredMemberOverride
|
import org.jetbrains.kotlin.idea.search.declarationsSearch.forEachDeclaredMemberOverride
|
||||||
import org.jetbrains.kotlin.idea.search.declarationsSearch.forEachOverridingMethod
|
import org.jetbrains.kotlin.idea.search.declarationsSearch.forEachOverridingMethod
|
||||||
@@ -87,15 +88,24 @@ fun getSubclassedClassTooltip(klass: PsiClass): String? {
|
|||||||
if (subclasses.isEmpty()) {
|
if (subclasses.isEmpty()) {
|
||||||
val functionalImplementations = PsiElementProcessor.CollectElementsWithLimit(2, THashSet<PsiFunctionalExpression>())
|
val functionalImplementations = PsiElementProcessor.CollectElementsWithLimit(2, THashSet<PsiFunctionalExpression>())
|
||||||
FunctionalExpressionSearch.search(klass).forEach(PsiElementProcessorAdapter(functionalImplementations))
|
FunctionalExpressionSearch.search(klass).forEach(PsiElementProcessorAdapter(functionalImplementations))
|
||||||
return if (functionalImplementations.collection.isNotEmpty()) "Has functional implementations" else null
|
return if (functionalImplementations.collection.isNotEmpty())
|
||||||
|
KotlinHighlighterBundle.message("text.has.functional.implementations")
|
||||||
|
else
|
||||||
|
null
|
||||||
}
|
}
|
||||||
|
|
||||||
val start = DaemonBundle.message(if (klass.isInterface) "interface.is.implemented.by.header" else "class.is.subclassed.by.header")
|
val start = DaemonBundle.message(if (klass.isInterface) "interface.is.implemented.by.header" else "class.is.subclassed.by.header")
|
||||||
val shortcuts = ActionManager.getInstance().getAction(IdeActions.ACTION_GOTO_IMPLEMENTATION).shortcutSet.shortcuts
|
val shortcuts = ActionManager.getInstance().getAction(IdeActions.ACTION_GOTO_IMPLEMENTATION).shortcutSet.shortcuts
|
||||||
val shortcut = shortcuts.firstOrNull()
|
val shortcut = shortcuts.firstOrNull()
|
||||||
var postfix = "<br><div style='margin-top: 5px'><font size='2'>Click"
|
val shortCutText = if (shortcut != null)
|
||||||
if (shortcut != null) postfix += " or press " + KeymapUtil.getShortcutText(shortcut)
|
KotlinHighlighterBundle.message("text.or.press", KeymapUtil.getShortcutText(shortcut))
|
||||||
postfix += " to navigate</font></div>"
|
else
|
||||||
|
""
|
||||||
|
|
||||||
|
val postfix = "<br><div style=''margin-top: 5px''><font size=''2''>" + KotlinHighlighterBundle.message(
|
||||||
|
"text.click.for.navigate",
|
||||||
|
shortCutText
|
||||||
|
) + "</font></div>"
|
||||||
|
|
||||||
val renderer = DeclarationByModuleRenderer()
|
val renderer = DeclarationByModuleRenderer()
|
||||||
val comparator = renderer.comparator
|
val comparator = renderer.comparator
|
||||||
@@ -138,7 +148,7 @@ fun buildNavigateToOverriddenMethodPopup(e: MouseEvent?, element: PsiElement?):
|
|||||||
|
|
||||||
if (DumbService.isDumb(method.project)) {
|
if (DumbService.isDumb(method.project)) {
|
||||||
DumbService.getInstance(method.project)
|
DumbService.getInstance(method.project)
|
||||||
?.showDumbModeNotification("Navigation to overriding classes is not possible during index update")
|
?.showDumbModeNotification(KotlinHighlighterBundle.message("notification.text.navigation.to.overriding.classes.is.not.possible.during.index.update"))
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -151,7 +161,7 @@ fun buildNavigateToOverriddenMethodPopup(e: MouseEvent?, element: PsiElement?):
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"Searching for overriding declarations", true, method.project, e?.component as JComponent?
|
KotlinHighlighterBundle.message("title.searching.for.overriding.declarations"), true, method.project, e?.component as JComponent?
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
return null
|
return null
|
||||||
@@ -167,7 +177,7 @@ fun buildNavigateToOverriddenMethodPopup(e: MouseEvent?, element: PsiElement?):
|
|||||||
return NavigationPopupDescriptor(
|
return NavigationPopupDescriptor(
|
||||||
overridingJavaMethods,
|
overridingJavaMethods,
|
||||||
methodsUpdater.getCaption(overridingJavaMethods.size),
|
methodsUpdater.getCaption(overridingJavaMethods.size),
|
||||||
"Overriding declarations of " + method.name,
|
KotlinHighlighterBundle.message("title.overriding.declarations.of", method.name),
|
||||||
renderer,
|
renderer,
|
||||||
methodsUpdater
|
methodsUpdater
|
||||||
)
|
)
|
||||||
@@ -177,7 +187,7 @@ private class OverridingMethodsUpdater(
|
|||||||
private val myMethod: PsiMethod,
|
private val myMethod: PsiMethod,
|
||||||
private val myRenderer: PsiElementListCellRenderer<out PsiElement>
|
private val myRenderer: PsiElementListCellRenderer<out PsiElement>
|
||||||
) :
|
) :
|
||||||
ListBackgroundUpdaterTask(myMethod.project, "Searching for overriding methods") {
|
ListBackgroundUpdaterTask(myMethod.project, KotlinHighlighterBundle.message("title.searching.for.overriding.methods")) {
|
||||||
override fun getCaption(size: Int): String {
|
override fun getCaption(size: Int): String {
|
||||||
return if (myMethod.hasModifierProperty(PsiModifier.ABSTRACT))
|
return if (myMethod.hasModifierProperty(PsiModifier.ABSTRACT))
|
||||||
DaemonBundle.message("navigation.title.implementation.method", myMethod.name, size)!!
|
DaemonBundle.message("navigation.title.implementation.method", myMethod.name, size)!!
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ import com.intellij.util.AdapterProcessor
|
|||||||
import com.intellij.util.CommonProcessors
|
import com.intellij.util.CommonProcessors
|
||||||
import com.intellij.util.Function
|
import com.intellij.util.Function
|
||||||
import org.jetbrains.kotlin.idea.KotlinBundle
|
import org.jetbrains.kotlin.idea.KotlinBundle
|
||||||
|
import org.jetbrains.kotlin.idea.highlighter.KotlinHighlighterBundle
|
||||||
import org.jetbrains.kotlin.idea.search.declarationsSearch.forEachOverridingMethod
|
import org.jetbrains.kotlin.idea.search.declarationsSearch.forEachOverridingMethod
|
||||||
import org.jetbrains.kotlin.idea.search.declarationsSearch.toPossiblyFakeLightMethods
|
import org.jetbrains.kotlin.idea.search.declarationsSearch.toPossiblyFakeLightMethods
|
||||||
import org.jetbrains.kotlin.idea.search.ideaExtensions.KotlinDefinitionsSearcher
|
import org.jetbrains.kotlin.idea.search.ideaExtensions.KotlinDefinitionsSearcher
|
||||||
@@ -80,7 +81,7 @@ fun buildNavigateToPropertyOverriddenDeclarationsPopup(e: MouseEvent?, element:
|
|||||||
val project = propertyOrParameter.project
|
val project = propertyOrParameter.project
|
||||||
|
|
||||||
if (DumbService.isDumb(project)) {
|
if (DumbService.isDumb(project)) {
|
||||||
DumbService.getInstance(project)?.showDumbModeNotification("Navigation to overriding classes is not possible during index update")
|
DumbService.getInstance(project)?.showDumbModeNotification(KotlinHighlighterBundle.message("notification.text.navigation.to.overriding.classes.is.not.possible.during.index.update"))
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ import org.jetbrains.kotlin.idea.caches.resolve.resolveToDescriptorIfAny
|
|||||||
import org.jetbrains.kotlin.idea.codeInsight.DescriptorToSourceUtilsIde
|
import org.jetbrains.kotlin.idea.codeInsight.DescriptorToSourceUtilsIde
|
||||||
import org.jetbrains.kotlin.idea.codeInsight.KtFunctionPsiElementCellRenderer
|
import org.jetbrains.kotlin.idea.codeInsight.KtFunctionPsiElementCellRenderer
|
||||||
import org.jetbrains.kotlin.idea.core.getDirectlyOverriddenDeclarations
|
import org.jetbrains.kotlin.idea.core.getDirectlyOverriddenDeclarations
|
||||||
|
import org.jetbrains.kotlin.idea.highlighter.KotlinHighlighterBundle
|
||||||
import org.jetbrains.kotlin.idea.search.usagesSearch.propertyDescriptor
|
import org.jetbrains.kotlin.idea.search.usagesSearch.propertyDescriptor
|
||||||
import org.jetbrains.kotlin.psi.KtDeclaration
|
import org.jetbrains.kotlin.psi.KtDeclaration
|
||||||
import org.jetbrains.kotlin.psi.KtParameter
|
import org.jetbrains.kotlin.psi.KtParameter
|
||||||
@@ -55,12 +56,24 @@ object SuperDeclarationMarkerTooltip : Function<PsiElement, String> {
|
|||||||
|
|
||||||
val containingStrings = overriddenDescriptors.map {
|
val containingStrings = overriddenDescriptors.map {
|
||||||
val declaration = it.containingDeclaration
|
val declaration = it.containingDeclaration
|
||||||
val memberKind = if (it is PropertyAccessorDescriptor || it is PropertyDescriptor) "property" else "function"
|
val memberKind = if (it is PropertyAccessorDescriptor || it is PropertyDescriptor)
|
||||||
|
KotlinHighlighterBundle.message("tool.tip.text.property")
|
||||||
|
else
|
||||||
|
KotlinHighlighterBundle.message("tool.tip.text.function")
|
||||||
|
|
||||||
val isBaseAbstract = it.modality == Modality.ABSTRACT
|
val isBaseAbstract = it.modality == Modality.ABSTRACT
|
||||||
"${if (!isAbstract && isBaseAbstract) "Implements" else "Overrides"} $memberKind in '${renderer.render(declaration)}'"
|
KotlinHighlighterBundle.message(
|
||||||
|
"text.in",
|
||||||
|
"${if (!isAbstract && isBaseAbstract)
|
||||||
|
KotlinHighlighterBundle.message("text.implements")
|
||||||
|
else
|
||||||
|
KotlinHighlighterBundle.message("text.overrides")
|
||||||
|
} $memberKind",
|
||||||
|
renderer.render(declaration)
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return containingStrings.sorted().joinToString(separator = "<br/>")
|
return containingStrings.sorted().joinToString(separator = "<br/>")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user