in server/src/graphStore.ts [798:825]
private resolveReferenceResult(result: lsp.Location[], dedupRanges: Set<Id>, monikers: Map<Id, Moniker>, referenceResult: ReferenceResult, context: lsp.ReferenceContext): void {
const qr: LocationResultWithProperty[] = this.findRangeFromReferenceResult.all({ id: referenceResult.id });
if (qr && qr.length > 0) {
const refLabel = this.getItemEdgeProperty(ItemEdgeProperties.references);
for (const item of qr) {
if (item.property === refLabel || context.includeDeclaration && !dedupRanges.has(item.id)) {
dedupRanges.add(item.id);
result.push(this.createLocation(item));
}
}
}
const mr: VertexResult[] = this.findCascadesFromReferenceResult.all({ id: referenceResult.id });
if (mr) {
for (const moniker of mr) {
if (!monikers.has(moniker.id)) {
monikers.set(moniker.id, this.decompress(JSON.parse(moniker.value)));
}
}
}
const rqr: VertexResult[] = this.findResultFromReferenceResult.all({ id: referenceResult.id });
if (rqr && rqr.length > 0) {
for (const item of rqr) {
this.resolveReferenceResult(result, dedupRanges, monikers, this.decompress(JSON.parse(item.value)), context);
}
}
}