MCPcopy Index your code
hub / github.com/alibaba/lowcode-engine / initWindow

Method initWindow

packages/workspace/src/workspace.ts:140–157  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

138 }
139
140 async initWindow() {
141 if (!this.defaultResourceType || this.enableAutoOpenFirstWindow === false) {
142 return;
143 }
144 const resourceName = this.defaultResourceType.name;
145 const resource = new Resource({
146 resourceName,
147 options: {},
148 }, this.defaultResourceType, this);
149 this.window = new EditorWindow(resource, this, {
150 title: resource.title,
151 });
152 await this.window.init();
153 this.editorWindowMap.set(this.window.id, this.window);
154 this.windows = [...this.windows, this.window];
155 this.emitChangeWindow();
156 this.emitChangeActiveWindow();
157 }
158
159 setActive(value: boolean) {
160 this._isActive = value;

Callers 1

registerResourceTypeMethod · 0.95

Calls 4

emitChangeWindowMethod · 0.95
initMethod · 0.65
setMethod · 0.65

Tested by

no test coverage detected