|
|
|
@ -2,12 +2,14 @@ package com.fr.start.module;
|
|
|
|
|
|
|
|
|
|
import com.fr.design.DesignerEnvManager; |
|
|
|
|
import com.fr.design.env.DesignerWorkspaceGenerator; |
|
|
|
|
import com.fr.design.env.DesignerWorkspaceInfo; |
|
|
|
|
import com.fr.design.mainframe.TemplatePane; |
|
|
|
|
import com.fr.general.ComparatorUtils; |
|
|
|
|
import com.fr.module.Activator; |
|
|
|
|
|
|
|
|
|
import com.fr.workspace.WorkContext; |
|
|
|
|
import com.fr.workspace.Workspace; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* Created by juhaoyu on 2018/1/8. |
|
|
|
|
* 设计器启动时的环境相关模块activator |
|
|
|
@ -24,8 +26,10 @@ public class DesignerWorkspaceProvider extends Activator {
|
|
|
|
|
} else { |
|
|
|
|
try { |
|
|
|
|
String current = DesignerEnvManager.getEnvManager().getCurEnvName(); |
|
|
|
|
Workspace workspace = DesignerWorkspaceGenerator.generate(DesignerEnvManager.getEnvManager().getWorkspaceInfo(current)); |
|
|
|
|
if (workspace == null) { |
|
|
|
|
DesignerWorkspaceInfo workspaceInfo = DesignerEnvManager.getEnvManager().getWorkspaceInfo(current); |
|
|
|
|
Workspace workspace = DesignerWorkspaceGenerator.generate(workspaceInfo); |
|
|
|
|
boolean checkValid = workspace == null ? false : workspaceInfo.checkValid(); |
|
|
|
|
if (!checkValid) { |
|
|
|
|
TemplatePane.getInstance().dealEvnExceptionWhenStartDesigner(); |
|
|
|
|
} else { |
|
|
|
|
WorkContext.switchTo(workspace); |
|
|
|
|