Browse Source

Merge remote-tracking branch 'origin/release/10.0' into release/10.0

feature/big-screen
Yvan 4 years ago
parent
commit
66acb052a4
  1. 7
      designer-base/src/main/java/com/fr/design/DesignerEnvManager.java
  2. 42
      designer-base/src/main/java/com/fr/design/extra/exe/callback/InstallFromDiskCallback.java
  3. 18
      designer-base/src/main/java/com/fr/design/extra/exe/callback/InstallOnlineCallback.java
  4. 14
      designer-base/src/main/java/com/fr/design/extra/exe/callback/UninstallPluginCallback.java
  5. 38
      designer-base/src/main/java/com/fr/design/extra/exe/callback/UpdateFromDiskCallback.java
  6. 31
      designer-base/src/main/java/com/fr/design/fun/DesignerLifecycleMonitor.java
  7. 31
      designer-base/src/main/java/com/fr/design/fun/DesignerPortProvider.java
  8. 47
      designer-base/src/main/java/com/fr/design/monitor/DesignerLifecycleMonitorContext.java
  9. 32
      designer-base/src/main/java/com/fr/design/port/DesignerPortContext.java
  10. 12
      designer-base/src/main/java/com/fr/design/utils/DesignerPort.java
  11. 4
      designer-base/src/main/java/com/fr/exit/DesignerExiter.java
  12. 2
      designer-base/src/main/java/com/fr/start/BaseDesigner.java
  13. 2
      designer-realize/src/main/java/com/fr/start/MainDesigner.java

7
designer-base/src/main/java/com/fr/design/DesignerEnvManager.java

@ -15,10 +15,12 @@ import com.fr.design.env.DesignerWorkspaceType;
import com.fr.design.env.LocalDesignerWorkspaceInfo; import com.fr.design.env.LocalDesignerWorkspaceInfo;
import com.fr.design.env.RemoteDesignerWorkspaceInfo; import com.fr.design.env.RemoteDesignerWorkspaceInfo;
import com.fr.design.file.HistoryTemplateListPane; import com.fr.design.file.HistoryTemplateListPane;
import com.fr.design.fun.DesignerPortProvider;
import com.fr.design.i18n.Toolkit; import com.fr.design.i18n.Toolkit;
import com.fr.design.locale.impl.ProductImproveMark; import com.fr.design.locale.impl.ProductImproveMark;
import com.fr.design.mainframe.vcs.VcsConfigManager; import com.fr.design.mainframe.vcs.VcsConfigManager;
import com.fr.design.notification.SnapChatConfig; import com.fr.design.notification.SnapChatConfig;
import com.fr.design.port.DesignerPortContext;
import com.fr.design.update.push.DesignerPushUpdateConfigManager; import com.fr.design.update.push.DesignerPushUpdateConfigManager;
import com.fr.design.style.color.ColorSelectConfigManager; import com.fr.design.style.color.ColorSelectConfigManager;
import com.fr.design.utils.DesignUtils; import com.fr.design.utils.DesignUtils;
@ -42,6 +44,7 @@ import com.fr.stable.ListMap;
import com.fr.stable.ProductConstants; import com.fr.stable.ProductConstants;
import com.fr.stable.StableUtils; import com.fr.stable.StableUtils;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
import com.fr.stable.bridge.StableFactory;
import com.fr.stable.core.UUID; import com.fr.stable.core.UUID;
import com.fr.stable.project.ProjectConstants; import com.fr.stable.project.ProjectConstants;
import com.fr.stable.xml.XMLPrintWriter; import com.fr.stable.xml.XMLPrintWriter;
@ -842,6 +845,10 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter {
* 返回Jetty服务器的端口号 * 返回Jetty服务器的端口号
*/ */
public int getEmbedServerPort() { public int getEmbedServerPort() {
int embeddedServerPort = DesignerPortContext.getEmbeddedServerPort();
if (embeddedServerPort >= DesignerPort.MIN_PORT && embeddedServerPort <= DesignerPort.MAX_PORT) {
return embeddedServerPort;
}
return this.jettyServerPort; return this.jettyServerPort;
} }

42
designer-base/src/main/java/com/fr/design/extra/exe/callback/InstallFromDiskCallback.java

@ -44,40 +44,32 @@ public class InstallFromDiskCallback extends AbstractPluginTaskCallback {
FineLoggerFactory.getLogger().info(successInfo); FineLoggerFactory.getLogger().info(successInfo);
FineJOptionPane.showMessageDialog(null, successInfo); FineJOptionPane.showMessageDialog(null, successInfo);
} else if (result.errorCode() == PluginErrorCode.NeedDealWithPluginDependency) { } else if (result.errorCode() == PluginErrorCode.NeedDealWithPluginDependency) {
int rv = FineJOptionPane.showOptionDialog( int rv = FineJOptionPane.showConfirmDialog(
null, null,
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Plugin_Install_Dependence"), Toolkit.i18nText("Fine-Design_Basic_Plugin_Install_Dependence"),
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Plugin_Warning"), Toolkit.i18nText("Fine-Design_Basic_Plugin_Warning"),
FineJOptionPane.YES_NO_CANCEL_OPTION, FineJOptionPane.OK_CANCEL_OPTION,
FineJOptionPane.INFORMATION_MESSAGE, FineJOptionPane.INFORMATION_MESSAGE
null,
FineJOptionPane.OPTION_YES_NO_CANCEL,
null
); );
if (rv == FineJOptionPane.NO_OPTION || rv == FineJOptionPane.CANCEL_OPTION || rv == FineJOptionPane.CLOSED_OPTION) { if (rv == FineJOptionPane.OK_OPTION) {
return; List<PluginTask> pluginTasks = result.getPreTasks();
for(PluginTask pluginTask : pluginTasks){
PluginMarker marker = pluginTask.getMarker();
PluginOperateUtils.installPluginOnline(marker, jsCallback);
}
PluginManager.getController().install(zipFile, new InstallFromDiskCallback(zipFile, jsCallback));
} }
List<PluginTask> pluginTasks = result.getPreTasks();
for(PluginTask pluginTask : pluginTasks){
PluginMarker marker = pluginTask.getMarker();
PluginOperateUtils.installPluginOnline(marker, jsCallback);
}
PluginManager.getController().install(zipFile, new InstallFromDiskCallback(zipFile, jsCallback));
} else if(result.errorCode() == PluginErrorCode.HasLowerPluginWhenInstall){ } else if(result.errorCode() == PluginErrorCode.HasLowerPluginWhenInstall){
int rv = FineJOptionPane.showOptionDialog( int rv = FineJOptionPane.showConfirmDialog(
null, null,
Toolkit.i18nText("Fine-Design_Basic_Plugin_Has_Install_Lower"), Toolkit.i18nText("Fine-Design_Basic_Plugin_Has_Install_Lower"),
Toolkit.i18nText("Fine-Design_Basic_Plugin_Warning"), Toolkit.i18nText("Fine-Design_Basic_Plugin_Warning"),
FineJOptionPane.YES_NO_CANCEL_OPTION, FineJOptionPane.OK_CANCEL_OPTION,
FineJOptionPane.INFORMATION_MESSAGE, FineJOptionPane.INFORMATION_MESSAGE
null,
FineJOptionPane.OPTION_YES_NO_CANCEL,
null
); );
if (rv == FineJOptionPane.NO_OPTION || rv == FineJOptionPane.CANCEL_OPTION || rv == FineJOptionPane.CLOSED_OPTION) { if (rv == FineJOptionPane.OK_OPTION) {
return; PluginOperateUtils.updatePluginFromDisk(zipFile, jsCallback);
} }
PluginOperateUtils.updatePluginFromDisk(zipFile, jsCallback);
}else { }else {
jsCallback.execute("failed"); jsCallback.execute("failed");
FineLoggerFactory.getLogger().info(Toolkit.i18nText("Fine-Design_Basic_Plugin_Install_Failed")); FineLoggerFactory.getLogger().info(Toolkit.i18nText("Fine-Design_Basic_Plugin_Install_Failed"));

18
designer-base/src/main/java/com/fr/design/extra/exe/callback/InstallOnlineCallback.java

@ -41,22 +41,20 @@ public class InstallOnlineCallback extends AbstractDealPreTaskCallback {
FineLoggerFactory.getLogger().info(successInfo); FineLoggerFactory.getLogger().info(successInfo);
FineJOptionPane.showMessageDialog(null, successInfo); FineJOptionPane.showMessageDialog(null, successInfo);
} else if(result.errorCode() == PluginErrorCode.HasLowerPluginWhenInstall){ } else if(result.errorCode() == PluginErrorCode.HasLowerPluginWhenInstall){
int rv = FineJOptionPane.showOptionDialog( int rv = FineJOptionPane.showConfirmDialog(
null, null,
Toolkit.i18nText("Fine-Design_Basic_Plugin_Has_Install_Lower"), Toolkit.i18nText("Fine-Design_Basic_Plugin_Has_Install_Lower"),
Toolkit.i18nText("Fine-Design_Basic_Plugin_Warning"), Toolkit.i18nText("Fine-Design_Basic_Plugin_Warning"),
FineJOptionPane.YES_NO_CANCEL_OPTION, FineJOptionPane.OK_CANCEL_OPTION,
FineJOptionPane.INFORMATION_MESSAGE, FineJOptionPane.INFORMATION_MESSAGE
null,
FineJOptionPane.OPTION_YES_NO_CANCEL,
null
); );
if (rv == FineJOptionPane.NO_OPTION || rv == FineJOptionPane.CANCEL_OPTION || rv == FineJOptionPane.CLOSED_OPTION) { if (rv == FineJOptionPane.OK_OPTION) {
PluginMarker pluginMarker = result.getCurrentTask().getMarker();
PluginOperateUtils.updatePluginOnline(pluginMarker, jsCallback);
}
else {
jsCallback.execute("success"); jsCallback.execute("success");
return;
} }
PluginMarker pluginMarker = result.getCurrentTask().getMarker();
PluginOperateUtils.updatePluginOnline(pluginMarker, jsCallback);
} else { } else {
jsCallback.execute("failed"); jsCallback.execute("failed");
FineLoggerFactory.getLogger().info(Toolkit.i18nText("Fine-Design_Basic_Plugin_Install_Failed")); FineLoggerFactory.getLogger().info(Toolkit.i18nText("Fine-Design_Basic_Plugin_Install_Failed"));

14
designer-base/src/main/java/com/fr/design/extra/exe/callback/UninstallPluginCallback.java

@ -31,20 +31,16 @@ public class UninstallPluginCallback extends AbstractPluginTaskCallback {
FineLoggerFactory.getLogger().info(successInfo); FineLoggerFactory.getLogger().info(successInfo);
FineJOptionPane.showMessageDialog(null, successInfo); FineJOptionPane.showMessageDialog(null, successInfo);
}else if (result.errorCode() == PluginErrorCode.NeedUninstallDependingPluginFirst) { }else if (result.errorCode() == PluginErrorCode.NeedUninstallDependingPluginFirst) {
int rv = FineJOptionPane.showOptionDialog( int rv = FineJOptionPane.showConfirmDialog(
null, null,
Toolkit.i18nText("Fine-Design_Basic_Plugin_Delete_Dependence"), Toolkit.i18nText("Fine-Design_Basic_Plugin_Delete_Dependence"),
Toolkit.i18nText("Fine-Design_Basic_Plugin_Warning"), Toolkit.i18nText("Fine-Design_Basic_Plugin_Warning"),
FineJOptionPane.YES_NO_CANCEL_OPTION, FineJOptionPane.OK_CANCEL_OPTION,
FineJOptionPane.INFORMATION_MESSAGE, FineJOptionPane.INFORMATION_MESSAGE
null,
FineJOptionPane.OPTION_YES_NO_CANCEL,
null
); );
if (rv == FineJOptionPane.CANCEL_OPTION || rv == FineJOptionPane.CLOSED_OPTION) { if (rv == FineJOptionPane.OK_OPTION) {
return; PluginManager.getController().uninstall(pluginMarker, true, new UninstallPluginCallback(pluginMarker, jsCallback));
} }
PluginManager.getController().uninstall(pluginMarker, true, new UninstallPluginCallback(pluginMarker, jsCallback));
} else { } else {
jsCallback.execute("failed"); jsCallback.execute("failed");
FineLoggerFactory.getLogger().info(Toolkit.i18nText("Fine-Design_Basic_Plugin_Delete_Failed")); FineLoggerFactory.getLogger().info(Toolkit.i18nText("Fine-Design_Basic_Plugin_Delete_Failed"));

38
designer-base/src/main/java/com/fr/design/extra/exe/callback/UpdateFromDiskCallback.java

@ -43,40 +43,32 @@ public class UpdateFromDiskCallback extends AbstractPluginTaskCallback {
FineLoggerFactory.getLogger().info(successInfo); FineLoggerFactory.getLogger().info(successInfo);
FineJOptionPane.showMessageDialog(null, successInfo); FineJOptionPane.showMessageDialog(null, successInfo);
} else if (result.errorCode() == PluginErrorCode.NeedDealWithPluginDependency) { } else if (result.errorCode() == PluginErrorCode.NeedDealWithPluginDependency) {
int rv = FineJOptionPane.showOptionDialog( int rv = FineJOptionPane.showConfirmDialog(
null, null,
Toolkit.i18nText("Fine-Design_Basic_Plugin_Update_Dependence"), Toolkit.i18nText("Fine-Design_Basic_Plugin_Update_Dependence"),
Toolkit.i18nText("Fine-Design_Basic_Plugin_Warning"), Toolkit.i18nText("Fine-Design_Basic_Plugin_Warning"),
FineJOptionPane.YES_NO_CANCEL_OPTION, FineJOptionPane.OK_CANCEL_OPTION,
FineJOptionPane.INFORMATION_MESSAGE, FineJOptionPane.INFORMATION_MESSAGE
null,
FineJOptionPane.OPTION_YES_NO_CANCEL,
null
); );
if (rv == FineJOptionPane.NO_OPTION || rv == FineJOptionPane.CANCEL_OPTION || rv == FineJOptionPane.CLOSED_OPTION) { if (rv == FineJOptionPane.OK_OPTION) {
return; List<PluginTask> pluginTasks = result.getPreTasks();
} for(PluginTask pluginTask : pluginTasks){
List<PluginTask> pluginTasks = result.getPreTasks(); PluginMarker marker = pluginTask.getMarker();
for(PluginTask pluginTask : pluginTasks){ PluginOperateUtils.updatePluginOnline(marker, jsCallback);
PluginMarker marker = pluginTask.getMarker(); }
PluginOperateUtils.updatePluginOnline(marker, jsCallback); PluginManager.getController().update(zipFile, new UpdateFromDiskCallback(zipFile, jsCallback));
} }
PluginManager.getController().update(zipFile, new UpdateFromDiskCallback(zipFile, jsCallback));
} else if(result.errorCode() == PluginErrorCode.NoPluginToUpdate){ } else if(result.errorCode() == PluginErrorCode.NoPluginToUpdate){
int rv = FineJOptionPane.showOptionDialog( int rv = FineJOptionPane.showConfirmDialog(
null, null,
Toolkit.i18nText("Fine-Design_Basic_Plugin_No_Plugin_Update"), Toolkit.i18nText("Fine-Design_Basic_Plugin_No_Plugin_Update"),
Toolkit.i18nText("Fine-Design_Basic_Plugin_Warning"), Toolkit.i18nText("Fine-Design_Basic_Plugin_Warning"),
FineJOptionPane.YES_NO_CANCEL_OPTION, FineJOptionPane.OK_CANCEL_OPTION,
FineJOptionPane.INFORMATION_MESSAGE, FineJOptionPane.INFORMATION_MESSAGE
null,
FineJOptionPane.OPTION_YES_NO_CANCEL,
null
); );
if (rv == FineJOptionPane.NO_OPTION || rv == FineJOptionPane.CANCEL_OPTION || rv == FineJOptionPane.CLOSED_OPTION) { if (rv == FineJOptionPane.OK_OPTION) {
return; PluginOperateUtils.installPluginFromDisk(zipFile, jsCallback);
} }
PluginOperateUtils.installPluginFromDisk(zipFile, jsCallback);
}else { }else {
jsCallback.execute("failed"); jsCallback.execute("failed");
FineLoggerFactory.getLogger().info(Toolkit.i18nText("Fine-Design_Basic_Plugin_Update_Failed")); FineLoggerFactory.getLogger().info(Toolkit.i18nText("Fine-Design_Basic_Plugin_Update_Failed"));

31
designer-base/src/main/java/com/fr/design/fun/DesignerLifecycleMonitor.java

@ -0,0 +1,31 @@
package com.fr.design.fun;
/**
* 设计器生命周期接口
*
* @author hades
* @version 10.0
* Created by hades on 2021/1/26
*/
public interface DesignerLifecycleMonitor {
String MARK_STRING = "DesignerLifecycleMonitor";
int CURRENT_LEVEL = 1;
/**
* 设计器启动之前
*/
void beforeStart();
/**
* 设计器启动完成 界面出现之后
*/
void afterStart();
/**
* 设计器关闭退出之前
*/
void beforeStop();
}

31
designer-base/src/main/java/com/fr/design/fun/DesignerPortProvider.java

@ -0,0 +1,31 @@
package com.fr.design.fun;
/**
* 设计器所有端口获取
*
* @author hades
* @version 10.0
* Created by hades on 2021/1/18
*/
public interface DesignerPortProvider {
String MARK_STRING = "DesignerPortProvider";
int CURRENT_LEVEL = 1;
/**
* 设计器自身端口
*
* @return
*/
int messagePort();
/**
* 内置服务器端口
*
* @return
*/
int embeddedServerPort();
}

47
designer-base/src/main/java/com/fr/design/monitor/DesignerLifecycleMonitorContext.java

@ -0,0 +1,47 @@
package com.fr.design.monitor;
import com.fr.design.fun.DesignerLifecycleMonitor;
import com.fr.stable.bridge.StableFactory;
/**
* @author hades
* @version 10.0
* Created by hades on 2021/1/27
*/
public class DesignerLifecycleMonitorContext {
private static DesignerLifecycleMonitor monitor;
static {
DesignerLifecycleMonitor designerLifecycleMonitor = StableFactory.getMarkedInstanceObjectFromClass(DesignerLifecycleMonitor.MARK_STRING, DesignerLifecycleMonitor.class);
if (designerLifecycleMonitor != null) {
monitor = designerLifecycleMonitor;
} else {
monitor = new EmptyDesignerLifecycleMonitor();
}
}
public static DesignerLifecycleMonitor getMonitor() {
return monitor;
}
static class EmptyDesignerLifecycleMonitor implements DesignerLifecycleMonitor {
@Override
public void beforeStart() {
}
@Override
public void afterStart() {
}
@Override
public void beforeStop() {
}
}
}

32
designer-base/src/main/java/com/fr/design/port/DesignerPortContext.java

@ -0,0 +1,32 @@
package com.fr.design.port;
import com.fr.design.fun.DesignerPortProvider;
import com.fr.stable.bridge.StableFactory;
/**
* @author hades
* @version 10.0
* Created by hades on 2021/1/27
*/
public class DesignerPortContext {
private static int messagePort = -1;
private static int embeddedServerPort = -1;
static {
DesignerPortProvider designerPortProvider = StableFactory.getMarkedInstanceObjectFromClass(DesignerPortProvider.MARK_STRING, DesignerPortProvider.class);
if (designerPortProvider != null) {
messagePort = designerPortProvider.messagePort();
embeddedServerPort = designerPortProvider.embeddedServerPort();
}
}
public static int getMessagePort() {
return messagePort;
}
public static int getEmbeddedServerPort() {
return embeddedServerPort;
}
}

12
designer-base/src/main/java/com/fr/design/utils/DesignerPort.java

@ -4,19 +4,21 @@ import com.fr.common.report.ReportState;
import com.fr.design.DesignerEnvManager; import com.fr.design.DesignerEnvManager;
import com.fr.design.RestartHelper; import com.fr.design.RestartHelper;
import com.fr.design.dialog.TipDialog; import com.fr.design.dialog.TipDialog;
import com.fr.design.fun.DesignerPortProvider;
import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.itextfield.UITextField; import com.fr.design.gui.itextfield.UITextField;
import com.fr.design.i18n.Toolkit; import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.port.DesignerPortContext;
import com.fr.design.utils.gui.GUICoreUtils; import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.exit.DesignerExiter; import com.fr.exit.DesignerExiter;
import com.fr.general.ComparatorUtils; import com.fr.general.ComparatorUtils;
import com.fr.general.IOUtils; import com.fr.general.IOUtils;
import com.fr.process.ProcessEventPipe;
import com.fr.process.engine.core.CarryMessageEvent; import com.fr.process.engine.core.CarryMessageEvent;
import com.fr.process.engine.core.FineProcessContext; import com.fr.process.engine.core.FineProcessContext;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
import com.fr.stable.bridge.StableFactory;
import com.fr.stable.xml.XMLPrintWriter; import com.fr.stable.xml.XMLPrintWriter;
import com.fr.stable.xml.XMLReadable; import com.fr.stable.xml.XMLReadable;
import com.fr.stable.xml.XMLWriter; import com.fr.stable.xml.XMLWriter;
@ -35,8 +37,8 @@ import java.awt.event.ActionListener;
public class DesignerPort implements XMLReadable, XMLWriter { public class DesignerPort implements XMLReadable, XMLWriter {
public static final String XML_TAG = "DesignerPort"; public static final String XML_TAG = "DesignerPort";
private static final int MIN_PORT = 1024; public static final int MIN_PORT = 1024;
private static final int MAX_PORT = 65535; public static final int MAX_PORT = 65535;
public static final DesignerPort INSTANCE = new DesignerPort(); public static final DesignerPort INSTANCE = new DesignerPort();
@ -58,6 +60,10 @@ public class DesignerPort implements XMLReadable, XMLWriter {
private int debugMessagePort = 51463; private int debugMessagePort = 51463;
public int getMessagePort() { public int getMessagePort() {
int extraMessagePort = DesignerPortContext.getMessagePort();
if (extraMessagePort >= MIN_PORT && extraMessagePort <= MAX_PORT) {
return extraMessagePort;
}
return messagePort; return messagePort;
} }

4
designer-base/src/main/java/com/fr/exit/DesignerExiter.java

@ -1,10 +1,9 @@
package com.fr.exit; package com.fr.exit;
import com.fr.design.env.DesignerWorkspaceGenerator; import com.fr.design.env.DesignerWorkspaceGenerator;
import com.fr.design.monitor.DesignerLifecycleMonitorContext;
import com.fr.process.engine.core.FineProcessContext; import com.fr.process.engine.core.FineProcessContext;
import com.fr.process.engine.core.FineProcessEngineEvent; import com.fr.process.engine.core.FineProcessEngineEvent;
import com.fr.stable.StableUtils;
/** /**
* @author hades * @author hades
@ -20,6 +19,7 @@ public class DesignerExiter {
} }
public void execute() { public void execute() {
DesignerLifecycleMonitorContext.getMonitor().beforeStop();
beforeExit(); beforeExit();
if (FineProcessContext.getParentPipe() != null) { if (FineProcessContext.getParentPipe() != null) {
FineProcessContext.getParentPipe().syncFire(FineProcessEngineEvent.DESTROY); FineProcessContext.getParentPipe().syncFire(FineProcessEngineEvent.DESTROY);

2
designer-base/src/main/java/com/fr/start/BaseDesigner.java

@ -14,6 +14,7 @@ import com.fr.design.fun.DesignerStartOpenFileProcessor;
import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.DesignerContext;
import com.fr.design.mainframe.DesignerFrame; import com.fr.design.mainframe.DesignerFrame;
import com.fr.design.mainframe.toolbar.ToolBarMenuDock; import com.fr.design.mainframe.toolbar.ToolBarMenuDock;
import com.fr.design.monitor.DesignerLifecycleMonitorContext;
import com.fr.design.ui.util.UIUtil; import com.fr.design.ui.util.UIUtil;
import com.fr.event.Event; import com.fr.event.Event;
import com.fr.event.EventDispatcher; import com.fr.event.EventDispatcher;
@ -75,6 +76,7 @@ public abstract class BaseDesigner extends ToolBarMenuDock {
EventDispatcher.listen(DesignerLaunchStatus.STARTUP_COMPLETE, new Listener<Null>() { EventDispatcher.listen(DesignerLaunchStatus.STARTUP_COMPLETE, new Listener<Null>() {
@Override @Override
public void on(Event event, Null param) { public void on(Event event, Null param) {
DesignerLifecycleMonitorContext.getMonitor().afterStart();
EventDispatcher.stopListen(this); EventDispatcher.stopListen(this);
// 启动完成 停止监听 // 启动完成 停止监听
ProcessEventPipe eventPipe = FineProcessContext.getParentPipe(); ProcessEventPipe eventPipe = FineProcessContext.getParentPipe();

2
designer-realize/src/main/java/com/fr/start/MainDesigner.java

@ -36,6 +36,7 @@ import com.fr.design.menu.ShortCut;
import com.fr.design.module.ChartEmptyDataStyleAction; import com.fr.design.module.ChartEmptyDataStyleAction;
import com.fr.design.module.ChartPreStyleAction; import com.fr.design.module.ChartPreStyleAction;
import com.fr.design.module.DesignModuleFactory; import com.fr.design.module.DesignModuleFactory;
import com.fr.design.monitor.DesignerLifecycleMonitorContext;
import com.fr.design.utils.concurrent.ThreadFactoryBuilder; import com.fr.design.utils.concurrent.ThreadFactoryBuilder;
import com.fr.design.utils.gui.GUICoreUtils; import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.event.Event; import com.fr.event.Event;
@ -102,6 +103,7 @@ public class MainDesigner extends BaseDesigner {
StopWatch watch = new StopWatch(); StopWatch watch = new StopWatch();
watch.start(); watch.start();
DesignerLifecycleMonitorContext.getMonitor().beforeStart();
//启动运行时 //启动运行时
FineRuntime.start(); FineRuntime.start();
DesignerSubListener.getInstance().start(); DesignerSubListener.getInstance().start();

Loading…
Cancel
Save