More correct detection of super property

This commit is contained in:
Valentin Kipyatkov
2015-09-23 13:25:47 +03:00
parent 8a0cd92aff
commit b1b5af8e1e
7 changed files with 71 additions and 10 deletions
@@ -16,13 +16,23 @@
package org.jetbrains.kotlin.idea.j2k
import com.intellij.psi.PsiMethod
import org.jetbrains.kotlin.j2k.*
object IdeaJavaToKotlinServices: JavaToKotlinConverterServices {
object IdeaJavaToKotlinServices : JavaToKotlinConverterServices {
override val referenceSearcher: ReferenceSearcher
get() = IdeaReferenceSearcher
override val superMethodsSearcher: SuperMethodsSearcher
get() = IdeaSuperMethodSearcher
override val resolverForConverter: ResolverForConverter
get() = IdeaResolverForConverter
override val docCommentConverter: DocCommentConverter
get() = IdeaDocCommentConverter
}
object IdeaSuperMethodSearcher : SuperMethodsSearcher {
override fun findDeepestSuperMethods(method: PsiMethod) = method.findDeepestSuperMethods().asList()
}
@@ -49,4 +49,4 @@ public object IdeaReferenceSearcher: ReferenceSearcher {
val searchScope = GlobalSearchScope.getScopeRestrictedByFileTypes(GlobalSearchScope.projectScope(element.getProject()), *fileTypes.toTypedArray())
return ReferencesSearch.search(element, searchScope).findAll()
}
}
}