Java: respect scope when calculating the call hierarchy of a field (IJPL-8275)

GitOrigin-RevId: 24626e11bfa4c991c2bdd040a3b650d80fd6d555
This commit is contained in:
Bas Leijdekkers
2024-11-29 16:15:15 +00:00
committed by intellij-monorepo-bot
parent 997299efb1
commit a39d8c3e31
@@ -127,7 +127,7 @@ public final class CallerMethodsTreeStructure extends HierarchyTreeStructure {
assert enclosingElement instanceof PsiField : "Enclosing element should be a field, but was " + enclosingElement.getClass() + ", text: " + enclosingElement.getText();
return ReferencesSearch
.search(enclosingElement, enclosingElement.getUseScope()).findAll().stream()
.search(enclosingElement, searchScope).findAll().stream()
.map(PsiReference::getElement)
.distinct()
.map(e -> new CallHierarchyNodeDescriptor(myProject, nodeDescriptor, e, false, false)).toArray();