diff --git a/contentprovider-sample/README.md b/contentprovider-sample/README.md index 0794660d..a6c127d8 100644 --- a/contentprovider-sample/README.md +++ b/contentprovider-sample/README.md @@ -11,13 +11,13 @@ It is not intended as a product quality extension. ![Print References](https://raw.githubusercontent.com/Microsoft/vscode-extension-samples/master/contentprovider-sample/preview.gif) -# How it works +# How it works, what it shows? - The extension implements and registers a [`TextDocumentContentProvider`](http://code.visualstudio.com/docs/extensionAPI/vscode-api#TextDocumentContentProvider) for a particular URI scheme. - The content provider uses the [`vscode.executeReferenceProvider`](http://code.visualstudio.com/docs/extensionAPI/vscode-api-commands)-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 - +- Add an entry to editor context menu via `package.json` # How to run locally diff --git a/contentprovider-sample/package.json b/contentprovider-sample/package.json index bbe5a03f..8f071b24 100644 --- a/contentprovider-sample/package.json +++ b/contentprovider-sample/package.json @@ -28,6 +28,15 @@ "title": "Show All References" } ], + "menus": { + "editor/context": [ + { + "command": "editor.printReferences", + "when": "editorHasReferenceProvider", + "group": "navigation@1.31" + } + ] + }, "languages": [ { "id": "locations",