KotlinAnnotatedElementsSearcher made support Kotlin objects (KT-31332)

This commit is contained in:
Nicolay Mitropolsky
2019-05-06 15:09:39 +03:00
parent 824c51e7f0
commit 6101b5e6ba
2 changed files with 5 additions and 1 deletions
@@ -49,7 +49,7 @@ class KotlinAnnotatedElementsSearcher : QueryExecutor<PsiModifierListOwner, Anno
override fun execute(p: AnnotatedElementsSearch.Parameters, consumer: Processor<in PsiModifierListOwner>): Boolean {
return processAnnotatedMembers(p.annotationClass, p.scope) { declaration ->
when (declaration) {
is KtClass -> {
is KtClassOrObject -> {
val lightClass = declaration.toLightClass()
consumer.process(lightClass)
}
@@ -6,6 +6,9 @@
@java.lang.Deprecated class TestClass4 {}
@java.lang.Deprecated
object TestObject {}
class TestClass5 {
@java.lang.Deprecated class innerTestClass5() {}
}
@@ -13,4 +16,5 @@ class TestClass5 {
// ANNOTATION: java.lang.Deprecated
// SEARCH: class:TestClass1, class:TestClass2, class:TestClass3
// SEARCH: class:TestClass4
// SEARCH: class:TestObject
// SEARCH: class:innerTestClass5