add menu item to editor context menu

This commit is contained in:
Johannes Rieken
2016-07-29 11:26:42 +02:00
parent 937aa692e0
commit f13c7cd1d9
2 changed files with 11 additions and 2 deletions

View File

@ -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

View File

@ -28,6 +28,15 @@
"title": "Show All References"
}
],
"menus": {
"editor/context": [
{
"command": "editor.printReferences",
"when": "editorHasReferenceProvider",
"group": "navigation@1.31"
}
]
},
"languages": [
{
"id": "locations",