| 27 | private readonly [innerProjectSymbol]: InnerProject; |
| 28 | private [simulatorHostSymbol]: BuiltinSimulatorHost; |
| 29 | get [projectSymbol](): InnerProject { |
| 30 | if (this.workspaceMode) { |
| 31 | return this[innerProjectSymbol]; |
| 32 | } |
| 33 | const workspace = globalContext.get('workspace'); |
| 34 | if (workspace.isActive) { |
| 35 | if (!workspace.window?.innerProject) { |
| 36 | logger.error('project api 调用时机出现问题,请检查'); |
| 37 | return this[innerProjectSymbol]; |
| 38 | } |
| 39 | return workspace.window.innerProject; |
| 40 | } |
| 41 | |
| 42 | return this[innerProjectSymbol]; |
| 43 | } |
| 44 | |
| 45 | get [editorSymbol](): IPublicModelEditor { |
| 46 | return this[projectSymbol]?.designer.editor; |