mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-08 15:09:39 +07:00
[kotlin] Properly set scope for find usages in K2 move refactoring
#KTIJ-29710 Fixed GitOrigin-RevId: e804ad090e065fb496df7f84e80fbccdc003509a
This commit is contained in:
committed by
intellij-monorepo-bot
parent
4352ac87ec
commit
f5c980ed21
@@ -246,7 +246,7 @@ sealed class K2MoveRenameUsageInfo(
|
||||
* Finds usages to [declaration] excluding the usages inside [declaration].
|
||||
*/
|
||||
private fun findExternalUsages(declaration: KtNamedDeclaration): List<MoveRenameUsageInfo> {
|
||||
return ReferencesSearch.search(declaration, declaration.resolveScope).findAll()
|
||||
return ReferencesSearch.search(declaration, declaration.useScope).findAll()
|
||||
.filter { !declaration.isAncestor(it.element) } // exclude internal usages
|
||||
.mapNotNull { ref ->
|
||||
if (ref is KtSimpleNameReference) {
|
||||
|
||||
Reference in New Issue
Block a user