1
0
Fork 0

Revert "Find references on unused symbol must not load referenced URIs"

This reverts commit 258b905d9f.
pull/392/head
Stephan Unverwerth 2017-06-10 11:23:23 +02:00
parent 249d3727f2
commit a1fc6b50ed
1 changed files with 9 additions and 12 deletions

View File

@ -221,18 +221,15 @@ class TextDocument
return []; return [];
} }
} }
$referenceUris = $this->index->getReferenceUris($fqn); $refDocuments = yield Promise\all(array_map(
if (!empty($referenceUris)) { [$this->documentLoader, 'getOrLoad'],
$refDocuments = yield Promise\all(array_map( $this->index->getReferenceUris($fqn)
[$this->documentLoader, 'getOrLoad'], ));
$referenceUris foreach ($refDocuments as $document) {
)); $refs = $document->getReferenceNodesByFqn($fqn);
foreach ($refDocuments as $document) { if ($refs !== null) {
$refs = $document->getReferenceNodesByFqn($fqn); foreach ($refs as $ref) {
if ($refs !== null) { $locations[] = Location::fromNode($ref);
foreach ($refs as $ref) {
$locations[] = Location::fromNode($ref);
}
} }
} }
} }