Protected ReadonlyaboutProtected ReadonlyauthenticationProtected ReadonlyclipboardProtected ReadonlycommandProtectedcommonProtected ReadonlycontextProtected ReadonlyencodingProtected ReadonlyenvironmentsProtected ReadonlyiconProtectedinputProtected ReadonlylanguageProtected ReadonlylocalizationProtected ReadonlymenuProtected ReadonlymessageProtected ReadonlyopenerProtectedpinnedProtected ReadonlypreferencesProtected ReadonlypreferenceProtected ReadonlyquickProtected ReadonlyresourceProtected ReadonlysaveProtected ReadonlyselectionProtected ReadonlyshellProtectedshouldProtected ReadonlystorageProtected ReadonlythemeProtected ReadonlyundoProtected ReadonlyuntitledProtected ReadonlywindowProtected ReadonlyworkingCalled before commands, key bindings and menus are initialized. Should return a promise if it runs asynchronously.
ProtectedconfigureProtectedconfirmProtectedgetProtectedhandleProtectedinitProtectedisProtectedisCalled when the application is started. The application shell is not attached yet when this method runs. Should return a promise if it runs asynchronously.
Called when an application is stopped or unloaded.
Note that this is implemented using window.beforeunload which doesn't allow any asynchronous code anymore.
I.e. this is the last tick.
Called on beforeunload event, right before the window closes.
Return true or an OnWillStopAction in order to prevent exit.
Note: No async code allowed, this function has to run on one tick.
ProtectedopenProtectedregisterregisters event listener which make sure that window doesn't get closed if CMD/CTRL W is pressed. Too many users have that in their muscle memory. Chrome doesn't let us rebind or prevent default the keybinding, so this at least doesn't close the window immediately.
ProtectedsaveOptionaloptions: SaveOptionsProtectedsavesaves any dirty widget in toSave side effect - will pop all widgets from toSave that was saved
ProtectedselectProtectedselectProtectedsetProtectedsetProtectedshowProtectedtoggleProtectedtoggleProtectedunsavedProtectedunsavedProtectedupdateProtectedupdateProtectedupdate
Representation of a menu contribution.
Note that there are also convenience classes which combine multiple contributions into one. For example to register a view together with a menu and keybinding you could use AbstractViewContribution instead.
Example usage