@@ -27,6 +27,7 @@ export class ApiCommandArgument<V, O = V> {
...
@@ -27,6 +27,7 @@ export class ApiCommandArgument<V, O = V> {
staticreadonlyUri=newApiCommandArgument<URI>('uri','Uri of a text document',v=>URI.isUri(v),v=>v);
staticreadonlyUri=newApiCommandArgument<URI>('uri','Uri of a text document',v=>URI.isUri(v),v=>v);
staticreadonlyPosition=newApiCommandArgument<types.Position,IPosition>('position','A position in a text document',v=>types.Position.isPosition(v),typeConverters.Position.from);
staticreadonlyPosition=newApiCommandArgument<types.Position,IPosition>('position','A position in a text document',v=>types.Position.isPosition(v),typeConverters.Position.from);
staticreadonlyRange=newApiCommandArgument<types.Range,IRange>('range','A range in a text document',v=>types.Range.isRange(v),typeConverters.Range.from);
newApiCommandResult<modes.DocumentHighlight[],types.DocumentHighlight[]|undefined>('A promise that resolves to an array of SymbolInformation and DocumentSymbol instances.',tryMapWith(typeConverters.DocumentHighlight.to))
),
// -- document symbols
newApiCommand(
'vscode.executeDocumentSymbolProvider','_executeDocumentSymbolProvider','Execute document symbol provider.',
[ApiCommandArgument.Uri],
newApiCommandResult<modes.DocumentSymbol[],vscode.SymbolInformation[]|undefined>('A promise that resolves to an array of DocumentHighlight-instances.',(value,apiArgs)=>{
newApiCommandResult<ISingleEditOperation[],types.TextEdit[]|undefined>('A promise that resolves to an array of TextEdits.',tryMapWith(typeConverters.TextEdit.to))
),
newApiCommand(
'vscode.executeFormatRangeProvider','_executeFormatRangeProvider','Execute range format provider.',
newApiCommandResult<ISingleEditOperation[],types.TextEdit[]|undefined>('A promise that resolves to an array of TextEdits.',tryMapWith(typeConverters.TextEdit.to))
),
newApiCommand(
'vscode.executeFormatOnTypeProvider','_executeFormatOnTypeProvider','Execute format on type provider.',
newApiCommandResult<ISingleEditOperation[],types.TextEdit[]|undefined>('A promise that resolves to an array of TextEdits.',tryMapWith(typeConverters.TextEdit.to))
),
// -- go to symbol (definition, type definition, declaration, impl, references)
newApiCommand(
'vscode.executeDefinitionProvider','_executeDefinitionProvider','Execute all definition provider.',
newApiCommandResult<modes.Location[],types.Location[]|undefined>('A promise that resolves to an array of Location-instances.',tryMapWith(typeConverters.location.to))
),
newApiCommand(
'vscode.executeTypeDefinitionProvider','_executeTypeDefinitionProvider','Execute all type definition providers.',
newApiCommandResult<modes.Location[],types.Location[]|undefined>('A promise that resolves to an array of Location-instances.',tryMapWith(typeConverters.location.to))
),
newApiCommand(
'vscode.executeDeclarationProvider','_executeDeclarationProvider','Execute all declaration providers.',
newApiCommandResult<modes.Location[],types.Location[]|undefined>('A promise that resolves to an array of Location-instances.',tryMapWith(typeConverters.location.to))
),
newApiCommand(
'vscode.executeImplementationProvider','_executeImplementationProvider','Execute all implementation providers.',
newApiCommandResult<modes.Location[],types.Location[]|undefined>('A promise that resolves to an array of Location-instances.',tryMapWith(typeConverters.location.to))
),
newApiCommand(
'vscode.executeReferenceProvider','_executeReferenceProvider','Execute all reference providers.',
newApiCommandResult<modes.Location[],types.Location[]|undefined>('A promise that resolves to an array of Location-instances.',tryMapWith(typeConverters.location.to))
),
// -- hover
newApiCommand(
'vscode.executeHoverProvider','_executeHoverProvider','Execute all hover provider.',
newApiCommandResult<modes.Hover[],types.Hover[]|undefined>('A promise that resolves to an array of Hover-instances.',tryMapWith(typeConverters.Hover.to))
),
// -- selection range
newApiCommand(
'vscode.executeSelectionRangeProvider','_executeSelectionRangeProvider','Execute selection range provider.',
[ApiCommandArgument.Uri,newApiCommandArgument('position','A positions in a text document',v=>Array.isArray(v)&&v.every(v=>types.Position.isPosition(v)),v=>v.map(typeConverters.Position.from))],
newApiCommandResult<IRange[][],types.SelectionRange[]>('A promise that resolves to an array of ranges.',result=>{