diff --git a/src/vs/vscode.proposed.d.ts b/src/vs/vscode.proposed.d.ts index c726e767cde64..a4ec5e7278e98 100644 --- a/src/vs/vscode.proposed.d.ts +++ b/src/vs/vscode.proposed.d.ts @@ -1415,7 +1415,7 @@ declare module 'vscode' { * as needing confirmation by the user. The editor groups edits with equal labels into tree nodes, * for instance all edits labelled with "Changes in Strings" would be a tree node. */ - export interface WorkspaceEditMetadata { + export interface WorkspaceEditEntryMetadata { /** * A flag which indicates that user confirmation is needed. @@ -1440,13 +1440,13 @@ declare module 'vscode' { export interface WorkspaceEdit { - insert(uri: Uri, position: Position, newText: string, metadata?: WorkspaceEditMetadata): void; - delete(uri: Uri, range: Range, metadata?: WorkspaceEditMetadata): void; - replace(uri: Uri, range: Range, newText: string, metadata?: WorkspaceEditMetadata): void; + insert(uri: Uri, position: Position, newText: string, metadata?: WorkspaceEditEntryMetadata): void; + delete(uri: Uri, range: Range, metadata?: WorkspaceEditEntryMetadata): void; + replace(uri: Uri, range: Range, newText: string, metadata?: WorkspaceEditEntryMetadata): void; - createFile(uri: Uri, options?: { overwrite?: boolean, ignoreIfExists?: boolean }, metadata?: WorkspaceEditMetadata): void; - deleteFile(uri: Uri, options?: { recursive?: boolean, ignoreIfNotExists?: boolean }, metadata?: WorkspaceEditMetadata): void; - renameFile(oldUri: Uri, newUri: Uri, options?: { overwrite?: boolean, ignoreIfExists?: boolean }, metadata?: WorkspaceEditMetadata): void; + createFile(uri: Uri, options?: { overwrite?: boolean, ignoreIfExists?: boolean }, metadata?: WorkspaceEditEntryMetadata): void; + deleteFile(uri: Uri, options?: { recursive?: boolean, ignoreIfNotExists?: boolean }, metadata?: WorkspaceEditEntryMetadata): void; + renameFile(oldUri: Uri, newUri: Uri, options?: { overwrite?: boolean, ignoreIfExists?: boolean }, metadata?: WorkspaceEditEntryMetadata): void; } //#endregion diff --git a/src/vs/workbench/api/common/extHostTypes.ts b/src/vs/workbench/api/common/extHostTypes.ts index f6871d7e2bdab..e08335045e3bb 100644 --- a/src/vs/workbench/api/common/extHostTypes.ts +++ b/src/vs/workbench/api/common/extHostTypes.ts @@ -576,14 +576,14 @@ export interface IFileOperation { from?: URI; to?: URI; options?: IFileOperationOptions; - metadata?: vscode.WorkspaceEditMetadata; + metadata?: vscode.WorkspaceEditEntryMetadata; } export interface IFileTextEdit { _type: 2; uri: URI; edit: TextEdit; - metadata?: vscode.WorkspaceEditMetadata; + metadata?: vscode.WorkspaceEditEntryMetadata; } @es5ClassCompat @@ -591,27 +591,27 @@ export class WorkspaceEdit implements vscode.WorkspaceEdit { private _edits = new Array(); - renameFile(from: vscode.Uri, to: vscode.Uri, options?: { overwrite?: boolean, ignoreIfExists?: boolean; }, metadata?: vscode.WorkspaceEditMetadata): void { + renameFile(from: vscode.Uri, to: vscode.Uri, options?: { overwrite?: boolean, ignoreIfExists?: boolean; }, metadata?: vscode.WorkspaceEditEntryMetadata): void { this._edits.push({ _type: 1, from, to, options, metadata }); } - createFile(uri: vscode.Uri, options?: { overwrite?: boolean, ignoreIfExists?: boolean; }, metadata?: vscode.WorkspaceEditMetadata): void { + createFile(uri: vscode.Uri, options?: { overwrite?: boolean, ignoreIfExists?: boolean; }, metadata?: vscode.WorkspaceEditEntryMetadata): void { this._edits.push({ _type: 1, from: undefined, to: uri, options, metadata }); } - deleteFile(uri: vscode.Uri, options?: { recursive?: boolean, ignoreIfNotExists?: boolean; }, metadata?: vscode.WorkspaceEditMetadata): void { + deleteFile(uri: vscode.Uri, options?: { recursive?: boolean, ignoreIfNotExists?: boolean; }, metadata?: vscode.WorkspaceEditEntryMetadata): void { this._edits.push({ _type: 1, from: uri, to: undefined, options, metadata }); } - replace(uri: URI, range: Range, newText: string, metadata?: vscode.WorkspaceEditMetadata): void { + replace(uri: URI, range: Range, newText: string, metadata?: vscode.WorkspaceEditEntryMetadata): void { this._edits.push({ _type: 2, uri, edit: new TextEdit(range, newText), metadata }); } - insert(resource: URI, position: Position, newText: string, metadata?: vscode.WorkspaceEditMetadata): void { + insert(resource: URI, position: Position, newText: string, metadata?: vscode.WorkspaceEditEntryMetadata): void { this.replace(resource, new Range(position, position), newText, metadata); } - delete(resource: URI, range: Range, metadata?: vscode.WorkspaceEditMetadata): void { + delete(resource: URI, range: Range, metadata?: vscode.WorkspaceEditEntryMetadata): void { this.replace(resource, range, '', metadata); }