forked from fanruan/design
Browse Source
* commit '1ff55110dc3af9154fd7f5d3b94b4e46a26ed5ff': 无JIRA任务 预览demo有问题 设置环境和预览demo分开,预览demo不触发第二次切环境 无JIRA任务 预览demo有问题 设置环境和预览demo分开,预览demo不触发第二次切环境final/10.0
4 changed files with 60 additions and 58 deletions
@ -1,29 +0,0 @@
|
||||
package com.fr.start; |
||||
|
||||
import com.fr.design.DesignerEnvManager; |
||||
import com.fr.design.env.DesignerWorkspaceGenerator; |
||||
import com.fr.design.mainframe.TemplatePane; |
||||
import com.fr.workspace.WorkContext; |
||||
import com.fr.workspace.Workspace; |
||||
|
||||
/** |
||||
* Created by juhaoyu on 2018/1/31. |
||||
* 环境切换器 |
||||
*/ |
||||
public class EnvSwitcher { |
||||
|
||||
public void switch2LastEnv() { |
||||
try { |
||||
|
||||
String current = DesignerEnvManager.getEnvManager().getCurEnvName(); |
||||
Workspace workspace = DesignerWorkspaceGenerator.generate(DesignerEnvManager.getEnvManager().getWorkspaceInfo(current)); |
||||
if (workspace == null) { |
||||
TemplatePane.getInstance().dealEvnExceptionWhenStartDesigner(); |
||||
} else { |
||||
WorkContext.switchTo(workspace); |
||||
} |
||||
} catch (Throwable e) { |
||||
TemplatePane.getInstance().dealEvnExceptionWhenStartDesigner(); |
||||
} |
||||
} |
||||
} |
Loading…
Reference in new issue