Filter out duplicate navigation targets for references in library source
This commit is contained in:
+3
-1
@@ -57,7 +57,9 @@ public object DescriptorToDeclarationUtil {
|
||||
result.addIfNotNull(psiFacade.findPackage(fqName))
|
||||
result.addIfNotNull(psiFacade.findClass(fqName, project.allScope()))
|
||||
}
|
||||
return result
|
||||
// filter out elements which are navigate to some other element of the result
|
||||
// this is needed to avoid duplicated results for references to declaration in same library source file
|
||||
return result.filter { element -> result.none { element != it && it.getNavigationElement() == element } }
|
||||
}
|
||||
|
||||
private fun findDecompiledAndBuiltInDeclarations(project: Project, descriptor: DeclarationDescriptor): Collection<PsiElement> {
|
||||
|
||||
Reference in New Issue
Block a user