From 4fa13408dea4616b1512fae9d8dcab1e2fea6ecc Mon Sep 17 00:00:00 2001 From: Valentin Kipyatkov Date: Tue, 1 Sep 2015 16:17:21 +0300 Subject: [PATCH] Minor --- .../src/org/jetbrains/kotlin/resolve/DescriptorUtils.kt | 2 +- .../kotlin/idea/quickfix/DeprecatedSymbolUsageFixBase.kt | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/core/descriptors/src/org/jetbrains/kotlin/resolve/DescriptorUtils.kt b/core/descriptors/src/org/jetbrains/kotlin/resolve/DescriptorUtils.kt index 5c4aa92094f..df0b14e0390 100644 --- a/core/descriptors/src/org/jetbrains/kotlin/resolve/DescriptorUtils.kt +++ b/core/descriptors/src/org/jetbrains/kotlin/resolve/DescriptorUtils.kt @@ -199,7 +199,7 @@ public val DeclarationDescriptor.parentsWithSelf: Sequence get() = parentsWithSelf.drop(1) -private val HIDDEN_ANNOTATION_FQ_NAME = FqName("kotlin.HiddenDeclaration") /*TODO*/ +private val HIDDEN_ANNOTATION_FQ_NAME = FqName(HiddenDeclaration::class.qualifiedName!!) public fun DeclarationDescriptor.isAnnotatedAsHidden(): Boolean = annotations.findAnnotation(HIDDEN_ANNOTATION_FQ_NAME) != null diff --git a/idea/src/org/jetbrains/kotlin/idea/quickfix/DeprecatedSymbolUsageFixBase.kt b/idea/src/org/jetbrains/kotlin/idea/quickfix/DeprecatedSymbolUsageFixBase.kt index 3e30eff10d0..b11ed86c51f 100644 --- a/idea/src/org/jetbrains/kotlin/idea/quickfix/DeprecatedSymbolUsageFixBase.kt +++ b/idea/src/org/jetbrains/kotlin/idea/quickfix/DeprecatedSymbolUsageFixBase.kt @@ -107,10 +107,10 @@ public abstract class DeprecatedSymbolUsageFixBase( public fun replaceWithPattern(descriptor: DeclarationDescriptor, project: Project): ReplaceWith? { val annotationClass = descriptor.builtIns.getDeprecatedAnnotation() val annotation = descriptor.getAnnotations().findAnnotation(DescriptorUtils.getFqNameSafe(annotationClass)) ?: return null - val replaceWithValue = annotation.argumentValue("replaceWith"/*TODO: kotlin.deprecated::replaceWith.name*/) as? AnnotationDescriptor ?: return null - val pattern = replaceWithValue.argumentValue("expression"/*TODO: kotlin.ReplaceWith::expression.name*/) as? String ?: return null + val replaceWithValue = annotation.argumentValue(kotlin.deprecated::replaceWith.name) as? AnnotationDescriptor ?: return null + val pattern = replaceWithValue.argumentValue(kotlin.ReplaceWith::expression.name) as? String ?: return null if (pattern.isEmpty()) return null - val importValues = replaceWithValue.argumentValue("imports"/*TODO: kotlin.ReplaceWith::imports.name*/) as? List<*> ?: return null + val importValues = replaceWithValue.argumentValue(kotlin.ReplaceWith::imports.name) as? List<*> ?: return null if (importValues.any { it !is StringValue }) return null val imports = importValues.map { (it as StringValue).value }