Updated Working Copies (markdown)
Родитель
4286c3b199
Коммит
61a1f1c9f9
|
@ -16,6 +16,8 @@ The fundamental pieces of a working copy are:
|
|||
* events (`onDidChangeDirty`, `onDidChangeContent`, `onDidSave`): to provide dirty tracking and backup support
|
||||
* methods (`backup`, `save`, `revert`): to actually provide the necessary implementation for the workbench to call on
|
||||
|
||||
**Note:** you will likely already have a model in your component that can map directly onto the working copy shape. For example, the `ITextFileModel` that is used for every textual edit in files implements `IWorkingCopy` so that essentially the text file model IS the working copy that gets registered.
|
||||
|
||||
### Lifecycle
|
||||
As soon as your working copy comes to existence, call `IWorkingCopyService.registerWorkingCopy`. From that moment on, the workbench will observe the working copy for changes using its events.
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче