Browse Source

Merge pull request #1664 in BA/design from ~JU/design:feature/10.0 to feature/10.0

* commit 'a19aa9e817e00a6a1c7a09b873bc2ecf47c9361a':
  DEC-472 新模块划分与启动、关闭框架 启动设计器选择环境时抛错修复
  DEC-472 新模块划分与启动、关闭框架 启动设计器选择环境时抛错修复
master
superman 7 years ago
parent
commit
60ad7837bf
  1. 15
      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

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

@ -4,9 +4,11 @@ import com.fr.design.DesignerEnvManager;
import com.fr.design.utils.DesignUtils; import com.fr.design.utils.DesignUtils;
import com.fr.general.ComparatorUtils; import com.fr.general.ComparatorUtils;
import com.fr.module.Activator; import com.fr.module.Activator;
import com.fr.stable.CoreActivator;
import com.fr.stable.ProductConstants; import com.fr.stable.ProductConstants;
import com.fr.stable.module.ModuleListener; import com.fr.stable.module.ModuleListener;
import com.fr.start.Designer; import com.fr.start.Designer;
import com.fr.start.EnvSwitcher;
import com.fr.start.ReportSplashPane; import com.fr.start.ReportSplashPane;
import com.fr.start.SplashWindow; import com.fr.start.SplashWindow;
import com.fr.startup.activators.BasicActivator; import com.fr.startup.activators.BasicActivator;
@ -34,13 +36,16 @@ public class DesignerStartup extends Activator {
startSub(BasicActivator.class); startSub(BasicActivator.class);
//启动画面 //启动画面
SplashWindow splashWindow = createSplashWindow(); SplashWindow splashWindow = createSplashWindow();
String[] args = getModule().findSingleton(StartupArgs.class).get();
Designer designer = new Designer(args);
//启动env //启动env
startSub(DesignerEnvProvider.class); startSub(DesignerEnvProvider.class);
//启动各个模块 //启动各个模块
getSub("core").start(); getSub(CoreActivator.class).start();
getSub("designer").start(); getSub("designer").start();
getRoot().getSingleton(EnvSwitcher.class).switch2LastEnv();
//启动设计器界面 //启动设计器界面
startDesigner(); designer.show(args);
//启动画面结束 //启动画面结束
splashWindow.setVisible(false); splashWindow.setVisible(false);
splashWindow.dispose(); splashWindow.dispose();
@ -55,12 +60,6 @@ public class DesignerStartup extends Activator {
return splashWindow; return splashWindow;
} }
private void startDesigner() {
new Designer(getModule().getSingleton(StartupArgs.class).get());
}
private boolean checkMultiStart() { private boolean checkMultiStart() {
if (isDebug()) { 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.setSubPathes(subPathes);
this.init(); this.init();
//9.0的时候是在设置环境之前构造的这个对象,10.0改为之后了
this.refreshEnv(FRContext.getCurrentEnv());
} }
private void setTreeRootPath(String path) { private void setTreeRootPath(String path) {

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

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

Loading…
Cancel
Save