Rename TypeDefinitionProvider to TypeImplementationProvider (#19101)

* Rename TypeDefinitionProvider to TypeImeplementationProvider

**bug**
In #18346, I originally called the new go to implementation provider api `ImplementationProvider` which we then decided to rename to `TypeDefinitionProvider`. At the time, I didn't realize that a type definition was actually its own, unrelated concept.

**Fix**
Rename `TypeDefinitionProvider` to `TypeImplementationProvider` to make it clear what the purpose and use of this api is.

* Fix a few names in comments
This commit is contained in:
Matt Bierner
2017-01-23 16:25:37 -08:00
committed by GitHub
parent 779700d709
commit 20f3a9f11b
16 changed files with 60 additions and 60 deletions

View File

@@ -46,7 +46,7 @@ export class ExtHostApiCommands {
],
returns: 'A promise that resolves to an array of Location-instances.'
});
this._register('vscode.executeTypeDefinitionProvider', this._executeTypeDefinitionProvider, {
this._register('vscode.executeTypeImplementationProvider', this._executeTypeImplementationProvider, {
description: 'Execute all implementation providers.',
args: [
{ name: 'uri', description: 'Uri of a text document', constraint: URI },
@@ -273,12 +273,12 @@ export class ExtHostApiCommands {
});
}
private _executeTypeDefinitionProvider(resource: URI, position: types.Position): Thenable<types.Location[]> {
private _executeTypeImplementationProvider(resource: URI, position: types.Position): Thenable<types.Location[]> {
const args = {
resource,
position: position && typeConverters.fromPosition(position)
};
return this._commands.executeCommand<modes.Location[]>('_executeTypeDefinitionProvider', args).then(value => {
return this._commands.executeCommand<modes.Location[]>('_executeTypeImplementationProvider', args).then(value => {
if (Array.isArray(value)) {
return value.map(typeConverters.location.to);
}