Light Classes: Fix equivalence check
Do not consider PsiClass equiavent to KtLightClass if it's not a light class as well #KT-16180 Fixed
This commit is contained in:
+1
-1
@@ -200,7 +200,7 @@ class KtLightClassForFacade private constructor(
|
|||||||
override fun getNavigationElement() = files.iterator().next()
|
override fun getNavigationElement() = files.iterator().next()
|
||||||
|
|
||||||
override fun isEquivalentTo(another: PsiElement?): Boolean {
|
override fun isEquivalentTo(another: PsiElement?): Boolean {
|
||||||
return another is PsiClass && Comparing.equal(another.qualifiedName, qualifiedName)
|
return another is KtLightClassForFacade && Comparing.equal(another.qualifiedName, qualifiedName)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun getElementIcon(flags: Int): Icon? = throw UnsupportedOperationException("This should be done by JetIconProvider")
|
override fun getElementIcon(flags: Int): Icon? = throw UnsupportedOperationException("This should be done by JetIconProvider")
|
||||||
|
|||||||
+1
-1
@@ -138,7 +138,7 @@ abstract class KtLightClassForSourceDeclaration(protected val classOrObject: KtC
|
|||||||
override fun getNavigationElement(): PsiElement = classOrObject
|
override fun getNavigationElement(): PsiElement = classOrObject
|
||||||
|
|
||||||
override fun isEquivalentTo(another: PsiElement?): Boolean {
|
override fun isEquivalentTo(another: PsiElement?): Boolean {
|
||||||
return another is PsiClass && Comparing.equal(another.qualifiedName, qualifiedName)
|
return another is KtLightClassForSourceDeclaration && Comparing.equal(another.qualifiedName, qualifiedName)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun getElementIcon(flags: Int): Icon? {
|
override fun getElementIcon(flags: Int): Icon? {
|
||||||
|
|||||||
Reference in New Issue
Block a user