rename it to prepareRename, #48700

This commit is contained in:
Johannes Rieken
2018-04-26 18:03:52 +02:00
parent 39748bd8b8
commit 6f4d130ae5
2 changed files with 4 additions and 4 deletions

View File

@@ -471,7 +471,7 @@ class NavigateTypeAdapter {
class RenameAdapter {
static supportsResolving(provider: vscode.RenameProvider): boolean {
return typeof provider.resolveRenameLocation === 'function';
return typeof provider.prepareRename === 'function';
}
private _documents: ExtHostDocuments;
@@ -511,14 +511,14 @@ class RenameAdapter {
}
resolveRenameLocation(resource: URI, position: IPosition): TPromise<modes.RenameLocation> {
if (typeof this._provider.resolveRenameLocation !== 'function') {
if (typeof this._provider.prepareRename !== 'function') {
return TPromise.as(undefined);
}
let doc = this._documents.getDocumentData(resource).document;
let pos = TypeConverters.toPosition(position);
return asWinJsPromise(token => this._provider.resolveRenameLocation(doc, pos, token)).then(rangeOrLocation => {
return asWinJsPromise(token => this._provider.prepareRename(doc, pos, token)).then(rangeOrLocation => {
let range: vscode.Range;
let text: string;