Files
vscode-extension-samples/contentprovider-sample
Johannes Rieken 0f40e725e5 fix images
2016-05-20 16:33:18 +02:00
..
2016-05-20 16:01:41 +02:00
2016-05-20 16:01:41 +02:00
2016-05-20 12:52:42 +02:00
2016-05-20 16:33:18 +02:00
2016-05-20 15:36:56 +02:00
2016-05-20 16:33:18 +02:00

References Editor Sample

This is a sample extension that shows how an editor-based representation for the Find References feature can be build.

It is not intended as a product quality extension.

  • Select a symbol
  • Select F1 > Print References
  • An editor opens to the side and show the references in a textual form

Print References

How it works

  • The extension implements and registers a TextDocumentContentProvider for a particular URI scheme.
  • The content provider uses the vscode.executeReferenceProvider-API command to delegate searching for references to the language extensions, like TypeScript, vscode-go, or C#
  • The generated document initially contains a caption only and incrementally updates as each reference location is resolved.
  • The content provider uses the decoration API to highlight matches inside the generated document