MCPcopy Create free account
hub / github.com/Dart-Code/Dart-Code / trackDoc

Method trackDoc

src/shared/vscode/trackers.ts:40–48  ·  view source on GitHub ↗
(document: vs.TextDocument, positions: vs.Position[])

Source from the content-addressed store, hash-verified

38 }
39
40 public trackDoc(document: vs.TextDocument, positions: vs.Position[]) {
41 // Stash all positions as offsets.
42 this.positionMap.clear();
43 for (const position of positions)
44 this.positionMap.set(position, document.offsetAt(position));
45
46 // Track via the offset tracker.
47 this.tracker.trackDoc(document, [...this.positionMap.values()]);
48 }
49
50 public dispose() {
51 disposeAll(this.disposables);

Callers

nothing calls this directly

Calls 4

setMethod · 0.80
valuesMethod · 0.80
clearMethod · 0.45
trackDocMethod · 0.45

Tested by

no test coverage detected