Browse Source

Merge branch 'feature/10.0' of http://www.cloud.finedevelop.com:2015/scm/~zheng/C-design into feature/10.0

master
zheng 7 years ago
parent
commit
ad0d512818
  1. 2
      designer/src/com/fr/start/Designer.java
  2. 2
      designer/src/com/fr/start/module/DesignerModuleActivator.java
  3. 2385
      designer_base/src/com/fr/design/locale/designer.properties
  4. 2384
      designer_base/src/com/fr/design/locale/designer_en_US.properties
  5. 2385
      designer_base/src/com/fr/design/locale/designer_ja_JP.properties
  6. 2385
      designer_base/src/com/fr/design/locale/designer_ko_KR.properties
  7. 2385
      designer_base/src/com/fr/design/locale/designer_zh_CN.properties
  8. 2384
      designer_base/src/com/fr/design/locale/designer_zh_TW.properties
  9. 2
      designer_base/src/com/fr/design/module/DesignModule.java
  10. 23
      designer_base/src/com/fr/start/StartServer.java

2
designer/src/com/fr/start/Designer.java

@ -87,6 +87,8 @@ public class Designer extends BaseDesigner {
//传递启动参数 //传递启动参数
designerRoot.setSingleton(StartupArgs.class, new StartupArgs(args)); designerRoot.setSingleton(StartupArgs.class, new StartupArgs(args));
designerRoot.start(); designerRoot.start();
// 预启动一下
StartServer.start();
} }
public Designer(String[] args) { public Designer(String[] args) {

2
designer/src/com/fr/start/module/DesignerModuleActivator.java

@ -30,6 +30,6 @@ public class DesignerModuleActivator extends Activator implements Prepare {
@Override @Override
public void prepare() { public void prepare() {
addMutable(InterMutableKey.Path, "com/fr/design/i18n/designer"); addMutable(InterMutableKey.Path, "com/fr/design/i18n/main", "com/fr/design/i18n/chart");
} }
} }

2385
designer_base/src/com/fr/design/locale/designer.properties

File diff suppressed because it is too large Load Diff

2384
designer_base/src/com/fr/design/locale/designer_en_US.properties

File diff suppressed because it is too large Load Diff

2385
designer_base/src/com/fr/design/locale/designer_ja_JP.properties

File diff suppressed because it is too large Load Diff

2385
designer_base/src/com/fr/design/locale/designer_ko_KR.properties

File diff suppressed because it is too large Load Diff

2385
designer_base/src/com/fr/design/locale/designer_zh_CN.properties

File diff suppressed because it is too large Load Diff

2384
designer_base/src/com/fr/design/locale/designer_zh_TW.properties

File diff suppressed because it is too large Load Diff

2
designer_base/src/com/fr/design/module/DesignModule.java

@ -36,7 +36,7 @@ import java.util.Set;
* 所有设计器模块的父类 * 所有设计器模块的父类
*/ */
public abstract class DesignModule extends TopModule { public abstract class DesignModule extends TopModule {
public static final String LOCALE_FILE_PATH = "com/fr/design/locale/designer"; public static final String LOCALE_FILE_PATH = "com/fr/design/i18n/main";
public void start() { public void start() {
super.start(); super.start();

23
designer_base/src/com/fr/start/StartServer.java

@ -34,6 +34,7 @@ public class StartServer {
// 原先的tomcatHost放在类TomcatHost里面,很不方便操作,而且因为存在多个进程的原因, // 原先的tomcatHost放在类TomcatHost里面,很不方便操作,而且因为存在多个进程的原因,
// 原先的getInstance()方法无多大意义 // 原先的getInstance()方法无多大意义
private static TomcatHost tomcatHost = null; private static TomcatHost tomcatHost = null;
private static Object lock = new Object();
static { static {
GeneralContext.addEnvChangedListener(new EnvChangedListener() { GeneralContext.addEnvChangedListener(new EnvChangedListener() {
@ -80,6 +81,7 @@ public class StartServer {
} }
private static void initDemoServerAndBrowser() { private static void initDemoServerAndBrowser() {
synchronized (lock) {
if (tomcatHost != null) { if (tomcatHost != null) {
if (!tomcatHost.isDemoAppLoaded()) { if (!tomcatHost.isDemoAppLoaded()) {
tomcatHost.exit(); tomcatHost.exit();
@ -90,6 +92,7 @@ public class StartServer {
tomcatHost = new TomcatHost(DesignerEnvManager.getEnvManager().getJettyServerPort()); tomcatHost = new TomcatHost(DesignerEnvManager.getEnvManager().getJettyServerPort());
tomcatHost.addAndStartInstallHomeWebApp(); tomcatHost.addAndStartInstallHomeWebApp();
} }
}
try { try {
if (!tomcatHost.isStarted()) { if (!tomcatHost.isStarted()) {
tomcatHost.start(); tomcatHost.start();
@ -103,13 +106,9 @@ public class StartServer {
} }
} }
/** public static void start() {
* 本地环境浏览url
*
* @param url 指定路径
*/
public static void browserURLWithLocalEnv(String url) {
try { try {
synchronized (lock) {
if (tomcatHost != null) { if (tomcatHost != null) {
if (NEED_LOAD_ENV) { if (NEED_LOAD_ENV) {
tomcatHost.exit(); tomcatHost.exit();
@ -122,6 +121,7 @@ public class StartServer {
tomcatHost.addAndStartLocalEnvHomeWebApp(); tomcatHost.addAndStartLocalEnvHomeWebApp();
} }
}
if (!tomcatHost.isStarted()) { if (!tomcatHost.isStarted()) {
tomcatHost.start(); tomcatHost.start();
} }
@ -131,10 +131,19 @@ public class StartServer {
FRContext.getLogger().errorWithServerLevel(e.getMessage()); FRContext.getLogger().errorWithServerLevel(e.getMessage());
} finally { } finally {
NEED_LOAD_ENV = false; NEED_LOAD_ENV = false;
browser(url);
} }
} }
/**
* 本地环境浏览url
*
* @param url 指定路径
*/
public static void browserURLWithLocalEnv(String url) {
start();
browser(url);
}
public static TomcatHost getInstance() { public static TomcatHost getInstance() {
// august: 正确的逻辑能保证jettyHost不为null,不然就有bug,不允许这儿加是否等于null判断 // august: 正确的逻辑能保证jettyHost不为null,不然就有bug,不允许这儿加是否等于null判断
return tomcatHost; return tomcatHost;

Loading…
Cancel
Save