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