Skip to content

Commit 6f4d130

Browse files
committed
rename it to prepareRename, microsoft#48700
1 parent 39748bd commit 6f4d130

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/vs/vscode.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2764,7 +2764,7 @@ declare module 'vscode' {
27642764
* @param token A cancellation token.
27652765
* @return The range or range and placeholder text of the identifier that is to be renamed. The lack of a result can signaled by returning `undefined` or `null`.
27662766
*/
2767-
resolveRenameLocation?(document: TextDocument, position: Position, token: CancellationToken): ProviderResult<Range | { range: Range, placeholder: string }>;
2767+
prepareRename?(document: TextDocument, position: Position, token: CancellationToken): ProviderResult<Range | { range: Range, placeholder: string }>;
27682768
}
27692769

27702770
/**

src/vs/workbench/api/node/extHostLanguageFeatures.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,7 @@ class NavigateTypeAdapter {
471471
class RenameAdapter {
472472

473473
static supportsResolving(provider: vscode.RenameProvider): boolean {
474-
return typeof provider.resolveRenameLocation === 'function';
474+
return typeof provider.prepareRename === 'function';
475475
}
476476

477477
private _documents: ExtHostDocuments;
@@ -511,14 +511,14 @@ class RenameAdapter {
511511
}
512512

513513
resolveRenameLocation(resource: URI, position: IPosition): TPromise<modes.RenameLocation> {
514-
if (typeof this._provider.resolveRenameLocation !== 'function') {
514+
if (typeof this._provider.prepareRename !== 'function') {
515515
return TPromise.as(undefined);
516516
}
517517

518518
let doc = this._documents.getDocumentData(resource).document;
519519
let pos = TypeConverters.toPosition(position);
520520

521-
return asWinJsPromise(token => this._provider.resolveRenameLocation(doc, pos, token)).then(rangeOrLocation => {
521+
return asWinJsPromise(token => this._provider.prepareRename(doc, pos, token)).then(rangeOrLocation => {
522522

523523
let range: vscode.Range;
524524
let text: string;

0 commit comments

Comments
 (0)