tests: apply official code style
#KT-38632 Fixed
This commit is contained in:
+11
-6
@@ -5,20 +5,25 @@ class A {
|
||||
var element: PsiElement = element
|
||||
element = JetPsiUtil.ascendIfPropertyAccessor(element)
|
||||
if (element is JetNamedFunction || element is JetProperty) {
|
||||
val bindingContext: BindingContext = AnalyzerFacadeWithCache.analyzeFileWithCache(element.getContainingJetFile()).getBindingContext()
|
||||
val declarationDescriptor: DeclarationDescriptor = bindingContext.get(BindingContext.DECLARATION_TO_DESCRIPTOR, element)
|
||||
val bindingContext: BindingContext =
|
||||
AnalyzerFacadeWithCache.analyzeFileWithCache(element.getContainingJetFile()).getBindingContext()
|
||||
val declarationDescriptor: DeclarationDescriptor =
|
||||
bindingContext.get(BindingContext.DECLARATION_TO_DESCRIPTOR, element)
|
||||
if (declarationDescriptor is CallableMemberDescriptor) {
|
||||
val containingDescriptor: DeclarationDescriptor = declarationDescriptor.getContainingDeclaration()
|
||||
if (containingDescriptor is ClassDescriptor) {
|
||||
return JetBundle.message(
|
||||
"override.declaration.x.in.y",
|
||||
DescriptorRenderer.COMPACT.render(declarationDescriptor),
|
||||
IdeDescriptorRenderers.SOURCE_CODE_SHORT_NAMES_NO_ANNOTATIONS.render(containingDescriptor)
|
||||
"override.declaration.x.in.y",
|
||||
DescriptorRenderer.COMPACT.render(declarationDescriptor),
|
||||
IdeDescriptorRenderers.SOURCE_CODE_SHORT_NAMES_NO_ANNOTATIONS.render(containingDescriptor)
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
assert(element is PsiMethod) { "Method accepts only kotlin functions/properties and java methods, but '" + element.getText().toString() + "' was found" }
|
||||
assert(element is PsiMethod) {
|
||||
"Method accepts only kotlin functions/properties and java methods, but '" + element.getText()
|
||||
.toString() + "' was found"
|
||||
}
|
||||
return JetRefactoringUtil.formatPsiMethod(element as PsiMethod, true, false)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user