From fa37738a88cc3f7432770db59ee64a2812e4b985 Mon Sep 17 00:00:00 2001 From: "Destiny.Lin" Date: Fri, 24 Nov 2023 15:36:50 +0800 Subject: [PATCH 1/3] =?UTF-8?q?REPORT-109843=20F0051=EF=BC=8C=E9=83=A8?= =?UTF-8?q?=E5=88=86=E4=BF=9D=E5=AD=98=E5=9C=BA=E6=99=AF=E6=B2=A1=E6=9C=89?= =?UTF-8?q?=E5=9F=8B=E7=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fr/design/mainframe/JTemplate.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java b/designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java index 54469a4073..72fa78dda4 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java @@ -879,7 +879,10 @@ public abstract class JTemplate> return saveAsTemplate(isShowLoc); } collectInfo(); - return this.saveFile(); + TemplateSaveInfoContext.getInstance().startCollect(template); + boolean result = this.saveFile(); + TemplateSaveInfoContext.getInstance().stopCollect(result); + return result; } private boolean isCancelOperation(int operation) { @@ -968,7 +971,9 @@ public abstract class JTemplate> generateNewTemplateIdForSaveAs(); this.editingFILE = editingFILE; + TemplateSaveInfoContext.getInstance().startCollect(template); boolean result = this.saveToNewFile(oldName); + TemplateSaveInfoContext.getInstance().stopCollect(result); if (result) { DesignerFrameFileDealerPane.getInstance().refresh(); collectInfoWhenSaveAs(originID); From 99fd1ae3713e6e2a47e9b2c28923c2949c16a36e Mon Sep 17 00:00:00 2001 From: "Destiny.Lin" Date: Mon, 27 Nov 2023 13:48:31 +0800 Subject: [PATCH 2/3] =?UTF-8?q?REPORT-109834=20F0052=EF=BC=8C=E8=B5=B7?= =?UTF-8?q?=E5=A7=8B=E9=A1=B5=E8=A7=A6=E5=8F=91=E6=8A=A5=E9=94=99=EF=BC=8C?= =?UTF-8?q?starting=E6=8B=BF=E5=88=B0=E7=9A=84=E6=98=AFfalse?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../messagecollect/StartErrorMessageCollector.java | 10 +++++++++- .../main/java/com/fr/startup/ui/StartupPageWindow.java | 1 + .../module/optimized/DesignerStartupPageActivator.java | 2 ++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/designer-base/src/main/java/com/fr/design/mainframe/messagecollect/StartErrorMessageCollector.java b/designer-base/src/main/java/com/fr/design/mainframe/messagecollect/StartErrorMessageCollector.java index cc096bbf7c..2b6cf0a8f6 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/messagecollect/StartErrorMessageCollector.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/messagecollect/StartErrorMessageCollector.java @@ -25,6 +25,7 @@ public class StartErrorMessageCollector { private String uuid; private String activeKey; + private boolean extraJudgeStart = false; public static StartErrorMessageCollector getInstance() { return INSTANCE; @@ -42,7 +43,7 @@ public class StartErrorMessageCollector { errorInfo.setLogid(id); errorInfo.setLog(msg); errorInfo.setStackTrace(detail); - errorInfo.setStarting(DesignerStartupContext.getInstance().isOnStartup()); + errorInfo.setStarting(DesignerStartupContext.getInstance().isOnStartup() || extraJudgeStart); errorInfo.setRemote(!WorkContext.getCurrent().isLocal()); errorInfo.saveAsJSON(); } @@ -57,4 +58,11 @@ public class StartErrorMessageCollector { public void record(String id, String msg) { record(id, msg, StringUtils.EMPTY); } + + public void setExtraJudgeStart(boolean extraJudgeStart) { + this.extraJudgeStart = extraJudgeStart; + } + + + } diff --git a/designer-base/src/main/java/com/fr/startup/ui/StartupPageWindow.java b/designer-base/src/main/java/com/fr/startup/ui/StartupPageWindow.java index 156b1b3e18..d7fa813c1f 100644 --- a/designer-base/src/main/java/com/fr/startup/ui/StartupPageWindow.java +++ b/designer-base/src/main/java/com/fr/startup/ui/StartupPageWindow.java @@ -279,6 +279,7 @@ public class StartupPageWindow extends JFrame { e.getMessage()); } finally { loadingPanel.hide(); + StartErrorMessageCollector.getInstance().setExtraJudgeStart(false); } } }; diff --git a/designer-realize/src/main/java/com/fr/start/module/optimized/DesignerStartupPageActivator.java b/designer-realize/src/main/java/com/fr/start/module/optimized/DesignerStartupPageActivator.java index d861fa052a..836abb6317 100644 --- a/designer-realize/src/main/java/com/fr/start/module/optimized/DesignerStartupPageActivator.java +++ b/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.mainframe.DesignerContext; +import com.fr.design.mainframe.messagecollect.StartErrorMessageCollector; import com.fr.design.ui.util.UIUtil; import com.fr.log.FineLoggerFactory; import com.fr.module.Activator; @@ -164,6 +165,7 @@ public class DesignerStartupPageActivator extends Activator { UIUtil.invokeLaterIfNeeded(() -> { // 换到 awt 线程中关闭,不然异步会出现问题。 DesignerStartupContext.getInstance().setOnStartup(false); + StartErrorMessageCollector.getInstance().setExtraJudgeStart(true); recordStartupEnd(stopWatch); }); markComplete(); From 6b215a581c2a8760c81925682f4b8f94623bf0ab Mon Sep 17 00:00:00 2001 From: "Destiny.Lin" Date: Tue, 28 Nov 2023 16:42:14 +0800 Subject: [PATCH 3/3] =?UTF-8?q?REPORT-109834=20F0052=EF=BC=8C=E8=B5=B7?= =?UTF-8?q?=E5=A7=8B=E9=A1=B5=E8=A7=A6=E5=8F=91=E6=8A=A5=E9=94=99=EF=BC=8C?= =?UTF-8?q?starting=E6=8B=BF=E5=88=B0=E7=9A=84=E6=98=AFfalse?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mainframe/messagecollect/StartErrorMessageCollector.java | 5 ++++- .../src/main/java/com/fr/startup/ui/StartupPageWindow.java | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/mainframe/messagecollect/StartErrorMessageCollector.java b/designer-base/src/main/java/com/fr/design/mainframe/messagecollect/StartErrorMessageCollector.java index 2b6cf0a8f6..03e3694814 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/messagecollect/StartErrorMessageCollector.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/messagecollect/StartErrorMessageCollector.java @@ -52,7 +52,10 @@ public class StartErrorMessageCollector { * 异步记录 */ public void asyncRecord(String id, String msg, String detail) { - executorService.submit(() -> record(id, msg, detail)); + executorService.submit(() -> { + record(id, msg, detail); + StartErrorMessageCollector.getInstance().setExtraJudgeStart(false); + }); } public void record(String id, String msg) { diff --git a/designer-base/src/main/java/com/fr/startup/ui/StartupPageWindow.java b/designer-base/src/main/java/com/fr/startup/ui/StartupPageWindow.java index d7fa813c1f..a2d9965e50 100644 --- a/designer-base/src/main/java/com/fr/startup/ui/StartupPageWindow.java +++ b/designer-base/src/main/java/com/fr/startup/ui/StartupPageWindow.java @@ -258,6 +258,7 @@ public class StartupPageWindow extends JFrame { try { Void result = get(); setVisible(false); + StartErrorMessageCollector.getInstance().setExtraJudgeStart(false); } catch (Exception e) { // 处理错误 UIUtil.invokeLaterIfNeeded(() -> { @@ -279,7 +280,6 @@ public class StartupPageWindow extends JFrame { e.getMessage()); } finally { loadingPanel.hide(); - StartErrorMessageCollector.getInstance().setExtraJudgeStart(false); } } };