提交 f1310650 编写于 作者: J Johannes Rieken

update doc comment #52927

上级 53fd49b7
...@@ -701,10 +701,9 @@ declare module 'vscode' { ...@@ -701,10 +701,9 @@ declare module 'vscode' {
/** /**
* A workspace edit is a collection of textual and files changes for * A workspace edit is a collection of textual and files changes for
* multiple resources and documents. Use the [applyEdit](#workspace.applyEdit)-function * multiple resources and documents.
* to apply a workspace edit. Note that all changes are applied in the same order in which *
* they have been added and that invalid sequences like 'delete file a' -> 'insert text in * Use the [applyEdit](#workspace.applyEdit)-function to apply a workspace edit.
* file a' causes failure of the operation.
*/ */
export interface WorkspaceEdit { export interface WorkspaceEdit {
...@@ -739,13 +738,18 @@ declare module 'vscode' { ...@@ -739,13 +738,18 @@ declare module 'vscode' {
} }
export namespace workspace { export namespace workspace {
/** /**
* Make changes to one or many resources as defined by the given * Make changes to one or many resources or create, delete, and rename resources.
* [workspace edit](#WorkspaceEdit). *
* All changes of a workspace edit are applied in the same order in which they have been added. If
* multiple textual inserts are made at the same position, these strings appear in the resulting text
* in the order the 'inserts' were made. Invalid sequences like 'delete file a' -> 'insert text in file a'
* cause failure of the operation.
* *
* The editor implements an 'all-or-nothing'-strategy and that means failure to modify, * When applying a workspace edit that consists only of text edits an 'all-or-nothing'-strategy is used.
* delete, rename, or create one file will abort the operation. In that case, the thenable returned * A workspace edit with resource creations or deletions aborts the operation, e.g. consective edits will
* by this function resolves to `false`. * not be attempted, when a single edit fails.
* *
* @param edit A workspace edit. * @param edit A workspace edit.
* @return A thenable that resolves when the edit could be applied. * @return A thenable that resolves when the edit could be applied.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册