Browse Source

REPORT-10385

research/10.0
Mata.Li 6 years ago
parent
commit
684b47e4c1
  1. 10
      designer-realize/src/main/java/com/fr/start/module/DesignerWorkspaceProvider.java

10
designer-realize/src/main/java/com/fr/start/module/DesignerWorkspaceProvider.java

@ -2,12 +2,16 @@ 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.stable.StableUtils;
import com.fr.workspace.WorkContext;
import com.fr.workspace.Workspace;
import java.io.File;
/**
* Created by juhaoyu on 2018/1/8.
* 设计器启动时的环境相关模块activator
@ -24,8 +28,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);

Loading…
Cancel
Save