From a11aa4822d5f4ca5e753ce021e52455721ae6c35 Mon Sep 17 00:00:00 2001 From: Maksim Date: Fri, 28 Feb 2020 16:43:45 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=BE=E8=AE=A1=E5=99=A8=E5=90=AF=E5=8A=A8?= =?UTF-8?q?=E6=97=B6=EF=BC=8C=E5=81=9A=E4=B8=80=E6=AC=A1=E6=9C=8D=E5=8A=A1?= =?UTF-8?q?=E6=A3=80=E6=B5=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../start/module/DesignerWorkspaceProvider.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/designer-realize/src/main/java/com/fr/start/module/DesignerWorkspaceProvider.java b/designer-realize/src/main/java/com/fr/start/module/DesignerWorkspaceProvider.java index 7d63571ad..e0fc4dfe9 100644 --- a/designer-realize/src/main/java/com/fr/start/module/DesignerWorkspaceProvider.java +++ b/designer-realize/src/main/java/com/fr/start/module/DesignerWorkspaceProvider.java @@ -6,6 +6,10 @@ import com.fr.design.constants.DesignerLaunchStatus; import com.fr.design.env.DesignerWorkspaceGenerator; import com.fr.design.env.DesignerWorkspaceInfo; import com.fr.design.env.LocalDesignerWorkspaceInfo; +import com.fr.event.Event; +import com.fr.event.EventDispatcher; +import com.fr.event.Listener; +import com.fr.event.Null; import com.fr.log.FineLoggerFactory; import com.fr.module.Activator; import com.fr.stable.StringUtils; @@ -54,6 +58,18 @@ public class DesignerWorkspaceProvider extends Activator { EnvChangeEntrance.getInstance().dealEvnExceptionWhenStartDesigner(); } else { WorkContext.switchTo(workspace); + //在设计器完全启动完成后,对初始环境进行一次服务检测,对主要功能无影响,异常仅做日志提示即可 + final DesignerWorkspaceInfo selectEnv = workspaceInfo; + EventDispatcher.listen(DesignerLaunchStatus.STARTUP_COMPLETE, new Listener() { + @Override + public void on(Event event, Null aNull) { + try { + EnvChangeEntrance.getInstance().showServiceDialog(selectEnv); + } catch (Exception e) { + FineLoggerFactory.getLogger().warn("Check Service Failed"); + } + } + }); } } catch (Throwable e) { FineLoggerFactory.getLogger().error(e.getMessage(), e);