MCPcopy Create free account
hub / github.com/material-shell/material-shell / openApp

Method openApp

src/manager/msWindowManager.ts:661–677  ·  view source on GitHub ↗
(app: Shell.App, msWorkspace: MsWorkspace, insert = false)

Source from the content-addressed store, hash-verified

659 }
660
661 openApp(app: Shell.App, msWorkspace: MsWorkspace, insert = false) {
662 if (app.can_open_new_window()) {
663 const msWindow = Me.msWindowManager!.createNewMsWindow(app, {
664 msWorkspace: msWorkspace,
665 focus: true,
666 insert: insert,
667 });
668 assert(
669 msWindow.lifecycleState.type === 'app-placeholder',
670 'Expected newly created window to be an app placeholder'
671 );
672 // This will cause an app to launch
673 msWindow.placeholder.activate();
674 } else {
675 app.activate();
676 }
677 }
678
679 async checkWindowsForAssignations() {
680 this.assignWindows();

Callers 3

activateResultMethod · 0.80
initAppListContainerMethod · 0.80

Calls 4

assertFunction · 0.90
can_open_new_windowMethod · 0.80
createNewMsWindowMethod · 0.80
activateMethod · 0.65

Tested by

no test coverage detected