Browse Source

REPORT-109834 F0052,起始页触发报错,starting拿到的是false

release/11.0
Destiny.Lin 1 year ago
parent
commit
99fd1ae371
  1. 10
      designer-base/src/main/java/com/fr/design/mainframe/messagecollect/StartErrorMessageCollector.java
  2. 1
      designer-base/src/main/java/com/fr/startup/ui/StartupPageWindow.java
  3. 2
      designer-realize/src/main/java/com/fr/start/module/optimized/DesignerStartupPageActivator.java

10
designer-base/src/main/java/com/fr/design/mainframe/messagecollect/StartErrorMessageCollector.java

@ -25,6 +25,7 @@ public class StartErrorMessageCollector {
private String uuid; private String uuid;
private String activeKey; private String activeKey;
private boolean extraJudgeStart = false;
public static StartErrorMessageCollector getInstance() { public static StartErrorMessageCollector getInstance() {
return INSTANCE; return INSTANCE;
@ -42,7 +43,7 @@ public class StartErrorMessageCollector {
errorInfo.setLogid(id); errorInfo.setLogid(id);
errorInfo.setLog(msg); errorInfo.setLog(msg);
errorInfo.setStackTrace(detail); errorInfo.setStackTrace(detail);
errorInfo.setStarting(DesignerStartupContext.getInstance().isOnStartup()); errorInfo.setStarting(DesignerStartupContext.getInstance().isOnStartup() || extraJudgeStart);
errorInfo.setRemote(!WorkContext.getCurrent().isLocal()); errorInfo.setRemote(!WorkContext.getCurrent().isLocal());
errorInfo.saveAsJSON(); errorInfo.saveAsJSON();
} }
@ -57,4 +58,11 @@ public class StartErrorMessageCollector {
public void record(String id, String msg) { public void record(String id, String msg) {
record(id, msg, StringUtils.EMPTY); record(id, msg, StringUtils.EMPTY);
} }
public void setExtraJudgeStart(boolean extraJudgeStart) {
this.extraJudgeStart = extraJudgeStart;
}
} }

1
designer-base/src/main/java/com/fr/startup/ui/StartupPageWindow.java

@ -279,6 +279,7 @@ public class StartupPageWindow extends JFrame {
e.getMessage()); e.getMessage());
} finally { } finally {
loadingPanel.hide(); loadingPanel.hide();
StartErrorMessageCollector.getInstance().setExtraJudgeStart(false);
} }
} }
}; };

2
designer-realize/src/main/java/com/fr/start/module/optimized/DesignerStartupPageActivator.java

@ -2,6 +2,7 @@ package com.fr.start.module.optimized;
import com.fr.design.DesignerEnvManager; import com.fr.design.DesignerEnvManager;
import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.DesignerContext;
import com.fr.design.mainframe.messagecollect.StartErrorMessageCollector;
import com.fr.design.ui.util.UIUtil; import com.fr.design.ui.util.UIUtil;
import com.fr.log.FineLoggerFactory; import com.fr.log.FineLoggerFactory;
import com.fr.module.Activator; import com.fr.module.Activator;
@ -164,6 +165,7 @@ public class DesignerStartupPageActivator extends Activator {
UIUtil.invokeLaterIfNeeded(() -> { UIUtil.invokeLaterIfNeeded(() -> {
// 换到 awt 线程中关闭,不然异步会出现问题。 // 换到 awt 线程中关闭,不然异步会出现问题。
DesignerStartupContext.getInstance().setOnStartup(false); DesignerStartupContext.getInstance().setOnStartup(false);
StartErrorMessageCollector.getInstance().setExtraJudgeStart(true);
recordStartupEnd(stopWatch); recordStartupEnd(stopWatch);
}); });
markComplete(); markComplete();

Loading…
Cancel
Save