Browse Source

DEC-472 新模块划分与启动、关闭框架

启动设计器选择环境时抛错修复
master
ju 7 years ago
parent
commit
4581d496a7
  1. 12
      designer/src/com/fr/start/module/DesignerStartup.java
  2. 2
      designer_base/src/com/fr/design/gui/itree/filetree/EnvFileTree.java
  3. 18
      designer_base/src/com/fr/start/BaseDesigner.java

12
designer/src/com/fr/start/module/DesignerStartup.java

@ -7,6 +7,7 @@ import com.fr.module.Activator;
import com.fr.stable.ProductConstants;
import com.fr.stable.module.ModuleListener;
import com.fr.start.Designer;
import com.fr.start.EnvSwitcher;
import com.fr.start.ReportSplashPane;
import com.fr.start.SplashWindow;
import com.fr.startup.activators.BasicActivator;
@ -34,13 +35,16 @@ public class DesignerStartup extends Activator {
startSub(BasicActivator.class);
//启动画面
SplashWindow splashWindow = createSplashWindow();
String[] args = getModule().findSingleton(StartupArgs.class).get();
Designer designer = new Designer(args);
//启动env
startSub(DesignerEnvProvider.class);
//启动各个模块
getSub("core").start();
getSub("designer").start();
getRoot().getSingleton(EnvSwitcher.class).switch2LastEnv();
//启动设计器界面
startDesigner();
designer.show(args);
//启动画面结束
splashWindow.setVisible(false);
splashWindow.dispose();
@ -55,12 +59,6 @@ public class DesignerStartup extends Activator {
return splashWindow;
}
private void startDesigner() {
new Designer(getModule().getSingleton(StartupArgs.class).get());
}
private boolean checkMultiStart() {
if (isDebug()) {

2
designer_base/src/com/fr/design/gui/itree/filetree/EnvFileTree.java

@ -49,8 +49,6 @@ public class EnvFileTree extends RefreshableJTree {
this.setSubPathes(subPathes);
this.init();
//9.0的时候是在设置环境之前构造的这个对象,10.0改为之后了
this.refreshEnv(FRContext.getCurrentEnv());
}
private void setTreeRootPath(String path) {

18
designer_base/src/com/fr/start/BaseDesigner.java

@ -3,26 +3,21 @@
*/
package com.fr.start;
import com.fr.base.FRContext;
import com.fr.design.DesignerEnvManager;
import com.fr.design.ExtraDesignClassManager;
import com.fr.design.file.HistoryTemplateListPane;
import com.fr.design.file.MutilTempalteTabPane;
import com.fr.design.file.TemplateTreePane;
import com.fr.design.fun.DesignerStartOpenFileProcessor;
import com.fr.design.fun.impl.GlobalListenerProviderManager;
import com.fr.design.mainframe.DesignerContext;
import com.fr.design.mainframe.DesignerFrame;
import com.fr.design.mainframe.TemplatePane;
import com.fr.design.mainframe.toolbar.ToolBarMenuDock;
import com.fr.design.utils.DesignUtils;
import com.fr.env.SignIn;
import com.fr.file.FILE;
import com.fr.file.FILEFactory;
import com.fr.file.FileFILE;
import com.fr.general.ComparatorUtils;
import com.fr.general.FRLogger;
import com.fr.general.Inter;
import com.fr.general.ModuleContext;
import com.fr.stable.OperatingSystem;
import java.awt.*;
@ -50,19 +45,22 @@ public abstract class BaseDesigner extends ToolBarMenuDock {
// 初始化Log Handler
DesignerEnvManager.loadLogSetting();
DesignerFrame df = createDesignerFrame();
createDesignerFrame();
}
public void show(String[] args) {
collectUserInformation();
showDesignerFrame(args, df, false);
showDesignerFrame(args, DesignerContext.getDesignerFrame(), false);
for (int i = 0; !TemplateTreePane.getInstance().getTemplateFileTree().isTemplateShowing() && i < LOAD_TREE_MAXNUM; i++) {
TemplateTreePane.getInstance().getTemplateFileTree().refresh();
}
}
private void createDesignerFrame() {
private DesignerFrame createDesignerFrame() {
return new DesignerFrame(this);
new DesignerFrame(this);
}

Loading…
Cancel
Save