()
| 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; |
no test coverage detected