Protected ReadonlyerrorProtected ReadonlyloggerProtected ReadonlyonProtected ReadonlyonProtected ReadonlyonProtectedsaveProtectedsaveProtectedsaveProtectedsaveProtectedshellProtected ReadonlywindowProtectedapplyOptionalwidget: WidgetOptionalsaveable: WidgetOptionalwidget: WidgetProtectedcloseProtectedcloseOptionaloptions: 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: SaveOptionsOptionaloptions: SaveOptionsProtectedsaveSave all dirty saveables when the application window loses focus.
Triggered for both onFocusChange and onWindowChange auto-save modes,
matching VSCode's behavior where a window focus loss is a superset of
editor focus loss.
ProtectedshouldProtectedshouldOptionaloptions: SaveableWidget.CloseOptionsProtectedupdateProtectedupdatewhether closing the given widget would discard changes, i.e. whether it is dirty and not saved automatically
Indicate if the document can be saved ('Save' command should be disable if not).