|
|
@ -3,14 +3,17 @@ package com.fr.start.module; |
|
|
|
import com.fr.design.DesignerEnvManager; |
|
|
|
import com.fr.design.DesignerEnvManager; |
|
|
|
import com.fr.design.RestartHelper; |
|
|
|
import com.fr.design.RestartHelper; |
|
|
|
import com.fr.design.fun.OemProcessor; |
|
|
|
import com.fr.design.fun.OemProcessor; |
|
|
|
|
|
|
|
import com.fr.design.i18n.Toolkit; |
|
|
|
import com.fr.design.mainframe.template.info.TemplateInfoCollector; |
|
|
|
import com.fr.design.mainframe.template.info.TemplateInfoCollector; |
|
|
|
import com.fr.design.utils.DesignUtils; |
|
|
|
import com.fr.design.utils.DesignUtils; |
|
|
|
import com.fr.design.utils.DesignerPort; |
|
|
|
import com.fr.design.utils.DesignerPort; |
|
|
|
|
|
|
|
import com.fr.event.EventDispatcher; |
|
|
|
import com.fr.general.CloudCenter; |
|
|
|
import com.fr.general.CloudCenter; |
|
|
|
import com.fr.general.ComparatorUtils; |
|
|
|
import com.fr.general.ComparatorUtils; |
|
|
|
import com.fr.general.GeneralContext; |
|
|
|
import com.fr.general.GeneralContext; |
|
|
|
import com.fr.log.FineLoggerFactory; |
|
|
|
import com.fr.log.FineLoggerFactory; |
|
|
|
import com.fr.module.Activator; |
|
|
|
import com.fr.module.Activator; |
|
|
|
|
|
|
|
import com.fr.module.ModuleEvent; |
|
|
|
import com.fr.stable.BuildContext; |
|
|
|
import com.fr.stable.BuildContext; |
|
|
|
import com.fr.stable.OperatingSystem; |
|
|
|
import com.fr.stable.OperatingSystem; |
|
|
|
import com.fr.stable.ProductConstants; |
|
|
|
import com.fr.stable.ProductConstants; |
|
|
@ -53,7 +56,6 @@ public class PreStartActivator extends Activator { |
|
|
|
SplashContext.getInstance().registerSplash(createSplash()); |
|
|
|
SplashContext.getInstance().registerSplash(createSplash()); |
|
|
|
|
|
|
|
|
|
|
|
SplashContext.getInstance().show(); |
|
|
|
SplashContext.getInstance().show(); |
|
|
|
|
|
|
|
|
|
|
|
// 完成初始化
|
|
|
|
// 完成初始化
|
|
|
|
//noinspection ResultOfMethodCallIgnored
|
|
|
|
//noinspection ResultOfMethodCallIgnored
|
|
|
|
CloudCenter.getInstance(); |
|
|
|
CloudCenter.getInstance(); |
|
|
@ -70,6 +72,7 @@ public class PreStartActivator extends Activator { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private void checkDebugStart() { |
|
|
|
private void checkDebugStart() { |
|
|
|
|
|
|
|
|
|
|
|
if (isDebug()) { |
|
|
|
if (isDebug()) { |
|
|
|
setDebugEnv(); |
|
|
|
setDebugEnv(); |
|
|
|
} |
|
|
|
} |
|
|
@ -82,12 +85,14 @@ public class PreStartActivator extends Activator { |
|
|
|
* @return isDebug |
|
|
|
* @return isDebug |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
private boolean isDebug() { |
|
|
|
private boolean isDebug() { |
|
|
|
|
|
|
|
|
|
|
|
return ComparatorUtils.equals("true", System.getProperty("debug")); |
|
|
|
return ComparatorUtils.equals("true", System.getProperty("debug")); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//端口改一下,环境配置文件改一下。便于启动两个设计器,进行对比调试
|
|
|
|
//端口改一下,环境配置文件改一下。便于启动两个设计器,进行对比调试
|
|
|
|
private void setDebugEnv() { |
|
|
|
private void setDebugEnv() { |
|
|
|
|
|
|
|
|
|
|
|
DesignUtils.setPort(DesignerPort.DEBUG_MESSAGE_PORT); |
|
|
|
DesignUtils.setPort(DesignerPort.DEBUG_MESSAGE_PORT); |
|
|
|
String debugXMlFilePath = StableUtils.pathJoin( |
|
|
|
String debugXMlFilePath = StableUtils.pathJoin( |
|
|
|
ProductConstants.getEnvHome(), |
|
|
|
ProductConstants.getEnvHome(), |
|
|
@ -103,22 +108,28 @@ public class PreStartActivator extends Activator { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private String[] startFileSuffix() { |
|
|
|
private String[] startFileSuffix() { |
|
|
|
|
|
|
|
|
|
|
|
return new String[]{".cpt", ".xls", ".xlsx", ".frm", ".form", ".cht", ".chart"}; |
|
|
|
return new String[]{".cpt", ".xls", ".xlsx", ".frm", ".form", ".cht", ".chart"}; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private static void preloadResource() { |
|
|
|
private static void preloadResource() { |
|
|
|
|
|
|
|
|
|
|
|
ExecutorService service = Executors.newCachedThreadPool(); |
|
|
|
ExecutorService service = Executors.newCachedThreadPool(); |
|
|
|
|
|
|
|
|
|
|
|
service.submit(new Runnable() { |
|
|
|
service.submit(new Runnable() { |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void run() { |
|
|
|
public void run() { |
|
|
|
|
|
|
|
|
|
|
|
new ImagePreLoader(); |
|
|
|
new ImagePreLoader(); |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
service.submit(new Runnable() { |
|
|
|
service.submit(new Runnable() { |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void run() { |
|
|
|
public void run() { |
|
|
|
|
|
|
|
|
|
|
|
TemplateInfoCollector.getInstance(); |
|
|
|
TemplateInfoCollector.getInstance(); |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
@ -126,6 +137,7 @@ public class PreStartActivator extends Activator { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private SplashStrategy createSplash() { |
|
|
|
private SplashStrategy createSplash() { |
|
|
|
|
|
|
|
|
|
|
|
OemProcessor oemProcessor = OemHandler.findOem(); |
|
|
|
OemProcessor oemProcessor = OemHandler.findOem(); |
|
|
|
if (oemProcessor != null) { |
|
|
|
if (oemProcessor != null) { |
|
|
|
SplashStrategy splashStrategy = null; |
|
|
|
SplashStrategy splashStrategy = null; |
|
|
|