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