Protected ReadonlyfileProtected ReadonlyfileProtected ReadonlylabelProtected ReadonlymessageProtected ReadonlyonProtected ReadonlyonProtected ReadonlyopenerProtectedsaveProtectedsaveProtectedsaveProtectedshellProtectedaddProtectedapplyOptionalwidget: WidgetThis method ensures a few things about widget:
widget.getResourceUri() actually returns a URI.widget.saveable.createSnapshot or widget.saveable.serialize is defined.widget.saveable.revert is defined.Optionalwidget: WidgetProtectedcloseOptionaldoRevert: booleanProtectedcloseOptionaloptions: SaveableWidget.CloseOptionsProtectedcreateAn event is emitted when a layout is initialized, but before the shell is attached.
Saves the document
No op if the widget is not saveable.
Optionaloptions: SaveOptionsSave sourceWidget to a new file picked by the user.
Optionaloptions: SaveOptionsProtectedsaveSaves the current snapshot of the sourceWidget to the target file and replaces the widget with a new one that contains the snapshot content
widget to save as target.
The new URI for the widget.
ProtectedshouldProtectedshouldOptionaloptions: SaveableWidget.CloseOptionsProtectedupdateProtectedupdateProtectedwindow
Indicate if the document can be saved ('Save' command should be disable if not).