Add Go To Implementation Api (#18346)

* Add Go To Implementation Api

For #10806

Adds a new API for supporting  `go to implementation` command for languages. Implements an example for TS

* Rename

* Cleanup
This commit is contained in:
Matt Bierner
2017-01-12 12:16:48 -08:00
committed by GitHub
parent 46e5dddeab
commit 9d611d4dfd
19 changed files with 326 additions and 56 deletions

View File

@@ -102,6 +102,15 @@ export class MainThreadLanguageFeatures extends MainThreadLanguageFeaturesShape
return undefined;
}
$registerImplementationSupport(handle: number, selector: vscode.DocumentSelector): TPromise<any> {
this._registrations[handle] = modes.TypeDefinitionProviderRegistry.register(selector, <modes.TypeDefinitionProvider>{
provideTypeDefinition: (model, position, token): Thenable<modes.Definition> => {
return wireCancellationToken(token, this._proxy.$provideTypeDefinition(handle, model.uri, position));
}
});
return undefined;
}
// --- extra info
$registerHoverProvider(handle: number, selector: vscode.DocumentSelector): TPromise<any> {