|
|
|
@ -1,14 +1,16 @@
|
|
|
|
|
package com.fr.start.module; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import com.fr.design.DesignerEnvManager; |
|
|
|
|
import com.fr.design.mainframe.DesignerContext; |
|
|
|
|
import com.fr.event.Event; |
|
|
|
|
import com.fr.event.Listener; |
|
|
|
|
import com.fr.general.ComparatorUtils; |
|
|
|
|
import com.fr.module.Activator; |
|
|
|
|
import com.fr.record.analyzer.EnableMetrics; |
|
|
|
|
import com.fr.record.analyzer.Metrics; |
|
|
|
|
import com.fr.start.Designer; |
|
|
|
|
import com.fr.start.EnvSwitcher; |
|
|
|
|
import com.fr.start.ServerStarter; |
|
|
|
|
import com.fr.start.SplashContext; |
|
|
|
|
import com.fr.startup.activators.BasicActivator; |
|
|
|
|
import com.fr.workspace.Workspace; |
|
|
|
@ -31,10 +33,20 @@ public class DesignerStartup extends Activator {
|
|
|
|
|
startSub(BasicActivator.class); |
|
|
|
|
final String[] args = getModule().upFindSingleton(StartupArgs.class).get(); |
|
|
|
|
final Designer designer = new Designer(args); |
|
|
|
|
//启动env
|
|
|
|
|
|
|
|
|
|
startSub(DesignerWorkspaceProvider.class); |
|
|
|
|
//启动env
|
|
|
|
|
startSub(EnvBasedModule.class); |
|
|
|
|
getRoot().getSingleton(EnvSwitcher.class).switch2LastEnv(); |
|
|
|
|
|
|
|
|
|
if (args != null) { |
|
|
|
|
for (String arg : args) { |
|
|
|
|
if (ComparatorUtils.equals(arg, "demo")) { |
|
|
|
|
DesignerEnvManager.getEnvManager().setCurrentEnv2Default(); |
|
|
|
|
ServerStarter.browserDemoURL(); |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
ExecutorService service = Executors.newSingleThreadExecutor(); |
|
|
|
|
registerEnvListener(); |
|
|
|
|
service.submit(new Runnable() { |
|
|
|
|