From d1c716958798b25dbb9e22d29643bc023983b411 Mon Sep 17 00:00:00 2001 From: obo Date: Mon, 25 Dec 2023 14:34:08 +0800 Subject: [PATCH 1/5] =?UTF-8?q?REPORT-111549=20=E6=A0=87=E7=AD=BE=E6=8E=A7?= =?UTF-8?q?=E4=BB=B6=E8=AE=BE=E7=BD=AE=E7=9A=84=E5=AD=97=E4=BD=93=E8=83=8C?= =?UTF-8?q?=E6=99=AF=E6=A0=B7=E5=BC=8F=E7=AD=89=EF=BC=8C=E5=BC=80=E5=90=AF?= =?UTF-8?q?=E6=8E=A7=E4=BB=B6=E5=A2=9E=E5=BC=BA=EF=BC=8C=E4=B9=8B=E5=89=8D?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E7=9A=84=E6=A0=B7=E5=BC=8F=E4=B8=A2=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/fr/design/widgettheme/LabelSettingPane.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/designer-form/src/main/java/com/fr/design/widgettheme/LabelSettingPane.java b/designer-form/src/main/java/com/fr/design/widgettheme/LabelSettingPane.java index 0241b01000..8edba113cb 100644 --- a/designer-form/src/main/java/com/fr/design/widgettheme/LabelSettingPane.java +++ b/designer-form/src/main/java/com/fr/design/widgettheme/LabelSettingPane.java @@ -38,6 +38,11 @@ public class LabelSettingPane extends BaseStyleSettingPane LabelTheme widgetTheme = (LabelTheme) t.getWidgetTheme(); if (widgetTheme == null) { widgetTheme = new LabelTheme(); + Label label = (Label) t; + if (!FRFont.getInstance().equals(label.getFont())) { + widgetTheme.setFollowTheme(false); + widgetTheme.setFontStyle(new FontStyle((label.getFont()))); + } t.setWidgetTheme(widgetTheme); } return widgetTheme; From 076b42605c9cd972a6e6fac2f102fc399adc23b7 Mon Sep 17 00:00:00 2001 From: "Destiny.Lin" Date: Mon, 25 Dec 2023 15:46:47 +0800 Subject: [PATCH 2/5] =?UTF-8?q?REPORT-109129=20=E5=81=B6=E7=8E=B0=E8=AE=BE?= =?UTF-8?q?=E8=AE=A1=E5=99=A8=E5=85=B3=E9=97=AD=E5=90=8E=E8=BF=9B=E7=A8=8B?= =?UTF-8?q?=E6=AE=8B=E7=95=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fr/start/DesignerSuperListener.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/designer-realize/src/main/java/com/fr/start/DesignerSuperListener.java b/designer-realize/src/main/java/com/fr/start/DesignerSuperListener.java index ee4b265022..82aa33207f 100644 --- a/designer-realize/src/main/java/com/fr/start/DesignerSuperListener.java +++ b/designer-realize/src/main/java/com/fr/start/DesignerSuperListener.java @@ -37,7 +37,7 @@ public class DesignerSuperListener { private final ScheduledExecutorService service = Executors.newScheduledThreadPool(2, new NamedThreadFactory("DesignerListener")); private final ExecutorService helpService = Executors.newSingleThreadExecutor( new NamedThreadFactory("DesignerSuperListener-Help")); - + private final ScheduledExecutorService EXIT_SERVICE = Executors.newSingleThreadScheduledExecutor( new NamedThreadFactory("DesignerSuperListener-Exit")); private FineProcess process; private ScheduledFuture fixedFuture; private ScheduledFuture onceFuture; @@ -141,6 +141,8 @@ public class DesignerSuperListener { } private void fallBackReport() { + // 60S都没退出去就强制关闭 + EXIT_SERVICE.schedule(() -> System.exit(1), 60, TimeUnit.SECONDS); DesignUtils.initLookAndFeel(); StartErrorMessageCollector.getInstance().record(DesignerErrorMessage.UNEXCEPTED_FALL_BACK.getId(), DesignerErrorMessage.UNEXCEPTED_FALL_BACK.getMessage(), From e1f72173dcf3b2995e4e38a616d291e5301b5a01 Mon Sep 17 00:00:00 2001 From: "Destiny.Lin" Date: Mon, 25 Dec 2023 16:08:26 +0800 Subject: [PATCH 3/5] =?UTF-8?q?REPORT-109129=20=E5=81=B6=E7=8E=B0=E8=AE=BE?= =?UTF-8?q?=E8=AE=A1=E5=99=A8=E5=85=B3=E9=97=AD=E5=90=8E=E8=BF=9B=E7=A8=8B?= =?UTF-8?q?=E6=AE=8B=E7=95=99=20=E6=B7=BB=E5=8A=A0=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fr/start/DesignerSuperListener.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/designer-realize/src/main/java/com/fr/start/DesignerSuperListener.java b/designer-realize/src/main/java/com/fr/start/DesignerSuperListener.java index 82aa33207f..df62a34412 100644 --- a/designer-realize/src/main/java/com/fr/start/DesignerSuperListener.java +++ b/designer-realize/src/main/java/com/fr/start/DesignerSuperListener.java @@ -11,6 +11,7 @@ import com.fr.event.Event; import com.fr.event.Listener; import com.fr.event.Null; import com.fr.general.ComparatorUtils; +import com.fr.log.FineLoggerFactory; import com.fr.process.FineProcess; import com.fr.process.ProcessEventPipe; import com.fr.process.engine.core.FineProcessContext; @@ -142,7 +143,10 @@ public class DesignerSuperListener { private void fallBackReport() { // 60S都没退出去就强制关闭 - EXIT_SERVICE.schedule(() -> System.exit(1), 60, TimeUnit.SECONDS); + EXIT_SERVICE.schedule(() -> { + FineLoggerFactory.getLogger().error("[DesignerSuperListener] The designer failed to exit gracefully, attempting a forced shutdown."); + System.exit(1); + }, 60, TimeUnit.SECONDS); DesignUtils.initLookAndFeel(); StartErrorMessageCollector.getInstance().record(DesignerErrorMessage.UNEXCEPTED_FALL_BACK.getId(), DesignerErrorMessage.UNEXCEPTED_FALL_BACK.getMessage(), From d5256c01935d1fae7e49fb7aae2e235944939a19 Mon Sep 17 00:00:00 2001 From: roger Date: Tue, 26 Dec 2023 15:04:30 +0800 Subject: [PATCH 4/5] =?UTF-8?q?REPORT-92893=20=E9=94=81=E5=AE=9A=E7=9A=84?= =?UTF-8?q?=E6=A8=A1=E6=9D=BF=EF=BC=8C=E9=87=8D=E5=A4=8D=E5=8F=A6=E5=AD=98?= =?UTF-8?q?=E5=89=AF=E6=9C=AC=EF=BC=8C=E8=AE=BE=E8=AE=A1=E5=99=A8=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E6=A8=A1=E6=9D=BF=E5=86=85=E5=AE=B9=E4=B8=8D=E6=9B=B4?= =?UTF-8?q?=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/utils/TemplateUtils.java | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/utils/TemplateUtils.java b/designer-base/src/main/java/com/fr/design/utils/TemplateUtils.java index 9b426b5c87..250846b47c 100644 --- a/designer-base/src/main/java/com/fr/design/utils/TemplateUtils.java +++ b/designer-base/src/main/java/com/fr/design/utils/TemplateUtils.java @@ -23,6 +23,7 @@ import org.jetbrains.annotations.Nullable; import javax.swing.SwingWorker; import java.io.OutputStream; +import java.util.ArrayList; import java.util.List; import java.util.concurrent.CompletableFuture; import java.util.function.Function; @@ -65,14 +66,7 @@ public class TemplateUtils { if (file == null) { return; } - Runnable doAfterCreateTemplate; - //判断一下要保存的文件是否已打开 - int index = HistoryTemplateListCache.getInstance().contains(file); - JTemplate template = null; - if (index != -1) { - template = HistoryTemplateListCache.getInstance().getHistoryList().get(index); - } - createAndOpenTemplate0(file, oldPath, createByEditingTemplate, openNewTemplate, template); + createAndOpenTemplate0(file, oldPath, createByEditingTemplate, openNewTemplate, null); } /** @@ -181,23 +175,29 @@ public class TemplateUtils { * @param template 需要关闭的模板 */ private static void openNewTemplateAndCloseOldTemplate(FILE file, boolean openNewTemplate, @Nullable JTemplate template) { - new SwingWorker() { + new SwingWorker>, Void>() { @Override - protected Boolean doInBackground() throws Exception { + protected List> doInBackground() throws Exception { + List> needCloseTemplate = new ArrayList<>(); + //判断一下要保存的副本文件是否已打开 + int index = HistoryTemplateListCache.getInstance().contains(file); + if (index != -1) { + WorkContext.getCurrent().get(TplOperator.class).closeAndFreeFile(file.getPath()); + needCloseTemplate.add(HistoryTemplateListCache.getInstance().getHistoryList().get(index)); + } if (JTemplate.isValid(template)) { //给要关闭的模板解锁 WorkContext.getCurrent().get(TplOperator.class).closeAndFreeFile(template.getPath()); - return true; + needCloseTemplate.add(template); } - return false; + return needCloseTemplate; } @Override protected void done() { try { - if (get()) { - //模板释放锁成功后关闭该模板 - HistoryTemplateListCache.getInstance().closeSelectedReport(template); - } + //获取需要关闭的模板 + List> jTemplates = get(); + jTemplates.forEach(jTemplate -> HistoryTemplateListCache.getInstance().closeSelectedReport(jTemplate)); if (openNewTemplate) { DesignerContext.getDesignerFrame().openTemplate(file); } From b41984c788d114b14ea9645f99f1bf803380b7bd Mon Sep 17 00:00:00 2001 From: obo Date: Wed, 27 Dec 2023 09:45:00 +0800 Subject: [PATCH 5/5] =?UTF-8?q?=E6=94=B9=E4=B8=8B=E5=AE=9E=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/fr/design/widgettheme/LabelSettingPane.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer-form/src/main/java/com/fr/design/widgettheme/LabelSettingPane.java b/designer-form/src/main/java/com/fr/design/widgettheme/LabelSettingPane.java index 8edba113cb..4146ef6842 100644 --- a/designer-form/src/main/java/com/fr/design/widgettheme/LabelSettingPane.java +++ b/designer-form/src/main/java/com/fr/design/widgettheme/LabelSettingPane.java @@ -39,7 +39,7 @@ public class LabelSettingPane extends BaseStyleSettingPane if (widgetTheme == null) { widgetTheme = new LabelTheme(); Label label = (Label) t; - if (!FRFont.getInstance().equals(label.getFont())) { + if (!label.getDefaultFont().equals(label.getFont())) { widgetTheme.setFollowTheme(false); widgetTheme.setFontStyle(new FontStyle((label.getFont()))); }