MCPcopy Create free account
hub / github.com/Acode-Foundation/Acode / findAllReferences

Function findAllReferences

src/cm/lsp/references.ts:159–183  ·  view source on GitHub ↗
(view: EditorView)

Source from the content-addressed store, hash-verified

157}
158
159export async function findAllReferences(view: EditorView): Promise<boolean> {
160 const plugin = LSPPlugin.get(view);
161 if (!plugin) {
162 return false;
163 }
164
165 const symbolName = getWordAtCursor(view);
166 const panel = showReferencesPanel({ symbolName });
167
168 try {
169 const result = await fetchReferences(view);
170 if (result === null) {
171 panel.setError("Failed to fetch references");
172 return false;
173 }
174 panel.setReferences(result.references);
175 return true;
176 } catch (error) {
177 console.error("Find references failed:", error);
178 const errorMessage =
179 error instanceof Error ? error.message : "Unknown error occurred";
180 panel.setError(errorMessage);
181 return false;
182 }
183}
184
185export async function findAllReferencesInTab(
186 view: EditorView,

Callers

nothing calls this directly

Calls 5

showReferencesPanelFunction · 0.90
getWordAtCursorFunction · 0.85
fetchReferencesFunction · 0.85
getMethod · 0.45
errorMethod · 0.45

Tested by

no test coverage detected