mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-20 00:28:52 +01:00
Renames
This commit is contained in:
@@ -9,7 +9,7 @@ import type * as vscode from 'vscode';
|
||||
import * as typeConvert from 'vs/workbench/api/common/extHostTypeConverters';
|
||||
import { Range, Disposable, CompletionList, SnippetString, CodeActionKind, SymbolInformation, DocumentSymbol, SemanticTokensEdits, SemanticTokens, SemanticTokensEdit, InlayHintKind, Location } from 'vs/workbench/api/common/extHostTypes';
|
||||
import { ISingleEditOperation } from 'vs/editor/common/core/editOperation';
|
||||
import * as modes from 'vs/editor/common/languages';
|
||||
import * as languages from 'vs/editor/common/languages';
|
||||
import { ExtHostDocuments } from 'vs/workbench/api/common/extHostDocuments';
|
||||
import { ExtHostCommands, CommandsConverter } from 'vs/workbench/api/common/extHostCommands';
|
||||
import { ExtHostDiagnostics } from 'vs/workbench/api/common/extHostDiagnostics';
|
||||
@@ -47,7 +47,7 @@ class DocumentSymbolAdapter {
|
||||
this._provider = provider;
|
||||
}
|
||||
|
||||
async provideDocumentSymbols(resource: URI, token: CancellationToken): Promise<modes.DocumentSymbol[] | undefined> {
|
||||
async provideDocumentSymbols(resource: URI, token: CancellationToken): Promise<languages.DocumentSymbol[] | undefined> {
|
||||
const doc = this._documents.getDocument(resource);
|
||||
const value = await this._provider.provideDocumentSymbols(doc, token);
|
||||
if (isFalsyOrEmpty(value)) {
|
||||
@@ -59,7 +59,7 @@ class DocumentSymbolAdapter {
|
||||
}
|
||||
}
|
||||
|
||||
private static _asDocumentSymbolTree(infos: SymbolInformation[]): modes.DocumentSymbol[] {
|
||||
private static _asDocumentSymbolTree(infos: SymbolInformation[]): languages.DocumentSymbol[] {
|
||||
// first sort by start (and end) and then loop over all elements
|
||||
// and build a tree based on containment.
|
||||
infos = infos.slice(0).sort((a, b) => {
|
||||
@@ -69,10 +69,10 @@ class DocumentSymbolAdapter {
|
||||
}
|
||||
return res;
|
||||
});
|
||||
const res: modes.DocumentSymbol[] = [];
|
||||
const parentStack: modes.DocumentSymbol[] = [];
|
||||
const res: languages.DocumentSymbol[] = [];
|
||||
const parentStack: languages.DocumentSymbol[] = [];
|
||||
for (const info of infos) {
|
||||
const element: modes.DocumentSymbol = {
|
||||
const element: languages.DocumentSymbol = {
|
||||
name: info.name || '!!MISSING: name!!',
|
||||
kind: typeConvert.SymbolKind.from(info.kind),
|
||||
tags: info.tags?.map(typeConvert.SymbolTag.from) || [],
|
||||
@@ -177,7 +177,7 @@ class CodeLensAdapter {
|
||||
}
|
||||
}
|
||||
|
||||
function convertToLocationLinks(value: vscode.Location | vscode.Location[] | vscode.LocationLink[] | undefined | null): modes.LocationLink[] {
|
||||
function convertToLocationLinks(value: vscode.Location | vscode.Location[] | vscode.LocationLink[] | undefined | null): languages.LocationLink[] {
|
||||
if (Array.isArray(value)) {
|
||||
return (<any>value).map(typeConvert.DefinitionLink.from);
|
||||
} else if (value) {
|
||||
@@ -193,7 +193,7 @@ class DefinitionAdapter {
|
||||
private readonly _provider: vscode.DefinitionProvider
|
||||
) { }
|
||||
|
||||
async provideDefinition(resource: URI, position: IPosition, token: CancellationToken): Promise<modes.LocationLink[]> {
|
||||
async provideDefinition(resource: URI, position: IPosition, token: CancellationToken): Promise<languages.LocationLink[]> {
|
||||
const doc = this._documents.getDocument(resource);
|
||||
const pos = typeConvert.Position.to(position);
|
||||
const value = await this._provider.provideDefinition(doc, pos, token);
|
||||
@@ -208,7 +208,7 @@ class DeclarationAdapter {
|
||||
private readonly _provider: vscode.DeclarationProvider
|
||||
) { }
|
||||
|
||||
async provideDeclaration(resource: URI, position: IPosition, token: CancellationToken): Promise<modes.LocationLink[]> {
|
||||
async provideDeclaration(resource: URI, position: IPosition, token: CancellationToken): Promise<languages.LocationLink[]> {
|
||||
const doc = this._documents.getDocument(resource);
|
||||
const pos = typeConvert.Position.to(position);
|
||||
const value = await this._provider.provideDeclaration(doc, pos, token);
|
||||
@@ -223,7 +223,7 @@ class ImplementationAdapter {
|
||||
private readonly _provider: vscode.ImplementationProvider
|
||||
) { }
|
||||
|
||||
async provideImplementation(resource: URI, position: IPosition, token: CancellationToken): Promise<modes.LocationLink[]> {
|
||||
async provideImplementation(resource: URI, position: IPosition, token: CancellationToken): Promise<languages.LocationLink[]> {
|
||||
const doc = this._documents.getDocument(resource);
|
||||
const pos = typeConvert.Position.to(position);
|
||||
const value = await this._provider.provideImplementation(doc, pos, token);
|
||||
@@ -238,7 +238,7 @@ class TypeDefinitionAdapter {
|
||||
private readonly _provider: vscode.TypeDefinitionProvider
|
||||
) { }
|
||||
|
||||
async provideTypeDefinition(resource: URI, position: IPosition, token: CancellationToken): Promise<modes.LocationLink[]> {
|
||||
async provideTypeDefinition(resource: URI, position: IPosition, token: CancellationToken): Promise<languages.LocationLink[]> {
|
||||
const doc = this._documents.getDocument(resource);
|
||||
const pos = typeConvert.Position.to(position);
|
||||
const value = await this._provider.provideTypeDefinition(doc, pos, token);
|
||||
@@ -253,7 +253,7 @@ class HoverAdapter {
|
||||
private readonly _provider: vscode.HoverProvider,
|
||||
) { }
|
||||
|
||||
public async provideHover(resource: URI, position: IPosition, token: CancellationToken): Promise<modes.Hover | undefined> {
|
||||
public async provideHover(resource: URI, position: IPosition, token: CancellationToken): Promise<languages.Hover | undefined> {
|
||||
|
||||
const doc = this._documents.getDocument(resource);
|
||||
const pos = typeConvert.Position.to(position);
|
||||
@@ -279,7 +279,7 @@ class EvaluatableExpressionAdapter {
|
||||
private readonly _provider: vscode.EvaluatableExpressionProvider,
|
||||
) { }
|
||||
|
||||
async provideEvaluatableExpression(resource: URI, position: IPosition, token: CancellationToken): Promise<modes.EvaluatableExpression | undefined> {
|
||||
async provideEvaluatableExpression(resource: URI, position: IPosition, token: CancellationToken): Promise<languages.EvaluatableExpression | undefined> {
|
||||
|
||||
const doc = this._documents.getDocument(resource);
|
||||
const pos = typeConvert.Position.to(position);
|
||||
@@ -299,7 +299,7 @@ class InlineValuesAdapter {
|
||||
private readonly _provider: vscode.InlineValuesProvider,
|
||||
) { }
|
||||
|
||||
async provideInlineValues(resource: URI, viewPort: IRange, context: extHostProtocol.IInlineValueContextDto, token: CancellationToken): Promise<modes.InlineValue[] | undefined> {
|
||||
async provideInlineValues(resource: URI, viewPort: IRange, context: extHostProtocol.IInlineValueContextDto, token: CancellationToken): Promise<languages.InlineValue[] | undefined> {
|
||||
const doc = this._documents.getDocument(resource);
|
||||
const value = await this._provider.provideInlineValues(doc, typeConvert.Range.to(viewPort), typeConvert.InlineValueContext.to(context), token);
|
||||
if (Array.isArray(value)) {
|
||||
@@ -316,7 +316,7 @@ class DocumentHighlightAdapter {
|
||||
private readonly _provider: vscode.DocumentHighlightProvider
|
||||
) { }
|
||||
|
||||
async provideDocumentHighlights(resource: URI, position: IPosition, token: CancellationToken): Promise<modes.DocumentHighlight[] | undefined> {
|
||||
async provideDocumentHighlights(resource: URI, position: IPosition, token: CancellationToken): Promise<languages.DocumentHighlight[] | undefined> {
|
||||
|
||||
const doc = this._documents.getDocument(resource);
|
||||
const pos = typeConvert.Position.to(position);
|
||||
@@ -335,7 +335,7 @@ class LinkedEditingRangeAdapter {
|
||||
private readonly _provider: vscode.LinkedEditingRangeProvider
|
||||
) { }
|
||||
|
||||
async provideLinkedEditingRanges(resource: URI, position: IPosition, token: CancellationToken): Promise<modes.LinkedEditingRanges | undefined> {
|
||||
async provideLinkedEditingRanges(resource: URI, position: IPosition, token: CancellationToken): Promise<languages.LinkedEditingRanges | undefined> {
|
||||
|
||||
const doc = this._documents.getDocument(resource);
|
||||
const pos = typeConvert.Position.to(position);
|
||||
@@ -358,7 +358,7 @@ class ReferenceAdapter {
|
||||
private readonly _provider: vscode.ReferenceProvider
|
||||
) { }
|
||||
|
||||
async provideReferences(resource: URI, position: IPosition, context: modes.ReferenceContext, token: CancellationToken): Promise<modes.Location[] | undefined> {
|
||||
async provideReferences(resource: URI, position: IPosition, context: languages.ReferenceContext, token: CancellationToken): Promise<languages.Location[] | undefined> {
|
||||
const doc = this._documents.getDocument(resource);
|
||||
const pos = typeConvert.Position.to(position);
|
||||
|
||||
@@ -390,7 +390,7 @@ class CodeActionAdapter {
|
||||
private readonly _apiDeprecation: IExtHostApiDeprecationService,
|
||||
) { }
|
||||
|
||||
async provideCodeActions(resource: URI, rangeOrSelection: IRange | ISelection, context: modes.CodeActionContext, token: CancellationToken): Promise<extHostProtocol.ICodeActionListDto | undefined> {
|
||||
async provideCodeActions(resource: URI, rangeOrSelection: IRange | ISelection, context: languages.CodeActionContext, token: CancellationToken): Promise<extHostProtocol.ICodeActionListDto | undefined> {
|
||||
|
||||
const doc = this._documents.getDocument(resource);
|
||||
const ran = Selection.isISelection(rangeOrSelection)
|
||||
@@ -494,7 +494,7 @@ class DocumentFormattingAdapter {
|
||||
private readonly _provider: vscode.DocumentFormattingEditProvider
|
||||
) { }
|
||||
|
||||
async provideDocumentFormattingEdits(resource: URI, options: modes.FormattingOptions, token: CancellationToken): Promise<ISingleEditOperation[] | undefined> {
|
||||
async provideDocumentFormattingEdits(resource: URI, options: languages.FormattingOptions, token: CancellationToken): Promise<ISingleEditOperation[] | undefined> {
|
||||
|
||||
const document = this._documents.getDocument(resource);
|
||||
|
||||
@@ -513,7 +513,7 @@ class RangeFormattingAdapter {
|
||||
private readonly _provider: vscode.DocumentRangeFormattingEditProvider
|
||||
) { }
|
||||
|
||||
async provideDocumentRangeFormattingEdits(resource: URI, range: IRange, options: modes.FormattingOptions, token: CancellationToken): Promise<ISingleEditOperation[] | undefined> {
|
||||
async provideDocumentRangeFormattingEdits(resource: URI, range: IRange, options: languages.FormattingOptions, token: CancellationToken): Promise<ISingleEditOperation[] | undefined> {
|
||||
|
||||
const document = this._documents.getDocument(resource);
|
||||
const ran = typeConvert.Range.to(range);
|
||||
@@ -535,7 +535,7 @@ class OnTypeFormattingAdapter {
|
||||
|
||||
autoFormatTriggerCharacters: string[] = []; // not here
|
||||
|
||||
async provideOnTypeFormattingEdits(resource: URI, position: IPosition, ch: string, options: modes.FormattingOptions, token: CancellationToken): Promise<ISingleEditOperation[] | undefined> {
|
||||
async provideOnTypeFormattingEdits(resource: URI, position: IPosition, ch: string, options: languages.FormattingOptions, token: CancellationToken): Promise<ISingleEditOperation[] | undefined> {
|
||||
|
||||
const document = this._documents.getDocument(resource);
|
||||
const pos = typeConvert.Position.to(position);
|
||||
@@ -640,7 +640,7 @@ class RenameAdapter {
|
||||
}
|
||||
}
|
||||
|
||||
async resolveRenameLocation(resource: URI, position: IPosition, token: CancellationToken): Promise<(modes.RenameLocation & modes.Rejection) | undefined> {
|
||||
async resolveRenameLocation(resource: URI, position: IPosition, token: CancellationToken): Promise<(languages.RenameLocation & languages.Rejection) | undefined> {
|
||||
if (typeof this._provider.prepareRename !== 'function') {
|
||||
return Promise.resolve(undefined);
|
||||
}
|
||||
@@ -674,7 +674,7 @@ class RenameAdapter {
|
||||
} catch (err) {
|
||||
const rejectReason = RenameAdapter._asMessage(err);
|
||||
if (rejectReason) {
|
||||
return <modes.RenameLocation & modes.Rejection>{ rejectReason, range: undefined!, text: undefined! };
|
||||
return <languages.RenameLocation & languages.Rejection>{ rejectReason, range: undefined!, text: undefined! };
|
||||
} else {
|
||||
return Promise.reject<any>(err);
|
||||
}
|
||||
@@ -884,7 +884,7 @@ class SuggestAdapter {
|
||||
private readonly _extension: IExtensionDescription,
|
||||
) { }
|
||||
|
||||
async provideCompletionItems(resource: URI, position: IPosition, context: modes.CompletionContext, token: CancellationToken): Promise<extHostProtocol.ISuggestResultDto | undefined> {
|
||||
async provideCompletionItems(resource: URI, position: IPosition, context: languages.CompletionContext, token: CancellationToken): Promise<extHostProtocol.ISuggestResultDto | undefined> {
|
||||
|
||||
const doc = this._documents.getDocument(resource);
|
||||
const pos = typeConvert.Position.to(position);
|
||||
@@ -980,7 +980,7 @@ class SuggestAdapter {
|
||||
[extHostProtocol.ISuggestDataDtoField.sortText]: item.sortText !== item.label ? item.sortText : undefined,
|
||||
[extHostProtocol.ISuggestDataDtoField.filterText]: item.filterText !== item.label ? item.filterText : undefined,
|
||||
[extHostProtocol.ISuggestDataDtoField.preselect]: item.preselect || undefined,
|
||||
[extHostProtocol.ISuggestDataDtoField.insertTextRules]: item.keepWhitespace ? modes.CompletionItemInsertTextRule.KeepWhitespace : 0,
|
||||
[extHostProtocol.ISuggestDataDtoField.insertTextRules]: item.keepWhitespace ? languages.CompletionItemInsertTextRule.KeepWhitespace : 0,
|
||||
[extHostProtocol.ISuggestDataDtoField.commitCharacters]: item.commitCharacters,
|
||||
[extHostProtocol.ISuggestDataDtoField.additionalTextEdits]: item.additionalTextEdits && item.additionalTextEdits.map(typeConvert.TextEdit.from),
|
||||
[extHostProtocol.ISuggestDataDtoField.command]: this._commands.toInternal(item.command, disposables),
|
||||
@@ -996,7 +996,7 @@ class SuggestAdapter {
|
||||
|
||||
} else if (item.insertText instanceof SnippetString) {
|
||||
result[extHostProtocol.ISuggestDataDtoField.insertText] = item.insertText.value;
|
||||
result[extHostProtocol.ISuggestDataDtoField.insertTextRules]! |= modes.CompletionItemInsertTextRule.InsertAsSnippet;
|
||||
result[extHostProtocol.ISuggestDataDtoField.insertTextRules]! |= languages.CompletionItemInsertTextRule.InsertAsSnippet;
|
||||
}
|
||||
|
||||
// 'overwrite[Before|After]'-logic
|
||||
@@ -1033,7 +1033,7 @@ class InlineCompletionAdapter {
|
||||
private readonly _commands: CommandsConverter,
|
||||
) { }
|
||||
|
||||
public async provideInlineCompletions(resource: URI, position: IPosition, context: modes.InlineCompletionContext, token: CancellationToken): Promise<extHostProtocol.IdentifiableInlineCompletions | undefined> {
|
||||
public async provideInlineCompletions(resource: URI, position: IPosition, context: languages.InlineCompletionContext, token: CancellationToken): Promise<extHostProtocol.IdentifiableInlineCompletions | undefined> {
|
||||
const doc = this._documents.getDocument(resource);
|
||||
const pos = typeConvert.Position.to(position);
|
||||
|
||||
@@ -1069,7 +1069,7 @@ class InlineCompletionAdapter {
|
||||
return {
|
||||
pid,
|
||||
items: normalizedResult.items.map<extHostProtocol.IdentifiableInlineCompletion>((item, idx) => {
|
||||
let command: modes.Command | undefined = undefined;
|
||||
let command: languages.Command | undefined = undefined;
|
||||
if (item.command) {
|
||||
if (!disposableStore) {
|
||||
disposableStore = new DisposableStore();
|
||||
@@ -1268,7 +1268,7 @@ class InlayHintsAdapter {
|
||||
result.label = hint.label;
|
||||
} else {
|
||||
result.label = hint.label.map(part => {
|
||||
let result: modes.InlayHintLabelPart = { label: part.label };
|
||||
let result: languages.InlayHintLabelPart = { label: part.label };
|
||||
result.tooltip = part.tooltip && typeConvert.MarkdownString.from(part.tooltip);
|
||||
if (Location.isLocation(part.location)) {
|
||||
result.location = typeConvert.location.from(part.location);
|
||||
@@ -1377,7 +1377,7 @@ class ColorProviderAdapter {
|
||||
return colorInfos;
|
||||
}
|
||||
|
||||
async provideColorPresentations(resource: URI, raw: extHostProtocol.IRawColorInfo, token: CancellationToken): Promise<modes.IColorPresentation[] | undefined> {
|
||||
async provideColorPresentations(resource: URI, raw: extHostProtocol.IRawColorInfo, token: CancellationToken): Promise<languages.IColorPresentation[] | undefined> {
|
||||
const document = this._documents.getDocument(resource);
|
||||
const range = typeConvert.Range.to(raw.range);
|
||||
const color = typeConvert.Color.to(raw.color);
|
||||
@@ -1396,7 +1396,7 @@ class FoldingProviderAdapter {
|
||||
private _provider: vscode.FoldingRangeProvider
|
||||
) { }
|
||||
|
||||
async provideFoldingRanges(resource: URI, context: modes.FoldingContext, token: CancellationToken): Promise<modes.FoldingRange[] | undefined> {
|
||||
async provideFoldingRanges(resource: URI, context: languages.FoldingContext, token: CancellationToken): Promise<languages.FoldingRange[] | undefined> {
|
||||
const doc = this._documents.getDocument(resource);
|
||||
const ranges = await this._provider.provideFoldingRanges(doc, context, token);
|
||||
if (!Array.isArray(ranges)) {
|
||||
@@ -1414,7 +1414,7 @@ class SelectionRangeAdapter {
|
||||
private readonly _logService: ILogService
|
||||
) { }
|
||||
|
||||
async provideSelectionRanges(resource: URI, pos: IPosition[], token: CancellationToken): Promise<modes.SelectionRange[][]> {
|
||||
async provideSelectionRanges(resource: URI, pos: IPosition[], token: CancellationToken): Promise<languages.SelectionRange[][]> {
|
||||
const document = this._documents.getDocument(resource);
|
||||
const positions = pos.map(typeConvert.Position.to);
|
||||
|
||||
@@ -1426,9 +1426,9 @@ class SelectionRangeAdapter {
|
||||
this._logService.warn('BAD selection ranges, provider must return ranges for each position');
|
||||
return [];
|
||||
}
|
||||
const allResults: modes.SelectionRange[][] = [];
|
||||
const allResults: languages.SelectionRange[][] = [];
|
||||
for (let i = 0; i < positions.length; i++) {
|
||||
const oneResult: modes.SelectionRange[] = [];
|
||||
const oneResult: languages.SelectionRange[] = [];
|
||||
allResults.push(oneResult);
|
||||
|
||||
let last: vscode.Position | vscode.Range = positions[i];
|
||||
@@ -1718,7 +1718,7 @@ export class ExtHostLanguageFeatures implements extHostProtocol.ExtHostLanguageF
|
||||
return this._createDisposable(handle);
|
||||
}
|
||||
|
||||
$provideDocumentSymbols(handle: number, resource: UriComponents, token: CancellationToken): Promise<modes.DocumentSymbol[] | undefined> {
|
||||
$provideDocumentSymbols(handle: number, resource: UriComponents, token: CancellationToken): Promise<languages.DocumentSymbol[] | undefined> {
|
||||
return this._withAdapter(handle, DocumentSymbolAdapter, adapter => adapter.provideDocumentSymbols(URI.revive(resource), token), undefined, token);
|
||||
}
|
||||
|
||||
@@ -1760,7 +1760,7 @@ export class ExtHostLanguageFeatures implements extHostProtocol.ExtHostLanguageF
|
||||
return this._createDisposable(handle);
|
||||
}
|
||||
|
||||
$provideDefinition(handle: number, resource: UriComponents, position: IPosition, token: CancellationToken): Promise<modes.LocationLink[]> {
|
||||
$provideDefinition(handle: number, resource: UriComponents, position: IPosition, token: CancellationToken): Promise<languages.LocationLink[]> {
|
||||
return this._withAdapter(handle, DefinitionAdapter, adapter => adapter.provideDefinition(URI.revive(resource), position, token), [], token);
|
||||
}
|
||||
|
||||
@@ -1770,7 +1770,7 @@ export class ExtHostLanguageFeatures implements extHostProtocol.ExtHostLanguageF
|
||||
return this._createDisposable(handle);
|
||||
}
|
||||
|
||||
$provideDeclaration(handle: number, resource: UriComponents, position: IPosition, token: CancellationToken): Promise<modes.LocationLink[]> {
|
||||
$provideDeclaration(handle: number, resource: UriComponents, position: IPosition, token: CancellationToken): Promise<languages.LocationLink[]> {
|
||||
return this._withAdapter(handle, DeclarationAdapter, adapter => adapter.provideDeclaration(URI.revive(resource), position, token), [], token);
|
||||
}
|
||||
|
||||
@@ -1780,7 +1780,7 @@ export class ExtHostLanguageFeatures implements extHostProtocol.ExtHostLanguageF
|
||||
return this._createDisposable(handle);
|
||||
}
|
||||
|
||||
$provideImplementation(handle: number, resource: UriComponents, position: IPosition, token: CancellationToken): Promise<modes.LocationLink[]> {
|
||||
$provideImplementation(handle: number, resource: UriComponents, position: IPosition, token: CancellationToken): Promise<languages.LocationLink[]> {
|
||||
return this._withAdapter(handle, ImplementationAdapter, adapter => adapter.provideImplementation(URI.revive(resource), position, token), [], token);
|
||||
}
|
||||
|
||||
@@ -1790,7 +1790,7 @@ export class ExtHostLanguageFeatures implements extHostProtocol.ExtHostLanguageF
|
||||
return this._createDisposable(handle);
|
||||
}
|
||||
|
||||
$provideTypeDefinition(handle: number, resource: UriComponents, position: IPosition, token: CancellationToken): Promise<modes.LocationLink[]> {
|
||||
$provideTypeDefinition(handle: number, resource: UriComponents, position: IPosition, token: CancellationToken): Promise<languages.LocationLink[]> {
|
||||
return this._withAdapter(handle, TypeDefinitionAdapter, adapter => adapter.provideTypeDefinition(URI.revive(resource), position, token), [], token);
|
||||
}
|
||||
|
||||
@@ -1802,7 +1802,7 @@ export class ExtHostLanguageFeatures implements extHostProtocol.ExtHostLanguageF
|
||||
return this._createDisposable(handle);
|
||||
}
|
||||
|
||||
$provideHover(handle: number, resource: UriComponents, position: IPosition, token: CancellationToken): Promise<modes.Hover | undefined> {
|
||||
$provideHover(handle: number, resource: UriComponents, position: IPosition, token: CancellationToken): Promise<languages.Hover | undefined> {
|
||||
return this._withAdapter(handle, HoverAdapter, adapter => adapter.provideHover(URI.revive(resource), position, token), undefined, token);
|
||||
}
|
||||
|
||||
@@ -1814,7 +1814,7 @@ export class ExtHostLanguageFeatures implements extHostProtocol.ExtHostLanguageF
|
||||
return this._createDisposable(handle);
|
||||
}
|
||||
|
||||
$provideEvaluatableExpression(handle: number, resource: UriComponents, position: IPosition, token: CancellationToken): Promise<modes.EvaluatableExpression | undefined> {
|
||||
$provideEvaluatableExpression(handle: number, resource: UriComponents, position: IPosition, token: CancellationToken): Promise<languages.EvaluatableExpression | undefined> {
|
||||
return this._withAdapter(handle, EvaluatableExpressionAdapter, adapter => adapter.provideEvaluatableExpression(URI.revive(resource), position, token), undefined, token);
|
||||
}
|
||||
|
||||
@@ -1835,7 +1835,7 @@ export class ExtHostLanguageFeatures implements extHostProtocol.ExtHostLanguageF
|
||||
return result;
|
||||
}
|
||||
|
||||
$provideInlineValues(handle: number, resource: UriComponents, range: IRange, context: extHostProtocol.IInlineValueContextDto, token: CancellationToken): Promise<modes.InlineValue[] | undefined> {
|
||||
$provideInlineValues(handle: number, resource: UriComponents, range: IRange, context: extHostProtocol.IInlineValueContextDto, token: CancellationToken): Promise<languages.InlineValue[] | undefined> {
|
||||
return this._withAdapter(handle, InlineValuesAdapter, adapter => adapter.provideInlineValues(URI.revive(resource), range, context, token), undefined, token);
|
||||
}
|
||||
|
||||
@@ -1847,7 +1847,7 @@ export class ExtHostLanguageFeatures implements extHostProtocol.ExtHostLanguageF
|
||||
return this._createDisposable(handle);
|
||||
}
|
||||
|
||||
$provideDocumentHighlights(handle: number, resource: UriComponents, position: IPosition, token: CancellationToken): Promise<modes.DocumentHighlight[] | undefined> {
|
||||
$provideDocumentHighlights(handle: number, resource: UriComponents, position: IPosition, token: CancellationToken): Promise<languages.DocumentHighlight[] | undefined> {
|
||||
return this._withAdapter(handle, DocumentHighlightAdapter, adapter => adapter.provideDocumentHighlights(URI.revive(resource), position, token), undefined, token);
|
||||
}
|
||||
|
||||
@@ -1880,7 +1880,7 @@ export class ExtHostLanguageFeatures implements extHostProtocol.ExtHostLanguageF
|
||||
return this._createDisposable(handle);
|
||||
}
|
||||
|
||||
$provideReferences(handle: number, resource: UriComponents, position: IPosition, context: modes.ReferenceContext, token: CancellationToken): Promise<modes.Location[] | undefined> {
|
||||
$provideReferences(handle: number, resource: UriComponents, position: IPosition, context: languages.ReferenceContext, token: CancellationToken): Promise<languages.Location[] | undefined> {
|
||||
return this._withAdapter(handle, ReferenceAdapter, adapter => adapter.provideReferences(URI.revive(resource), position, context, token), undefined, token);
|
||||
}
|
||||
|
||||
@@ -1901,7 +1901,7 @@ export class ExtHostLanguageFeatures implements extHostProtocol.ExtHostLanguageF
|
||||
}
|
||||
|
||||
|
||||
$provideCodeActions(handle: number, resource: UriComponents, rangeOrSelection: IRange | ISelection, context: modes.CodeActionContext, token: CancellationToken): Promise<extHostProtocol.ICodeActionListDto | undefined> {
|
||||
$provideCodeActions(handle: number, resource: UriComponents, rangeOrSelection: IRange | ISelection, context: languages.CodeActionContext, token: CancellationToken): Promise<extHostProtocol.ICodeActionListDto | undefined> {
|
||||
return this._withAdapter(handle, CodeActionAdapter, adapter => adapter.provideCodeActions(URI.revive(resource), rangeOrSelection, context, token), undefined, token);
|
||||
}
|
||||
|
||||
@@ -1921,7 +1921,7 @@ export class ExtHostLanguageFeatures implements extHostProtocol.ExtHostLanguageF
|
||||
return this._createDisposable(handle);
|
||||
}
|
||||
|
||||
$provideDocumentFormattingEdits(handle: number, resource: UriComponents, options: modes.FormattingOptions, token: CancellationToken): Promise<ISingleEditOperation[] | undefined> {
|
||||
$provideDocumentFormattingEdits(handle: number, resource: UriComponents, options: languages.FormattingOptions, token: CancellationToken): Promise<ISingleEditOperation[] | undefined> {
|
||||
return this._withAdapter(handle, DocumentFormattingAdapter, adapter => adapter.provideDocumentFormattingEdits(URI.revive(resource), options, token), undefined, token);
|
||||
}
|
||||
|
||||
@@ -1931,7 +1931,7 @@ export class ExtHostLanguageFeatures implements extHostProtocol.ExtHostLanguageF
|
||||
return this._createDisposable(handle);
|
||||
}
|
||||
|
||||
$provideDocumentRangeFormattingEdits(handle: number, resource: UriComponents, range: IRange, options: modes.FormattingOptions, token: CancellationToken): Promise<ISingleEditOperation[] | undefined> {
|
||||
$provideDocumentRangeFormattingEdits(handle: number, resource: UriComponents, range: IRange, options: languages.FormattingOptions, token: CancellationToken): Promise<ISingleEditOperation[] | undefined> {
|
||||
return this._withAdapter(handle, RangeFormattingAdapter, adapter => adapter.provideDocumentRangeFormattingEdits(URI.revive(resource), range, options, token), undefined, token);
|
||||
}
|
||||
|
||||
@@ -1941,7 +1941,7 @@ export class ExtHostLanguageFeatures implements extHostProtocol.ExtHostLanguageF
|
||||
return this._createDisposable(handle);
|
||||
}
|
||||
|
||||
$provideOnTypeFormattingEdits(handle: number, resource: UriComponents, position: IPosition, ch: string, options: modes.FormattingOptions, token: CancellationToken): Promise<ISingleEditOperation[] | undefined> {
|
||||
$provideOnTypeFormattingEdits(handle: number, resource: UriComponents, position: IPosition, ch: string, options: languages.FormattingOptions, token: CancellationToken): Promise<ISingleEditOperation[] | undefined> {
|
||||
return this._withAdapter(handle, OnTypeFormattingAdapter, adapter => adapter.provideOnTypeFormattingEdits(URI.revive(resource), position, ch, options, token), undefined, token);
|
||||
}
|
||||
|
||||
@@ -1977,7 +1977,7 @@ export class ExtHostLanguageFeatures implements extHostProtocol.ExtHostLanguageF
|
||||
return this._withAdapter(handle, RenameAdapter, adapter => adapter.provideRenameEdits(URI.revive(resource), position, newName, token), undefined, token);
|
||||
}
|
||||
|
||||
$resolveRenameLocation(handle: number, resource: URI, position: IPosition, token: CancellationToken): Promise<modes.RenameLocation | undefined> {
|
||||
$resolveRenameLocation(handle: number, resource: URI, position: IPosition, token: CancellationToken): Promise<languages.RenameLocation | undefined> {
|
||||
return this._withAdapter(handle, RenameAdapter, adapter => adapter.resolveRenameLocation(URI.revive(resource), position, token), undefined, token);
|
||||
}
|
||||
|
||||
@@ -2025,7 +2025,7 @@ export class ExtHostLanguageFeatures implements extHostProtocol.ExtHostLanguageF
|
||||
return this._createDisposable(handle);
|
||||
}
|
||||
|
||||
$provideCompletionItems(handle: number, resource: UriComponents, position: IPosition, context: modes.CompletionContext, token: CancellationToken): Promise<extHostProtocol.ISuggestResultDto | undefined> {
|
||||
$provideCompletionItems(handle: number, resource: UriComponents, position: IPosition, context: languages.CompletionContext, token: CancellationToken): Promise<extHostProtocol.ISuggestResultDto | undefined> {
|
||||
return this._withAdapter(handle, SuggestAdapter, adapter => adapter.provideCompletionItems(URI.revive(resource), position, context, token), undefined, token);
|
||||
}
|
||||
|
||||
@@ -2045,7 +2045,7 @@ export class ExtHostLanguageFeatures implements extHostProtocol.ExtHostLanguageF
|
||||
return this._createDisposable(handle);
|
||||
}
|
||||
|
||||
$provideInlineCompletions(handle: number, resource: UriComponents, position: IPosition, context: modes.InlineCompletionContext, token: CancellationToken): Promise<extHostProtocol.IdentifiableInlineCompletions | undefined> {
|
||||
$provideInlineCompletions(handle: number, resource: UriComponents, position: IPosition, context: languages.InlineCompletionContext, token: CancellationToken): Promise<extHostProtocol.IdentifiableInlineCompletions | undefined> {
|
||||
return this._withAdapter(handle, InlineCompletionAdapter, adapter => adapter.provideInlineCompletions(URI.revive(resource), position, context, token), undefined, token);
|
||||
}
|
||||
|
||||
@@ -2138,7 +2138,7 @@ export class ExtHostLanguageFeatures implements extHostProtocol.ExtHostLanguageF
|
||||
return this._withAdapter(handle, ColorProviderAdapter, adapter => adapter.provideColors(URI.revive(resource), token), [], token);
|
||||
}
|
||||
|
||||
$provideColorPresentations(handle: number, resource: UriComponents, colorInfo: extHostProtocol.IRawColorInfo, token: CancellationToken): Promise<modes.IColorPresentation[] | undefined> {
|
||||
$provideColorPresentations(handle: number, resource: UriComponents, colorInfo: extHostProtocol.IRawColorInfo, token: CancellationToken): Promise<languages.IColorPresentation[] | undefined> {
|
||||
return this._withAdapter(handle, ColorProviderAdapter, adapter => adapter.provideColorPresentations(URI.revive(resource), colorInfo, token), undefined, token);
|
||||
}
|
||||
|
||||
@@ -2158,7 +2158,7 @@ export class ExtHostLanguageFeatures implements extHostProtocol.ExtHostLanguageF
|
||||
return result;
|
||||
}
|
||||
|
||||
$provideFoldingRanges(handle: number, resource: UriComponents, context: vscode.FoldingContext, token: CancellationToken): Promise<modes.FoldingRange[] | undefined> {
|
||||
$provideFoldingRanges(handle: number, resource: UriComponents, context: vscode.FoldingContext, token: CancellationToken): Promise<languages.FoldingRange[] | undefined> {
|
||||
return this._withAdapter(handle, FoldingProviderAdapter, adapter => adapter.provideFoldingRanges(URI.revive(resource), context, token), undefined, token);
|
||||
}
|
||||
|
||||
@@ -2170,7 +2170,7 @@ export class ExtHostLanguageFeatures implements extHostProtocol.ExtHostLanguageF
|
||||
return this._createDisposable(handle);
|
||||
}
|
||||
|
||||
$provideSelectionRanges(handle: number, resource: UriComponents, positions: IPosition[], token: CancellationToken): Promise<modes.SelectionRange[][]> {
|
||||
$provideSelectionRanges(handle: number, resource: UriComponents, positions: IPosition[], token: CancellationToken): Promise<languages.SelectionRange[][]> {
|
||||
return this._withAdapter(handle, SelectionRangeAdapter, adapter => adapter.provideSelectionRanges(URI.revive(resource), positions, token), [], token);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user