Find references on unused symbol must not load referenced URIs
parent
f10680e441
commit
258b905d9f
|
@ -221,15 +221,18 @@ class TextDocument
|
|||
return [];
|
||||
}
|
||||
}
|
||||
$refDocuments = yield Promise\all(array_map(
|
||||
[$this->documentLoader, 'getOrLoad'],
|
||||
$this->index->getReferenceUris($fqn)
|
||||
));
|
||||
foreach ($refDocuments as $document) {
|
||||
$refs = $document->getReferenceNodesByFqn($fqn);
|
||||
if ($refs !== null) {
|
||||
foreach ($refs as $ref) {
|
||||
$locations[] = Location::fromNode($ref);
|
||||
$referenceUris = $this->index->getReferenceUris($fqn);
|
||||
if (!empty($referenceUris)) {
|
||||
$refDocuments = yield Promise\all(array_map(
|
||||
[$this->documentLoader, 'getOrLoad'],
|
||||
$referenceUris
|
||||
));
|
||||
foreach ($refDocuments as $document) {
|
||||
$refs = $document->getReferenceNodesByFqn($fqn);
|
||||
if ($refs !== null) {
|
||||
foreach ($refs as $ref) {
|
||||
$locations[] = Location::fromNode($ref);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue