Unify message bundles used in IDEA FIR into KotlinBundle
This commit is contained in:
+73
@@ -2225,3 +2225,76 @@ hints.codevision.overrides.format={0, choice, 1#1 Override|2#{0,number} Override
|
||||
hints.codevision.overrides.to_many.format={0,number}+ Overrides
|
||||
hints.codevision.settings=Settings...
|
||||
inspection.unused.result.of.data.class.copy=Unused result of data class copy
|
||||
|
||||
|
||||
find.declaration.implementing.methods.checkbox=&Implementing functions
|
||||
find.declaration.overriding.methods.checkbox=Over&riding functions
|
||||
find.declaration.implementing.properties.checkbox=&Implementing properties
|
||||
find.declaration.overriding.properties.checkbox=Over&riding properties
|
||||
find.declaration.property.readers.checkbox=Readers
|
||||
find.declaration.property.writers.checkbox=Writers
|
||||
find.declaration.include.overloaded.methods.checkbox=Include o&verloaded functions and extensions
|
||||
find.declaration.functions.usages.checkbox=Usages of &functions
|
||||
find.declaration.properties.usages.checkbox=Usages of &properties
|
||||
find.declaration.constructor.usages.checkbox=Usages of &constructor
|
||||
find.declaration.derived.classes.checkbox=&Derived classes
|
||||
find.declaration.derived.interfaces.checkbox=Derived &interfaces
|
||||
|
||||
find.usages.class=class
|
||||
find.usages.companion.object=companion object
|
||||
find.usages.constructor=constructor
|
||||
find.usages.facade.class=facade class
|
||||
find.usages.for.property={0} for property
|
||||
find.usages.function=function
|
||||
find.usages.getter=getter
|
||||
find.usages.import.alias=import alias
|
||||
find.usages.interface=interface
|
||||
find.usages.label=label
|
||||
find.usages.lambda=lambda
|
||||
find.usages.object=object
|
||||
find.usages.parameter=parameter
|
||||
find.usages.property.accessor=property accessor
|
||||
find.usages.property=property
|
||||
find.usages.setter=setter
|
||||
find.usages.type.alias=type alias
|
||||
find.usages.type.parameter=type parameter
|
||||
find.usages.variable=variable
|
||||
find.usages.checkbox.name.expected.classes=Expected classes
|
||||
find.usages.class.name.anonymous=Anonymous
|
||||
find.usages.checkbox.name.expected.functions=Expected functions
|
||||
find.usages.text.find.usages.for.data.class.components.and.destruction.declarations=<p>Find usages for data class components and destructuring declarations<br/>could be <a href="{0}">disabled once</a> or <a href="{1}">disabled for a project</a>.</p>
|
||||
find.usages.tool.tip.text.disable.search.for.data.class.components.and.destruction.declarations.project.wide.setting=Disable search for data class components and destructuring declarations. (Project wide setting)
|
||||
find.usages.checkbox.text.fast.data.class.component.search=Fast data class component search
|
||||
find.usages.checkbox.name.expected.properties=Expected properties
|
||||
find.usages.action.text.find.usages.of=find usages of
|
||||
|
||||
find.usages.type.named.argument=Named argument
|
||||
find.usages.type.type.alias=Type alias
|
||||
find.usages.type.callable.reference=Callable reference
|
||||
find.usages.type.type.constraint=Type constraint
|
||||
find.usages.type.value.parameter.type=Parameter type
|
||||
find.usages.type.nonLocal.property.type=Class/object property type
|
||||
find.usages.type.function.return.type=Function return types
|
||||
find.usages.type.superType=Supertype
|
||||
find.usages.type.is=Target type of 'is' operation
|
||||
find.usages.type.class.object=Nested class/object
|
||||
find.usages.type.companion.object=Companion object
|
||||
find.usages.type.function.call=Function call
|
||||
find.usages.type.implicit.get=Implicit 'get'
|
||||
find.usages.type.implicit.set=Implicit 'set'
|
||||
find.usages.type.implicit.invoke=Implicit 'invoke'
|
||||
find.usages.type.implicit.iteration=Implicit iteration
|
||||
find.usages.type.property.delegation=Property delegation
|
||||
find.usages.type.extension.receiver.type=Extension receiver type
|
||||
find.usages.type.super.type.qualifier=Super type qualifier
|
||||
find.usages.type.receiver=Receiver
|
||||
find.usages.type.delegate=Delegate
|
||||
find.usages.type.packageDirective=Package directive
|
||||
find.usages.type.packageMemberAccess=Package member access
|
||||
|
||||
and.delete.initializer=\ and delete initializer
|
||||
change.to.val=Change to val
|
||||
change.to.var=Change to var
|
||||
|
||||
remove.redundant.0.modifier=Remove redundant ''{0}'' modifier
|
||||
searching.for.implicit.usages=Searching for implicit usages...
|
||||
-73
@@ -1,73 +0,0 @@
|
||||
find.declaration.implementing.methods.checkbox=&Implementing functions
|
||||
find.declaration.overriding.methods.checkbox=Over&riding functions
|
||||
find.declaration.implementing.properties.checkbox=&Implementing properties
|
||||
find.declaration.overriding.properties.checkbox=Over&riding properties
|
||||
find.declaration.property.readers.checkbox=Readers
|
||||
find.declaration.property.writers.checkbox=Writers
|
||||
find.declaration.include.overloaded.methods.checkbox=Include o&verloaded functions and extensions
|
||||
find.declaration.functions.usages.checkbox=Usages of &functions
|
||||
find.declaration.properties.usages.checkbox=Usages of &properties
|
||||
find.declaration.constructor.usages.checkbox=Usages of &constructor
|
||||
find.declaration.derived.classes.checkbox=&Derived classes
|
||||
find.declaration.derived.interfaces.checkbox=Derived &interfaces
|
||||
|
||||
find.usages.class=class
|
||||
find.usages.companion.object=companion object
|
||||
find.usages.constructor=constructor
|
||||
find.usages.facade.class=facade class
|
||||
find.usages.for.property={0} for property
|
||||
find.usages.function=function
|
||||
find.usages.getter=getter
|
||||
find.usages.import.alias=import alias
|
||||
find.usages.interface=interface
|
||||
find.usages.label=label
|
||||
find.usages.lambda=lambda
|
||||
find.usages.object=object
|
||||
find.usages.parameter=parameter
|
||||
find.usages.property.accessor=property accessor
|
||||
find.usages.property=property
|
||||
find.usages.setter=setter
|
||||
find.usages.type.alias=type alias
|
||||
find.usages.type.parameter=type parameter
|
||||
find.usages.variable=variable
|
||||
find.usages.checkbox.name.expected.classes=Expected classes
|
||||
find.usages.class.name.anonymous=Anonymous
|
||||
find.usages.checkbox.name.expected.functions=Expected functions
|
||||
find.usages.text.find.usages.for.data.class.components.and.destruction.declarations=<p>Find usages for data class components and destructuring declarations<br/>could be <a href="{0}">disabled once</a> or <a href="{1}">disabled for a project</a>.</p>
|
||||
find.usages.tool.tip.text.disable.search.for.data.class.components.and.destruction.declarations.project.wide.setting=Disable search for data class components and destructuring declarations. (Project wide setting)
|
||||
find.usages.checkbox.text.fast.data.class.component.search=Fast data class component search
|
||||
find.usages.checkbox.name.expected.properties=Expected properties
|
||||
find.usages.action.text.find.usages.of=find usages of
|
||||
|
||||
find.usages.type.named.argument=Named argument
|
||||
find.usages.type.type.alias=Type alias
|
||||
find.usages.type.callable.reference=Callable reference
|
||||
find.usages.type.type.constraint=Type constraint
|
||||
find.usages.type.value.parameter.type=Parameter type
|
||||
find.usages.type.nonLocal.property.type=Class/object property type
|
||||
find.usages.type.function.return.type=Function return types
|
||||
find.usages.type.superType=Supertype
|
||||
find.usages.type.is=Target type of 'is' operation
|
||||
find.usages.type.class.object=Nested class/object
|
||||
find.usages.type.companion.object=Companion object
|
||||
find.usages.type.function.call=Function call
|
||||
find.usages.type.implicit.get=Implicit 'get'
|
||||
find.usages.type.implicit.set=Implicit 'set'
|
||||
find.usages.type.implicit.invoke=Implicit 'invoke'
|
||||
find.usages.type.implicit.iteration=Implicit iteration
|
||||
find.usages.type.property.delegation=Property delegation
|
||||
find.usages.type.extension.receiver.type=Extension receiver type
|
||||
find.usages.type.super.type.qualifier=Super type qualifier
|
||||
find.usages.type.receiver=Receiver
|
||||
find.usages.type.delegate=Delegate
|
||||
find.usages.type.packageDirective=Package directive
|
||||
find.usages.type.packageMemberAccess=Package member access
|
||||
|
||||
and.delete.initializer=\ and delete initializer
|
||||
change.to.val=Change to val
|
||||
change.to.var=Change to var
|
||||
|
||||
remove.redundant.0.modifier=Remove redundant ''{0}'' modifier
|
||||
make.0.not.1=Make {0} not {1}
|
||||
remove.0.modifier=Remove ''{0}'' modifier
|
||||
remove.modifier=Remove modifier
|
||||
-1
@@ -1 +0,0 @@
|
||||
searching.for.implicit.usages=Searching for implicit usages...
|
||||
-12
@@ -1,12 +0,0 @@
|
||||
/*
|
||||
* 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
|
||||
|
||||
import com.intellij.DynamicBundle
|
||||
|
||||
abstract class AbstractKotlinBundleIndependent protected constructor(pathToBundle: String) : DynamicBundle(pathToBundle) {
|
||||
protected fun String.withHtml(): String = "<html>$this</html>"
|
||||
}
|
||||
-24
@@ -1,24 +0,0 @@
|
||||
/*
|
||||
* 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
|
||||
|
||||
import org.jetbrains.annotations.NonNls
|
||||
import org.jetbrains.annotations.PropertyKey
|
||||
|
||||
@NonNls
|
||||
private const val BUNDLE = "messages.KotlinBundleIndependent"
|
||||
|
||||
//TODO Copy-pasted from KotlinBundle.kt
|
||||
object KotlinBundleIndependent : AbstractKotlinBundleIndependent(BUNDLE) {
|
||||
@JvmStatic
|
||||
fun message(@NonNls @PropertyKey(resourceBundle = BUNDLE) key: String, vararg params: Any): String = getMessage(key, *params)
|
||||
|
||||
@JvmStatic
|
||||
fun htmlMessage(@NonNls @PropertyKey(resourceBundle = BUNDLE) key: String, vararg params: Any): String =
|
||||
getMessage(key, *params).withHtml()
|
||||
|
||||
@JvmStatic
|
||||
fun lazyMessage(@PropertyKey(resourceBundle = BUNDLE) key: String, vararg params: Any): () -> String = { getMessage(key, *params) }
|
||||
}
|
||||
-23
@@ -1,23 +0,0 @@
|
||||
/*
|
||||
* 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
|
||||
|
||||
import org.jetbrains.annotations.NonNls
|
||||
import org.jetbrains.annotations.PropertyKey
|
||||
|
||||
@NonNls
|
||||
private const val BUNDLE = "messages.KotlinIdeaAnalysisBundleIndependent"
|
||||
|
||||
object KotlinIdeaAnalysisBundleIndependent : AbstractKotlinBundleIndependent(BUNDLE) {
|
||||
@JvmStatic
|
||||
fun message(@NonNls @PropertyKey(resourceBundle = BUNDLE) key: String, vararg params: Any): String = getMessage(key, *params)
|
||||
|
||||
@JvmStatic
|
||||
fun htmlMessage(@NonNls @PropertyKey(resourceBundle = BUNDLE) key: String, vararg params: Any): String =
|
||||
getMessage(key, *params).withHtml()
|
||||
|
||||
@JvmStatic
|
||||
fun lazyMessage(@PropertyKey(resourceBundle = BUNDLE) key: String, vararg params: Any): () -> String = { getMessage(key, *params) }
|
||||
}
|
||||
+22
-22
@@ -29,7 +29,7 @@ import com.intellij.usageView.UsageViewShortNameLocation
|
||||
import com.intellij.usageView.UsageViewTypeLocation
|
||||
import org.jetbrains.kotlin.asJava.classes.KtLightClassForFacade
|
||||
import org.jetbrains.kotlin.asJava.unwrapped
|
||||
import org.jetbrains.kotlin.idea.KotlinBundleIndependent
|
||||
import org.jetbrains.kotlin.idea.KotlinBundle
|
||||
import org.jetbrains.kotlin.idea.KotlinLanguage
|
||||
import org.jetbrains.kotlin.name.FqNameUnsafe
|
||||
import org.jetbrains.kotlin.name.Name
|
||||
@@ -138,39 +138,39 @@ open class KotlinElementDescriptionProviderBase : ElementDescriptionProvider {
|
||||
|
||||
fun elementKind() = when (targetElement) {
|
||||
is KtClass -> if (targetElement.isInterface())
|
||||
KotlinBundleIndependent.message("find.usages.interface")
|
||||
KotlinBundle.message("find.usages.interface")
|
||||
else
|
||||
KotlinBundleIndependent.message("find.usages.class")
|
||||
KotlinBundle.message("find.usages.class")
|
||||
is KtObjectDeclaration -> if (targetElement.isCompanion())
|
||||
KotlinBundleIndependent.message("find.usages.companion.object")
|
||||
KotlinBundle.message("find.usages.companion.object")
|
||||
else
|
||||
KotlinBundleIndependent.message("find.usages.object")
|
||||
is KtNamedFunction -> KotlinBundleIndependent.message("find.usages.function")
|
||||
is KtPropertyAccessor -> KotlinBundleIndependent.message(
|
||||
KotlinBundle.message("find.usages.object")
|
||||
is KtNamedFunction -> KotlinBundle.message("find.usages.function")
|
||||
is KtPropertyAccessor -> KotlinBundle.message(
|
||||
"find.usages.for.property",
|
||||
(if (targetElement.isGetter)
|
||||
KotlinBundleIndependent.message("find.usages.getter")
|
||||
KotlinBundle.message("find.usages.getter")
|
||||
else
|
||||
KotlinBundleIndependent.message("find.usages.setter"))
|
||||
KotlinBundle.message("find.usages.setter"))
|
||||
) + " "
|
||||
is KtFunctionLiteral -> KotlinBundleIndependent.message("find.usages.lambda")
|
||||
is KtPrimaryConstructor, is KtSecondaryConstructor -> KotlinBundleIndependent.message("find.usages.constructor")
|
||||
is KtFunctionLiteral -> KotlinBundle.message("find.usages.lambda")
|
||||
is KtPrimaryConstructor, is KtSecondaryConstructor -> KotlinBundle.message("find.usages.constructor")
|
||||
is KtProperty -> if (targetElement.isLocal)
|
||||
KotlinBundleIndependent.message("find.usages.variable")
|
||||
KotlinBundle.message("find.usages.variable")
|
||||
else
|
||||
KotlinBundleIndependent.message("find.usages.property")
|
||||
is KtTypeParameter -> KotlinBundleIndependent.message("find.usages.type.parameter")
|
||||
is KtParameter -> KotlinBundleIndependent.message("find.usages.parameter")
|
||||
is KtDestructuringDeclarationEntry -> KotlinBundleIndependent.message("find.usages.variable")
|
||||
is KtTypeAlias -> KotlinBundleIndependent.message("find.usages.type.alias")
|
||||
is KtLabeledExpression -> KotlinBundleIndependent.message("find.usages.label")
|
||||
is KtImportAlias -> KotlinBundleIndependent.message("find.usages.import.alias")
|
||||
is KtLightClassForFacade -> KotlinBundleIndependent.message("find.usages.facade.class")
|
||||
KotlinBundle.message("find.usages.property")
|
||||
is KtTypeParameter -> KotlinBundle.message("find.usages.type.parameter")
|
||||
is KtParameter -> KotlinBundle.message("find.usages.parameter")
|
||||
is KtDestructuringDeclarationEntry -> KotlinBundle.message("find.usages.variable")
|
||||
is KtTypeAlias -> KotlinBundle.message("find.usages.type.alias")
|
||||
is KtLabeledExpression -> KotlinBundle.message("find.usages.label")
|
||||
is KtImportAlias -> KotlinBundle.message("find.usages.import.alias")
|
||||
is KtLightClassForFacade -> KotlinBundle.message("find.usages.facade.class")
|
||||
else -> {
|
||||
//TODO Implement in FIR
|
||||
when {
|
||||
targetElement.isRenameJavaSyntheticPropertyHandler -> KotlinBundleIndependent.message("find.usages.property")
|
||||
targetElement.isRenameKotlinPropertyProcessor -> KotlinBundleIndependent.message("find.usages.property.accessor")
|
||||
targetElement.isRenameJavaSyntheticPropertyHandler -> KotlinBundle.message("find.usages.property")
|
||||
targetElement.isRenameKotlinPropertyProcessor -> KotlinBundle.message("find.usages.property.accessor")
|
||||
else -> null
|
||||
}
|
||||
}
|
||||
|
||||
+3
-3
@@ -29,7 +29,7 @@ import com.intellij.psi.PsiElement
|
||||
import com.intellij.psi.search.searches.OverridingMethodsSearch
|
||||
import org.jetbrains.kotlin.asJava.toLightMethods
|
||||
import org.jetbrains.kotlin.asJava.unwrapped
|
||||
import org.jetbrains.kotlin.idea.KotlinBundleIndependent
|
||||
import org.jetbrains.kotlin.idea.KotlinBundle
|
||||
import org.jetbrains.kotlin.idea.findUsages.KotlinFindUsagesSupport.Companion.checkSuperMethods
|
||||
import org.jetbrains.kotlin.idea.search.KotlinSearchUsagesSupport.Companion.isOverridable
|
||||
import org.jetbrains.kotlin.idea.findUsages.handlers.DelegatingFindMemberUsagesHandler
|
||||
@@ -85,7 +85,7 @@ class KotlinFindUsagesHandlerFactory(project: Project) : FindUsagesHandlerFactor
|
||||
val declarationsToSearch = checkSuperMethods(
|
||||
element,
|
||||
null,
|
||||
KotlinBundleIndependent.message("find.usages.action.text.find.usages.of")
|
||||
KotlinBundle.message("find.usages.action.text.find.usages.of")
|
||||
)
|
||||
|
||||
return handlerForMultiple(element, declarationsToSearch)
|
||||
@@ -122,7 +122,7 @@ class KotlinFindUsagesHandlerFactory(project: Project) : FindUsagesHandlerFactor
|
||||
val declarationsToSearch = checkSuperMethods(
|
||||
declaration,
|
||||
null,
|
||||
KotlinBundleIndependent.message("find.usages.action.text.find.usages.of")
|
||||
KotlinBundle.message("find.usages.action.text.find.usages.of")
|
||||
)
|
||||
|
||||
return handlerForMultiple(declaration, declarationsToSearch)
|
||||
|
||||
+10
-10
@@ -10,7 +10,7 @@ import com.intellij.lang.findUsages.FindUsagesProvider
|
||||
import com.intellij.lang.java.JavaFindUsagesProvider
|
||||
import com.intellij.psi.*
|
||||
import org.jetbrains.kotlin.asJava.elements.KtLightElement
|
||||
import org.jetbrains.kotlin.idea.KotlinBundleIndependent
|
||||
import org.jetbrains.kotlin.idea.KotlinBundle
|
||||
import org.jetbrains.kotlin.psi.*
|
||||
import org.jetbrains.kotlin.psi.psiUtil.containingClassOrObject
|
||||
import org.jetbrains.kotlin.psi.psiUtil.isPropertyParameter
|
||||
@@ -27,17 +27,17 @@ open class KotlinFindUsagesProviderBase : FindUsagesProvider {
|
||||
|
||||
override fun getType(element: PsiElement): String {
|
||||
return when (element) {
|
||||
is KtNamedFunction -> KotlinBundleIndependent.message("find.usages.function")
|
||||
is KtClass -> KotlinBundleIndependent.message("find.usages.class")
|
||||
is KtParameter -> KotlinBundleIndependent.message("find.usages.parameter")
|
||||
is KtNamedFunction -> KotlinBundle.message("find.usages.function")
|
||||
is KtClass -> KotlinBundle.message("find.usages.class")
|
||||
is KtParameter -> KotlinBundle.message("find.usages.parameter")
|
||||
is KtProperty -> if (element.isLocal)
|
||||
KotlinBundleIndependent.message("find.usages.variable")
|
||||
KotlinBundle.message("find.usages.variable")
|
||||
else
|
||||
KotlinBundleIndependent.message("find.usages.property")
|
||||
is KtDestructuringDeclarationEntry -> KotlinBundleIndependent.message("find.usages.variable")
|
||||
is KtTypeParameter -> KotlinBundleIndependent.message("find.usages.type.parameter")
|
||||
is KtSecondaryConstructor -> KotlinBundleIndependent.message("find.usages.constructor")
|
||||
is KtObjectDeclaration -> KotlinBundleIndependent.message("find.usages.object")
|
||||
KotlinBundle.message("find.usages.property")
|
||||
is KtDestructuringDeclarationEntry -> KotlinBundle.message("find.usages.variable")
|
||||
is KtTypeParameter -> KotlinBundle.message("find.usages.type.parameter")
|
||||
is KtSecondaryConstructor -> KotlinBundle.message("find.usages.constructor")
|
||||
is KtObjectDeclaration -> KotlinBundle.message("find.usages.object")
|
||||
else -> ""
|
||||
}
|
||||
}
|
||||
|
||||
+24
-24
@@ -6,7 +6,7 @@
|
||||
package org.jetbrains.kotlin.idea.findUsages
|
||||
|
||||
import com.intellij.usages.impl.rules.UsageType
|
||||
import org.jetbrains.kotlin.idea.KotlinBundleIndependent
|
||||
import org.jetbrains.kotlin.idea.KotlinBundle
|
||||
|
||||
object KotlinUsageTypes {
|
||||
|
||||
@@ -52,35 +52,35 @@ object KotlinUsageTypes {
|
||||
}
|
||||
|
||||
// types
|
||||
val TYPE_CONSTRAINT = UsageType(KotlinBundleIndependent.lazyMessage("find.usages.type.type.constraint"))
|
||||
val VALUE_PARAMETER_TYPE = UsageType(KotlinBundleIndependent.lazyMessage("find.usages.type.value.parameter.type"))
|
||||
val NON_LOCAL_PROPERTY_TYPE = UsageType(KotlinBundleIndependent.lazyMessage("find.usages.type.nonLocal.property.type"))
|
||||
val FUNCTION_RETURN_TYPE = UsageType(KotlinBundleIndependent.lazyMessage("find.usages.type.function.return.type"))
|
||||
val SUPER_TYPE = UsageType(KotlinBundleIndependent.lazyMessage("find.usages.type.superType"))
|
||||
val IS = UsageType(KotlinBundleIndependent.lazyMessage("find.usages.type.is"))
|
||||
val CLASS_OBJECT_ACCESS = UsageType(KotlinBundleIndependent.lazyMessage("find.usages.type.class.object"))
|
||||
val COMPANION_OBJECT_ACCESS = UsageType(KotlinBundleIndependent.lazyMessage("find.usages.type.companion.object"))
|
||||
val EXTENSION_RECEIVER_TYPE = UsageType(KotlinBundleIndependent.lazyMessage("find.usages.type.extension.receiver.type"))
|
||||
val SUPER_TYPE_QUALIFIER = UsageType(KotlinBundleIndependent.lazyMessage("find.usages.type.super.type.qualifier"))
|
||||
val TYPE_ALIAS = UsageType(KotlinBundleIndependent.lazyMessage("find.usages.type.type.alias"))
|
||||
val TYPE_CONSTRAINT = UsageType(KotlinBundle.lazyMessage("find.usages.type.type.constraint"))
|
||||
val VALUE_PARAMETER_TYPE = UsageType(KotlinBundle.lazyMessage("find.usages.type.value.parameter.type"))
|
||||
val NON_LOCAL_PROPERTY_TYPE = UsageType(KotlinBundle.lazyMessage("find.usages.type.nonLocal.property.type"))
|
||||
val FUNCTION_RETURN_TYPE = UsageType(KotlinBundle.lazyMessage("find.usages.type.function.return.type"))
|
||||
val SUPER_TYPE = UsageType(KotlinBundle.lazyMessage("find.usages.type.superType"))
|
||||
val IS = UsageType(KotlinBundle.lazyMessage("find.usages.type.is"))
|
||||
val CLASS_OBJECT_ACCESS = UsageType(KotlinBundle.lazyMessage("find.usages.type.class.object"))
|
||||
val COMPANION_OBJECT_ACCESS = UsageType(KotlinBundle.lazyMessage("find.usages.type.companion.object"))
|
||||
val EXTENSION_RECEIVER_TYPE = UsageType(KotlinBundle.lazyMessage("find.usages.type.extension.receiver.type"))
|
||||
val SUPER_TYPE_QUALIFIER = UsageType(KotlinBundle.lazyMessage("find.usages.type.super.type.qualifier"))
|
||||
val TYPE_ALIAS = UsageType(KotlinBundle.lazyMessage("find.usages.type.type.alias"))
|
||||
|
||||
// functions
|
||||
val FUNCTION_CALL = UsageType(KotlinBundleIndependent.lazyMessage("find.usages.type.function.call"))
|
||||
val IMPLICIT_GET = UsageType(KotlinBundleIndependent.lazyMessage("find.usages.type.implicit.get"))
|
||||
val IMPLICIT_SET = UsageType(KotlinBundleIndependent.lazyMessage("find.usages.type.implicit.set"))
|
||||
val IMPLICIT_INVOKE = UsageType(KotlinBundleIndependent.lazyMessage("find.usages.type.implicit.invoke"))
|
||||
val IMPLICIT_ITERATION = UsageType(KotlinBundleIndependent.lazyMessage("find.usages.type.implicit.iteration"))
|
||||
val PROPERTY_DELEGATION = UsageType(KotlinBundleIndependent.lazyMessage("find.usages.type.property.delegation"))
|
||||
val FUNCTION_CALL = UsageType(KotlinBundle.lazyMessage("find.usages.type.function.call"))
|
||||
val IMPLICIT_GET = UsageType(KotlinBundle.lazyMessage("find.usages.type.implicit.get"))
|
||||
val IMPLICIT_SET = UsageType(KotlinBundle.lazyMessage("find.usages.type.implicit.set"))
|
||||
val IMPLICIT_INVOKE = UsageType(KotlinBundle.lazyMessage("find.usages.type.implicit.invoke"))
|
||||
val IMPLICIT_ITERATION = UsageType(KotlinBundle.lazyMessage("find.usages.type.implicit.iteration"))
|
||||
val PROPERTY_DELEGATION = UsageType(KotlinBundle.lazyMessage("find.usages.type.property.delegation"))
|
||||
|
||||
// values
|
||||
val RECEIVER = UsageType(KotlinBundleIndependent.lazyMessage("find.usages.type.receiver"))
|
||||
val DELEGATE = UsageType(KotlinBundleIndependent.lazyMessage("find.usages.type.delegate"))
|
||||
val RECEIVER = UsageType(KotlinBundle.lazyMessage("find.usages.type.receiver"))
|
||||
val DELEGATE = UsageType(KotlinBundle.lazyMessage("find.usages.type.delegate"))
|
||||
|
||||
// packages
|
||||
val PACKAGE_DIRECTIVE = UsageType(KotlinBundleIndependent.lazyMessage("find.usages.type.packageDirective"))
|
||||
val PACKAGE_MEMBER_ACCESS = UsageType(KotlinBundleIndependent.lazyMessage("find.usages.type.packageMemberAccess"))
|
||||
val PACKAGE_DIRECTIVE = UsageType(KotlinBundle.lazyMessage("find.usages.type.packageDirective"))
|
||||
val PACKAGE_MEMBER_ACCESS = UsageType(KotlinBundle.lazyMessage("find.usages.type.packageMemberAccess"))
|
||||
|
||||
// common usage types
|
||||
val CALLABLE_REFERENCE = UsageType(KotlinBundleIndependent.lazyMessage("find.usages.type.callable.reference"))
|
||||
val NAMED_ARGUMENT = UsageType(KotlinBundleIndependent.lazyMessage("find.usages.type.named.argument"))
|
||||
val CALLABLE_REFERENCE = UsageType(KotlinBundle.lazyMessage("find.usages.type.callable.reference"))
|
||||
val NAMED_ARGUMENT = UsageType(KotlinBundle.lazyMessage("find.usages.type.named.argument"))
|
||||
}
|
||||
|
||||
+8
-8
@@ -32,7 +32,7 @@ import com.intellij.ui.StateRestoringCheckBox;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.jetbrains.kotlin.asJava.LightClassUtilsKt;
|
||||
import org.jetbrains.kotlin.idea.KotlinBundleIndependent;
|
||||
import org.jetbrains.kotlin.idea.KotlinBundle;
|
||||
import org.jetbrains.kotlin.idea.findUsages.KotlinClassFindUsagesOptions;
|
||||
import org.jetbrains.kotlin.idea.search.KotlinSearchUsagesSupport;
|
||||
import org.jetbrains.kotlin.psi.KtClass;
|
||||
@@ -73,7 +73,7 @@ public class KotlinFindClassUsagesDialog extends FindClassUsagesDialog {
|
||||
|
||||
String name = classOrObject.getName();
|
||||
if (name == null || name.isEmpty()) {
|
||||
name = KotlinBundleIndependent.message("find.usages.class.name.anonymous");
|
||||
name = KotlinBundle.message("find.usages.class.name.anonymous");
|
||||
}
|
||||
|
||||
PsiClass javaClass;
|
||||
@@ -108,31 +108,31 @@ public class KotlinFindClassUsagesDialog extends FindClassUsagesDialog {
|
||||
Utils.renameCheckbox(
|
||||
findWhatPanel,
|
||||
FindBundle.message("find.what.methods.usages.checkbox"),
|
||||
KotlinBundleIndependent.message("find.declaration.functions.usages.checkbox")
|
||||
KotlinBundle.message("find.declaration.functions.usages.checkbox")
|
||||
);
|
||||
Utils.renameCheckbox(
|
||||
findWhatPanel,
|
||||
FindBundle.message("find.what.fields.usages.checkbox"),
|
||||
KotlinBundleIndependent.message("find.declaration.properties.usages.checkbox")
|
||||
KotlinBundle.message("find.declaration.properties.usages.checkbox")
|
||||
);
|
||||
Utils.removeCheckbox(findWhatPanel, FindBundle.message("find.what.implementing.classes.checkbox"));
|
||||
Utils.removeCheckbox(findWhatPanel, FindBundle.message("find.what.derived.interfaces.checkbox"));
|
||||
Utils.removeCheckbox(findWhatPanel, FindBundle.message("find.what.derived.classes.checkbox"));
|
||||
|
||||
derivedClasses = addCheckboxToPanel(
|
||||
KotlinBundleIndependent.message("find.declaration.derived.classes.checkbox"),
|
||||
KotlinBundle.message("find.declaration.derived.classes.checkbox"),
|
||||
getFindUsagesOptions().isDerivedClasses,
|
||||
findWhatPanel,
|
||||
true
|
||||
);
|
||||
derivedTraits = addCheckboxToPanel(
|
||||
KotlinBundleIndependent.message("find.declaration.derived.interfaces.checkbox"),
|
||||
KotlinBundle.message("find.declaration.derived.interfaces.checkbox"),
|
||||
getFindUsagesOptions().isDerivedInterfaces,
|
||||
findWhatPanel,
|
||||
true
|
||||
);
|
||||
constructorUsages = addCheckboxToPanel(
|
||||
KotlinBundleIndependent.message("find.declaration.constructor.usages.checkbox"),
|
||||
KotlinBundle.message("find.declaration.constructor.usages.checkbox"),
|
||||
getFindUsagesOptions().getSearchConstructorUsages(),
|
||||
findWhatPanel,
|
||||
true
|
||||
@@ -164,7 +164,7 @@ public class KotlinFindClassUsagesDialog extends FindClassUsagesDialog {
|
||||
KotlinClassFindUsagesOptions options = getFindUsagesOptions();
|
||||
if (isActual) {
|
||||
expectedUsages = addCheckboxToPanel(
|
||||
KotlinBundleIndependent.message("find.usages.checkbox.name.expected.classes"),
|
||||
KotlinBundle.message("find.usages.checkbox.name.expected.classes"),
|
||||
options.getSearchExpected(),
|
||||
optionsPanel,
|
||||
false
|
||||
|
||||
+6
-6
@@ -29,7 +29,7 @@ import com.intellij.ui.StateRestoringCheckBox;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.kotlin.asJava.LightClassUtilsKt;
|
||||
import org.jetbrains.kotlin.asJava.elements.KtLightMethod;
|
||||
import org.jetbrains.kotlin.idea.KotlinBundleIndependent;
|
||||
import org.jetbrains.kotlin.idea.KotlinBundle;
|
||||
import org.jetbrains.kotlin.idea.findUsages.KotlinFunctionFindUsagesOptions;
|
||||
import org.jetbrains.kotlin.idea.search.KotlinSearchUsagesSupport;
|
||||
import org.jetbrains.kotlin.psi.KtDeclaration;
|
||||
@@ -72,12 +72,12 @@ public class KotlinFindFunctionUsagesDialog extends FindMethodUsagesDialog {
|
||||
Utils.renameCheckbox(
|
||||
findWhatPanel,
|
||||
FindBundle.message("find.what.implementing.methods.checkbox"),
|
||||
KotlinBundleIndependent.message("find.declaration.implementing.methods.checkbox")
|
||||
KotlinBundle.message("find.declaration.implementing.methods.checkbox")
|
||||
);
|
||||
Utils.renameCheckbox(
|
||||
findWhatPanel,
|
||||
FindBundle.message("find.what.overriding.methods.checkbox"),
|
||||
KotlinBundleIndependent.message("find.declaration.overriding.methods.checkbox")
|
||||
KotlinBundle.message("find.declaration.overriding.methods.checkbox")
|
||||
);
|
||||
}
|
||||
|
||||
@@ -91,10 +91,10 @@ public class KotlinFindFunctionUsagesDialog extends FindMethodUsagesDialog {
|
||||
if (!Utils.renameCheckbox(
|
||||
optionsPanel,
|
||||
FindBundle.message("find.options.include.overloaded.methods.checkbox"),
|
||||
KotlinBundleIndependent.message("find.declaration.include.overloaded.methods.checkbox")
|
||||
KotlinBundle.message("find.declaration.include.overloaded.methods.checkbox")
|
||||
)) {
|
||||
addCheckboxToPanel(
|
||||
KotlinBundleIndependent.message("find.declaration.include.overloaded.methods.checkbox"),
|
||||
KotlinBundle.message("find.declaration.include.overloaded.methods.checkbox"),
|
||||
FindSettings.getInstance().isSearchOverloadedMethods(),
|
||||
optionsPanel,
|
||||
false
|
||||
@@ -110,7 +110,7 @@ public class KotlinFindFunctionUsagesDialog extends FindMethodUsagesDialog {
|
||||
KotlinFunctionFindUsagesOptions options = getFindUsagesOptions();
|
||||
if (isActual) {
|
||||
expectedUsages = addCheckboxToPanel(
|
||||
KotlinBundleIndependent.message("find.usages.checkbox.name.expected.functions"),
|
||||
KotlinBundle.message("find.usages.checkbox.name.expected.functions"),
|
||||
options.getSearchExpected(),
|
||||
optionsPanel,
|
||||
false
|
||||
|
||||
+8
-8
@@ -27,7 +27,7 @@ import com.intellij.ui.IdeBorderFactory;
|
||||
import com.intellij.ui.SimpleColoredComponent;
|
||||
import com.intellij.ui.StateRestoringCheckBox;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.kotlin.idea.KotlinBundleIndependent;
|
||||
import org.jetbrains.kotlin.idea.KotlinBundle;
|
||||
import org.jetbrains.kotlin.idea.findUsages.KotlinPropertyFindUsagesOptions;
|
||||
import org.jetbrains.kotlin.lexer.KtTokens;
|
||||
import org.jetbrains.kotlin.psi.*;
|
||||
@@ -85,13 +85,13 @@ public class KotlinFindPropertyUsagesDialog extends JavaFindUsagesDialog<KotlinP
|
||||
KotlinPropertyFindUsagesOptions options = getFindUsagesOptions();
|
||||
|
||||
readAccesses = addCheckboxToPanel(
|
||||
KotlinBundleIndependent.message("find.declaration.property.readers.checkbox"),
|
||||
KotlinBundle.message("find.declaration.property.readers.checkbox"),
|
||||
options.isReadAccess,
|
||||
findWhatPanel,
|
||||
true
|
||||
);
|
||||
writeAccesses = addCheckboxToPanel(
|
||||
KotlinBundleIndependent.message("find.declaration.property.writers.checkbox"),
|
||||
KotlinBundle.message("find.declaration.property.writers.checkbox"),
|
||||
options.isWriteAccess,
|
||||
findWhatPanel,
|
||||
true
|
||||
@@ -116,8 +116,8 @@ public class KotlinFindPropertyUsagesDialog extends JavaFindUsagesDialog<KotlinP
|
||||
if (isOpen || isAbstract) {
|
||||
overrideUsages = addCheckboxToPanel(
|
||||
isAbstract
|
||||
? KotlinBundleIndependent.message("find.declaration.implementing.properties.checkbox")
|
||||
: KotlinBundleIndependent.message("find.declaration.overriding.properties.checkbox"),
|
||||
? KotlinBundle.message("find.declaration.implementing.properties.checkbox")
|
||||
: KotlinBundle.message("find.declaration.overriding.properties.checkbox"),
|
||||
FindSettings.getInstance().isSearchOverloadedMethods(),
|
||||
optionsPanel,
|
||||
false
|
||||
@@ -127,7 +127,7 @@ public class KotlinFindPropertyUsagesDialog extends JavaFindUsagesDialog<KotlinP
|
||||
KotlinPropertyFindUsagesOptions options = getFindUsagesOptions();
|
||||
if (isActual) {
|
||||
expectedUsages = addCheckboxToPanel(
|
||||
KotlinBundleIndependent.message("find.usages.checkbox.name.expected.properties"),
|
||||
KotlinBundle.message("find.usages.checkbox.name.expected.properties"),
|
||||
options.getSearchExpected(),
|
||||
optionsPanel,
|
||||
false
|
||||
@@ -136,8 +136,8 @@ public class KotlinFindPropertyUsagesDialog extends JavaFindUsagesDialog<KotlinP
|
||||
|
||||
if (isDataClassConstructorProperty(property)) {
|
||||
JCheckBox dataClassComponentCheckBox =
|
||||
new JCheckBox(KotlinBundleIndependent.message("find.usages.checkbox.text.fast.data.class.component.search"));
|
||||
dataClassComponentCheckBox.setToolTipText(KotlinBundleIndependent.message(
|
||||
new JCheckBox(KotlinBundle.message("find.usages.checkbox.text.fast.data.class.component.search"));
|
||||
dataClassComponentCheckBox.setToolTipText(KotlinBundle.message(
|
||||
"find.usages.tool.tip.text.disable.search.for.data.class.components.and.destruction.declarations.project.wide.setting"));
|
||||
Project project = property.getProject();
|
||||
dataClassComponentCheckBox.setSelected(getDisableComponentAndDestructionSearch(project));
|
||||
|
||||
+2
-2
@@ -31,7 +31,7 @@ import com.intellij.usageView.UsageInfo
|
||||
import com.intellij.util.*
|
||||
import org.jetbrains.annotations.TestOnly
|
||||
import org.jetbrains.kotlin.asJava.toLightMethods
|
||||
import org.jetbrains.kotlin.idea.KotlinBundleIndependent
|
||||
import org.jetbrains.kotlin.idea.KotlinBundle
|
||||
import org.jetbrains.kotlin.idea.findUsages.*
|
||||
import org.jetbrains.kotlin.idea.findUsages.KotlinFindUsagesSupport.Companion.getTopMostOverriddenElementsToHighlight
|
||||
import org.jetbrains.kotlin.idea.findUsages.KotlinFindUsagesSupport.Companion.isDataClassComponentFunction
|
||||
@@ -299,7 +299,7 @@ abstract class KotlinFindMemberUsagesHandler<T : KtNamedDeclaration> protected c
|
||||
|
||||
private const val DISABLE_ONCE = "DISABLE_ONCE"
|
||||
private const val DISABLE = "DISABLE"
|
||||
private val DISABLE_COMPONENT_AND_DESTRUCTION_SEARCH_TEXT = KotlinBundleIndependent.message(
|
||||
private val DISABLE_COMPONENT_AND_DESTRUCTION_SEARCH_TEXT = KotlinBundle.message(
|
||||
"find.usages.text.find.usages.for.data.class.components.and.destruction.declarations",
|
||||
DISABLE_ONCE,
|
||||
DISABLE
|
||||
|
||||
+3
-3
@@ -8,7 +8,7 @@ package org.jetbrains.kotlin.idea.quickfix
|
||||
import com.intellij.openapi.editor.Editor
|
||||
import com.intellij.openapi.project.Project
|
||||
import com.intellij.psi.PsiElement
|
||||
import org.jetbrains.kotlin.idea.KotlinBundleIndependent
|
||||
import org.jetbrains.kotlin.idea.KotlinBundle
|
||||
import org.jetbrains.kotlin.lexer.KtTokens
|
||||
import org.jetbrains.kotlin.psi.*
|
||||
import org.jetbrains.kotlin.psi.psiUtil.getStrictParentOfType
|
||||
@@ -21,8 +21,8 @@ class ChangeVariableMutabilityFix(
|
||||
) : KotlinPsiOnlyQuickFixAction<KtValVarKeywordOwner>(element) {
|
||||
|
||||
override fun getText() = actionText
|
||||
?: (if (makeVar) KotlinBundleIndependent.message("change.to.var") else KotlinBundleIndependent.message("change.to.val")) +
|
||||
if (deleteInitializer) KotlinBundleIndependent.message("and.delete.initializer") else ""
|
||||
?: (if (makeVar) KotlinBundle.message("change.to.var") else KotlinBundle.message("change.to.val")) +
|
||||
if (deleteInitializer) KotlinBundle.message("and.delete.initializer") else ""
|
||||
|
||||
override fun getFamilyName(): String = text
|
||||
|
||||
|
||||
+5
-5
@@ -11,7 +11,7 @@ import com.intellij.psi.PsiElement
|
||||
import com.intellij.psi.PsiFile
|
||||
import com.intellij.psi.PsiNameIdentifierOwner
|
||||
import com.intellij.psi.util.PsiTreeUtil
|
||||
import org.jetbrains.kotlin.idea.KotlinBundleIndependent
|
||||
import org.jetbrains.kotlin.idea.KotlinBundle
|
||||
import org.jetbrains.kotlin.lexer.KtModifierKeywordToken
|
||||
import org.jetbrains.kotlin.lexer.KtTokens
|
||||
import org.jetbrains.kotlin.psi.*
|
||||
@@ -28,15 +28,15 @@ class RemoveModifierFix(
|
||||
val modifierText = modifier.value
|
||||
when {
|
||||
isRedundant ->
|
||||
KotlinBundleIndependent.message("remove.redundant.0.modifier", modifierText)
|
||||
KotlinBundle.message("remove.redundant.0.modifier", modifierText)
|
||||
modifier === KtTokens.ABSTRACT_KEYWORD || modifier === KtTokens.OPEN_KEYWORD ->
|
||||
KotlinBundleIndependent.message("make.0.not.1", getElementName(element), modifierText)
|
||||
KotlinBundle.message("make.0.not.1", getElementName(element), modifierText)
|
||||
else ->
|
||||
KotlinBundleIndependent.message("remove.0.modifier", modifierText, modifier)
|
||||
KotlinBundle.message("remove.0.modifier", modifierText, modifier)
|
||||
}
|
||||
}
|
||||
|
||||
override fun getFamilyName() = KotlinBundleIndependent.message("remove.modifier")
|
||||
override fun getFamilyName() = KotlinBundle.message("remove.modifier")
|
||||
|
||||
override fun getText() = text
|
||||
|
||||
|
||||
+2
-2
@@ -12,8 +12,8 @@ import com.intellij.psi.search.*
|
||||
import com.intellij.util.Processor
|
||||
import org.jetbrains.kotlin.asJava.elements.KtLightMethod
|
||||
import org.jetbrains.kotlin.asJava.namedUnwrappedElement
|
||||
import org.jetbrains.kotlin.idea.KotlinBundle
|
||||
import org.jetbrains.kotlin.idea.KotlinFileType
|
||||
import org.jetbrains.kotlin.idea.KotlinIdeaAnalysisBundleIndependent
|
||||
import org.jetbrains.kotlin.idea.search.KotlinSearchUsagesSupport.Companion.forceResolveReferences
|
||||
import org.jetbrains.kotlin.idea.search.KotlinSearchUsagesSupport.Companion.getReceiverTypeSearcherInfo
|
||||
import org.jetbrains.kotlin.idea.search.ideaExtensions.KotlinReferencesSearchOptions
|
||||
@@ -275,7 +275,7 @@ abstract class OperatorReferenceSearcher<TReferenceElement : KtElement>(
|
||||
// we must unwrap progress indicator because ProgressWrapper does not do anything on changing text and fraction
|
||||
val progress = ProgressWrapper.unwrap(ProgressIndicatorProvider.getGlobalProgressIndicator())
|
||||
progress?.pushState()
|
||||
progress?.text = KotlinIdeaAnalysisBundleIndependent.message("searching.for.implicit.usages")
|
||||
progress?.text = KotlinBundle.message("searching.for.implicit.usages")
|
||||
|
||||
try {
|
||||
val files = runReadAction { FileTypeIndex.getFiles(KotlinFileType.INSTANCE, scope) }
|
||||
|
||||
@@ -21,7 +21,7 @@ import org.jetbrains.kotlin.descriptors.DeclarationDescriptor
|
||||
import org.jetbrains.kotlin.diagnostics.Diagnostic
|
||||
import org.jetbrains.kotlin.diagnostics.DiagnosticFactory1
|
||||
import org.jetbrains.kotlin.diagnostics.Errors
|
||||
import org.jetbrains.kotlin.idea.KotlinBundleIndependent
|
||||
import org.jetbrains.kotlin.idea.KotlinBundle
|
||||
import org.jetbrains.kotlin.idea.quickfix.createFromUsage.createCallable.CreatePropertyDelegateAccessorsActionFactory
|
||||
import org.jetbrains.kotlin.lexer.KtTokens
|
||||
import org.jetbrains.kotlin.psi.KtProperty
|
||||
@@ -55,6 +55,6 @@ object DelegatedPropertyValFactory : KotlinSingleIntentionActionFactory() {
|
||||
val property = element.getStrictParentOfType<KtProperty>() ?: return null
|
||||
val info = CreatePropertyDelegateAccessorsActionFactory.extractFixData(property, diagnostic).singleOrNull() ?: return null
|
||||
if (info.name != OperatorNameConventions.SET_VALUE.asString()) return null
|
||||
return ChangeVariableMutabilityFix(property, makeVar = false, actionText = KotlinBundleIndependent.message("change.to.val"))
|
||||
return ChangeVariableMutabilityFix(property, makeVar = false, actionText = KotlinBundle.message("change.to.val"))
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user