From 3b2abacbd144e1aa15e3bf05a1b250f35cfac70f Mon Sep 17 00:00:00 2001 From: "Mata.Li" Date: Wed, 18 Jul 2018 15:48:37 +0800 Subject: [PATCH] REPORT-9619 --- .../src/main/java/com/fr/start/module/DesignerStartup.java | 7 +++++-- .../com/fr/start/module/DesignerWorkspaceProvider.java | 4 ---- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/designer-realize/src/main/java/com/fr/start/module/DesignerStartup.java b/designer-realize/src/main/java/com/fr/start/module/DesignerStartup.java index 35e51ff8b..b5155bd91 100644 --- a/designer-realize/src/main/java/com/fr/start/module/DesignerStartup.java +++ b/designer-realize/src/main/java/com/fr/start/module/DesignerStartup.java @@ -31,10 +31,13 @@ public class DesignerStartup extends Activator { startSub(BasicActivator.class); final String[] args = getModule().upFindSingleton(StartupArgs.class).get(); final Designer designer = new Designer(args); + + getRoot().setSingleton(EnvSwitcher.class, new EnvSwitcher()); + //设置好环境即可,具体跟环境有关的模块会自动调用 + getRoot().getSingleton(EnvSwitcher.class).switch2LastEnv(); //启动env - startSub(DesignerWorkspaceProvider.class); startSub(EnvBasedModule.class); - getRoot().getSingleton(EnvSwitcher.class).switch2LastEnv(); + startSub(DesignerWorkspaceProvider.class); ExecutorService service = Executors.newSingleThreadExecutor(); registerEnvListener(); service.submit(new Runnable() { 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 3a2229229..cab3868fb 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 @@ -27,10 +27,6 @@ public class DesignerWorkspaceProvider extends Activator { } } } - - getRoot().setSingleton(EnvSwitcher.class, new EnvSwitcher()); - //设置好环境即可,具体跟环境有关的模块会自动调用 - getRoot().getSingleton(EnvSwitcher.class).switch2LastEnv(); }