i18n: add bundle for idea/refactoring/memberInfo
This commit is contained in:
committed by
Dmitry Gridin
parent
1c5b371249
commit
93493bdc09
@@ -804,6 +804,8 @@ label.text.receiver.type=Receiver &type:\u0020
|
|||||||
label.text.target.file.name=Target file name:
|
label.text.target.file.name=Target file name:
|
||||||
label.text.type=&Type:\u0020
|
label.text.type=&Type:\u0020
|
||||||
label.text.visibility=&Visibility:\u0020
|
label.text.visibility=&Visibility:\u0020
|
||||||
|
member.info.abstract.0=abstract {0}
|
||||||
|
member.info.companion.0=companion {0}
|
||||||
message.change.signature.is.not.applicable.to.dynamically.invoked.functions=Change signature is not applicable to dynamically invoked functions
|
message.change.signature.is.not.applicable.to.dynamically.invoked.functions=Change signature is not applicable to dynamically invoked functions
|
||||||
message.do.not.show.for.local.variables.in.future=Do not show for local variables in future
|
message.do.not.show.for.local.variables.in.future=Do not show for local variables in future
|
||||||
message.text.return.type.cannot.be.resolved=Return type ''{0}'' cannot be resolved.\nContinue?
|
message.text.return.type.cannot.be.resolved=Return type ''{0}'' cannot be resolved.\nContinue?
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ import org.jetbrains.kotlin.asJava.toLightElements
|
|||||||
import org.jetbrains.kotlin.asJava.unwrapped
|
import org.jetbrains.kotlin.asJava.unwrapped
|
||||||
import org.jetbrains.kotlin.descriptors.CallableMemberDescriptor
|
import org.jetbrains.kotlin.descriptors.CallableMemberDescriptor
|
||||||
import org.jetbrains.kotlin.descriptors.Modality
|
import org.jetbrains.kotlin.descriptors.Modality
|
||||||
|
import org.jetbrains.kotlin.idea.KotlinBundle
|
||||||
import org.jetbrains.kotlin.idea.refactoring.isInterfaceClass
|
import org.jetbrains.kotlin.idea.refactoring.isInterfaceClass
|
||||||
import org.jetbrains.kotlin.idea.util.IdeDescriptorRenderers
|
import org.jetbrains.kotlin.idea.util.IdeDescriptorRenderers
|
||||||
import org.jetbrains.kotlin.lexer.KtTokens
|
import org.jetbrains.kotlin.lexer.KtTokens
|
||||||
@@ -51,10 +52,10 @@ class KotlinMemberInfo @JvmOverloads constructor(
|
|||||||
} else {
|
} else {
|
||||||
displayName = RENDERER.render(memberDescriptor)
|
displayName = RENDERER.render(memberDescriptor)
|
||||||
if (member.hasModifier(KtTokens.ABSTRACT_KEYWORD)) {
|
if (member.hasModifier(KtTokens.ABSTRACT_KEYWORD)) {
|
||||||
displayName = "abstract $displayName"
|
displayName = KotlinBundle.message("member.info.abstract.0", displayName)
|
||||||
}
|
}
|
||||||
if (isCompanionMember) {
|
if (isCompanionMember) {
|
||||||
displayName = "companion $displayName"
|
displayName = KotlinBundle.message("member.info.companion.0", displayName)
|
||||||
}
|
}
|
||||||
|
|
||||||
val overriddenDescriptors = (memberDescriptor as? CallableMemberDescriptor)?.overriddenDescriptors ?: emptySet()
|
val overriddenDescriptors = (memberDescriptor as? CallableMemberDescriptor)?.overriddenDescriptors ?: emptySet()
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ import org.jetbrains.kotlin.asJava.classes.KtLightClass
|
|||||||
import org.jetbrains.kotlin.asJava.namedUnwrappedElement
|
import org.jetbrains.kotlin.asJava.namedUnwrappedElement
|
||||||
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.KotlinBundle
|
||||||
import org.jetbrains.kotlin.idea.caches.resolve.resolveToDescriptorIfAny
|
import org.jetbrains.kotlin.idea.caches.resolve.resolveToDescriptorIfAny
|
||||||
import org.jetbrains.kotlin.idea.caches.resolve.unsafeResolveToDescriptor
|
import org.jetbrains.kotlin.idea.caches.resolve.unsafeResolveToDescriptor
|
||||||
import org.jetbrains.kotlin.idea.caches.resolve.util.getJavaClassDescriptor
|
import org.jetbrains.kotlin.idea.caches.resolve.util.getJavaClassDescriptor
|
||||||
@@ -49,7 +50,7 @@ fun PsiNamedElement.qualifiedClassNameForRendering(): String {
|
|||||||
is PsiClass -> qualifiedName
|
is PsiClass -> qualifiedName
|
||||||
else -> throw AssertionError("Not a class: ${getElementTextWithContext()}")
|
else -> throw AssertionError("Not a class: ${getElementTextWithContext()}")
|
||||||
}
|
}
|
||||||
return fqName ?: name ?: "[Anonymous]"
|
return fqName ?: name ?: KotlinBundle.message("text.anonymous")
|
||||||
}
|
}
|
||||||
|
|
||||||
fun KotlinMemberInfo.getChildrenToAnalyze(): List<PsiElement> {
|
fun KotlinMemberInfo.getChildrenToAnalyze(): List<PsiElement> {
|
||||||
|
|||||||
Reference in New Issue
Block a user