Browse Source

REPORT-9619

master
Mata.Li 6 years ago
parent
commit
3b2abacbd1
  1. 7
      designer-realize/src/main/java/com/fr/start/module/DesignerStartup.java
  2. 4
      designer-realize/src/main/java/com/fr/start/module/DesignerWorkspaceProvider.java

7
designer-realize/src/main/java/com/fr/start/module/DesignerStartup.java

@ -31,10 +31,13 @@ public class DesignerStartup extends Activator {
startSub(BasicActivator.class); startSub(BasicActivator.class);
final String[] args = getModule().upFindSingleton(StartupArgs.class).get(); final String[] args = getModule().upFindSingleton(StartupArgs.class).get();
final Designer designer = new Designer(args); final Designer designer = new Designer(args);
getRoot().setSingleton(EnvSwitcher.class, new EnvSwitcher());
//设置好环境即可,具体跟环境有关的模块会自动调用
getRoot().getSingleton(EnvSwitcher.class).switch2LastEnv();
//启动env //启动env
startSub(DesignerWorkspaceProvider.class);
startSub(EnvBasedModule.class); startSub(EnvBasedModule.class);
getRoot().getSingleton(EnvSwitcher.class).switch2LastEnv(); startSub(DesignerWorkspaceProvider.class);
ExecutorService service = Executors.newSingleThreadExecutor(); ExecutorService service = Executors.newSingleThreadExecutor();
registerEnvListener(); registerEnvListener();
service.submit(new Runnable() { service.submit(new Runnable() {

4
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();
} }

Loading…
Cancel
Save