From 89cec191eb96d00ffc1b4cd5c3595ea6d25bc05e Mon Sep 17 00:00:00 2001 From: "Destiny.Lin" Date: Wed, 22 Nov 2023 15:22:46 +0800 Subject: [PATCH 1/5] =?UTF-8?q?REPORT-109660=20F0052=E6=8B=BF=E4=B8=8D?= =?UTF-8?q?=E5=88=B0=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/fr/startup/ui/StartupPageWindow.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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 43d2fd9709..b5e1c57777 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 @@ -1,6 +1,7 @@ package com.fr.startup.ui; import com.fr.base.svg.IconUtils; +import com.fr.concurrent.NamedThreadFactory; import com.fr.design.DesignerEnvManager; import com.fr.design.dialog.UIExpandDialog; import com.fr.design.gui.icontainer.UIScrollPane; @@ -8,6 +9,8 @@ import com.fr.design.gui.ilable.UILabel; import com.fr.design.i18n.Toolkit; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.VerticalFlowLayout; +import com.fr.design.mainframe.messagecollect.StartErrorMessageCollector; +import com.fr.design.mainframe.messagecollect.entity.DesignerErrorMessage; import com.fr.design.ui.util.UIUtil; import com.fr.design.utils.ColorUtils; import com.fr.design.utils.ThemeUtils; @@ -49,6 +52,8 @@ import java.awt.event.WindowEvent; import java.awt.image.BufferedImage; import java.util.List; import java.util.Map; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Executors; /** * 启动页 @@ -269,6 +274,14 @@ public class StartupPageWindow extends JFrame { setEnabled(true); }); FineLoggerFactory.getLogger().error(e.getMessage(), e); + ExecutorService executorService = Executors.newSingleThreadExecutor(new NamedThreadFactory(StartupPageWindow.this.getClass())); + executorService.submit(() -> StartErrorMessageCollector.getInstance().record(DesignerErrorMessage.UNEXCEPTED_START_FAILED.getId(), + DesignerErrorMessage.UNEXCEPTED_START_FAILED.getMessage(), + e.getMessage())); + if (!executorService.isShutdown()) { + executorService.shutdown(); + } + } finally { loadingPanel.hide(); } From 7b97185881461536328e6f7afa2480c35c4535ba Mon Sep 17 00:00:00 2001 From: "Destiny.Lin" Date: Wed, 22 Nov 2023 15:45:50 +0800 Subject: [PATCH 2/5] =?UTF-8?q?REPORT-109660=20F0052=E6=8B=BF=E4=B8=8D?= =?UTF-8?q?=E5=88=B0=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../messagecollect/StartErrorMessageCollector.java | 12 ++++++++++++ .../java/com/fr/startup/ui/StartupPageWindow.java | 9 ++------- 2 files changed, 14 insertions(+), 7 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 69342d13e6..cc096bbf7c 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 @@ -1,5 +1,6 @@ package com.fr.design.mainframe.messagecollect; +import com.fr.concurrent.NamedThreadFactory; import com.fr.design.DesignerEnvManager; import com.fr.design.mainframe.errorinfo.ErrorInfo; import com.fr.log.FineLoggerFactory; @@ -7,6 +8,9 @@ import com.fr.stable.StringUtils; import com.fr.start.common.DesignerStartupContext; import com.fr.workspace.WorkContext; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Executors; + /** * * @author hades @@ -17,6 +21,7 @@ public class StartErrorMessageCollector { private static final StartErrorMessageCollector INSTANCE = new StartErrorMessageCollector(); + private ExecutorService executorService = Executors.newSingleThreadExecutor(new NamedThreadFactory(StartErrorMessageCollector.this.getClass())); private String uuid; private String activeKey; @@ -42,6 +47,13 @@ public class StartErrorMessageCollector { errorInfo.saveAsJSON(); } + /** + * 异步记录 + */ + public void asyncRecord(String id, String msg, String detail) { + executorService.submit(() -> record(id, msg, detail)); + } + public void record(String id, String msg) { record(id, msg, StringUtils.EMPTY); } 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 b5e1c57777..156b1b3e18 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 @@ -274,14 +274,9 @@ public class StartupPageWindow extends JFrame { setEnabled(true); }); FineLoggerFactory.getLogger().error(e.getMessage(), e); - ExecutorService executorService = Executors.newSingleThreadExecutor(new NamedThreadFactory(StartupPageWindow.this.getClass())); - executorService.submit(() -> StartErrorMessageCollector.getInstance().record(DesignerErrorMessage.UNEXCEPTED_START_FAILED.getId(), + StartErrorMessageCollector.getInstance().asyncRecord(DesignerErrorMessage.UNEXCEPTED_START_FAILED.getId(), DesignerErrorMessage.UNEXCEPTED_START_FAILED.getMessage(), - e.getMessage())); - if (!executorService.isShutdown()) { - executorService.shutdown(); - } - + e.getMessage()); } finally { loadingPanel.hide(); } From bea38ab0f332c75975f0eaf3106191fbf81945a3 Mon Sep 17 00:00:00 2001 From: "Destiny.Lin" Date: Wed, 22 Nov 2023 16:55:05 +0800 Subject: [PATCH 3/5] =?UTF-8?q?REPORT-109711=20F0051=E6=96=B0=E5=BB=BA?= =?UTF-8?q?=E7=9A=84=E6=A8=A1=E7=89=88=E8=A7=A6=E5=8F=91=E4=BF=9D=E5=AD=98?= =?UTF-8?q?=E6=B2=A1=E6=9C=89=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fr/design/mainframe/JTemplate.java | 2 ++ 1 file changed, 2 insertions(+) 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 73f6ea6901..54469a4073 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 @@ -1783,6 +1783,8 @@ public abstract class JTemplate> CallbackSaveWorker worker = new CallbackSaveWorker(new Callable() { @Override public Boolean call() throws Exception { + TemplateSaveInfoContext.getInstance().startRecord(); + TemplateSaveInfoContext.getInstance().collectInfo(template.suffix()); return saveAs(finalEditingFILE, sourceFile, oldName); } }, this); From d79837717dce599d845f39a277b3c9df45555dce Mon Sep 17 00:00:00 2001 From: obo Date: Thu, 23 Nov 2023 14:48:10 +0800 Subject: [PATCH 4/5] =?UTF-8?q?REPORT-109802=20=E3=80=90=E6=8E=A7=E4=BB=B6?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E5=A2=9E=E5=BC=BA=E3=80=91=E6=8F=92=E4=BB=B6?= =?UTF-8?q?=E6=89=93=E5=8C=85=E6=8A=A5=E9=94=99=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AbstractMobileStyleDefinePaneCreator.java | 23 +++++++++++ .../MobileStyleDefinePaneCreator.java | 40 +++++++++++++++++++ 2 files changed, 63 insertions(+) create mode 100644 designer-base/src/main/java/com/fr/design/mainframe/mobile/processor/AbstractMobileStyleDefinePaneCreator.java create mode 100644 designer-base/src/main/java/com/fr/design/mainframe/mobile/processor/MobileStyleDefinePaneCreator.java diff --git a/designer-base/src/main/java/com/fr/design/mainframe/mobile/processor/AbstractMobileStyleDefinePaneCreator.java b/designer-base/src/main/java/com/fr/design/mainframe/mobile/processor/AbstractMobileStyleDefinePaneCreator.java new file mode 100644 index 0000000000..203a83f13c --- /dev/null +++ b/designer-base/src/main/java/com/fr/design/mainframe/mobile/processor/AbstractMobileStyleDefinePaneCreator.java @@ -0,0 +1,23 @@ +package com.fr.design.mainframe.mobile.processor; + +import com.fr.stable.fun.mark.API; + +/** + * 移动端Form控件,样式模板,通用属性替换接口 + * + * @author Coral.Chen + * @since 11.0 + * Created on 2023/4/11 + */ +@API(level = MobileStyleDefinePaneCreator.CURRENT_LEVEL) +public abstract class AbstractMobileStyleDefinePaneCreator implements MobileStyleDefinePaneCreator { + @Override + public int currentAPILevel() { + return CURRENT_LEVEL; + } + + @Override + public int layerIndex() { + return DEFAULT_LAYER_INDEX; + } +} \ No newline at end of file diff --git a/designer-base/src/main/java/com/fr/design/mainframe/mobile/processor/MobileStyleDefinePaneCreator.java b/designer-base/src/main/java/com/fr/design/mainframe/mobile/processor/MobileStyleDefinePaneCreator.java new file mode 100644 index 0000000000..3b5e2cb861 --- /dev/null +++ b/designer-base/src/main/java/com/fr/design/mainframe/mobile/processor/MobileStyleDefinePaneCreator.java @@ -0,0 +1,40 @@ +package com.fr.design.mainframe.mobile.processor; + +import com.fr.design.beans.BasicBeanPane; +import com.fr.design.mainframe.mobile.ui.MobileStyleCustomDefinePane; +import com.fr.form.ui.Widget; +import com.fr.form.ui.mobile.MobileCommonExtraStyle; +import com.fr.form.ui.mobile.MobileStyle; +import com.fr.stable.fun.mark.Immutable; +import org.jetbrains.annotations.Nullable; + +/** + * 移动端Form控件,样式模板,通用属性替换接口 + * + * @author Coral.Chen + * @since 11.0 + * Created on 2023/4/11 + */ +public interface MobileStyleDefinePaneCreator extends Immutable { + String XML_TAG = "MobileStyleDefinePaneCreator"; + + int CURRENT_LEVEL = 1; + + /** + *

创建通用属性样式界面,可替换{@link com.fr.design.mainframe.mobile.ui.MobileStyleDefinePane} + *

每种样式的通用属性面板是一样的 + * + * @param widget 控件 + * @param customDefinePane 自定义面板 + * @param mobileStyle 移动端样式 + * @return + */ + @Nullable BasicBeanPane createBaseBeanPane(Widget widget, Class customDefinePane, Class mobileStyle); + + /** + * 替换通用属性面板,注册额外属性 + * + * @return 属性类 + */ + @Nullable Class classForCommonExtraStyle(Widget widget); +} \ No newline at end of file From d1ff52c45394dd308bc10de303f7c13a8fa48434 Mon Sep 17 00:00:00 2001 From: xiqiu Date: Thu, 23 Nov 2023 16:51:27 +0800 Subject: [PATCH 5/5] =?UTF-8?q?=E6=97=A0jira=20=E8=A1=A5=E6=8A=A5=E9=94=99?= =?UTF-8?q?=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/data/datapane/connect/DatabaseConnectionPane.java | 1 + 1 file changed, 1 insertion(+) diff --git a/designer-base/src/main/java/com/fr/design/data/datapane/connect/DatabaseConnectionPane.java b/designer-base/src/main/java/com/fr/design/data/datapane/connect/DatabaseConnectionPane.java index 3c5c2b82a8..11c3f64d64 100644 --- a/designer-base/src/main/java/com/fr/design/data/datapane/connect/DatabaseConnectionPane.java +++ b/designer-base/src/main/java/com/fr/design/data/datapane/connect/DatabaseConnectionPane.java @@ -462,6 +462,7 @@ public abstract class DatabaseConnectionPane