From adb59aa17bcc5425f4b85b450cad484548f369ba Mon Sep 17 00:00:00 2001 From: "Link.Zhao" Date: Wed, 23 Mar 2022 20:05:30 +0800 Subject: [PATCH 01/49] =?UTF-8?q?REPORT-66853=20=E8=80=81=E5=86=B3?= =?UTF-8?q?=E7=AD=96=E6=8A=A5=E8=A1=A8-=E6=B2=A1=E6=9C=89=E5=8B=BE?= =?UTF-8?q?=E9=80=89=E5=9B=BE=E7=89=87=E5=8E=8B=E7=BC=A9=EF=BC=8C=E6=8A=A5?= =?UTF-8?q?=E8=A1=A8=E5=9D=97=E8=AE=BE=E7=BD=AE=E5=9B=BE=E7=89=87=E4=B8=BB?= =?UTF-8?q?=E4=BD=93=E5=A1=AB=E5=85=85=EF=BC=8Cweb=E9=A2=84=E8=A7=88?= =?UTF-8?q?=E6=97=B6=E5=9B=BE=E7=89=87=E4=BC=9A=E6=A8=A1=E7=B3=8A=201?= =?UTF-8?q?=E3=80=81=E4=BF=AE=E6=94=B9=E4=BA=86jpg=E5=9B=BE=E5=83=8F?= =?UTF-8?q?=E7=9A=84=E5=AD=98=E5=82=A8=E6=96=B9=E5=BC=8F=EF=BC=8C=E4=BD=BF?= =?UTF-8?q?=E7=94=A8=E5=8E=9F=E6=96=87=E4=BB=B6=E7=9B=B4=E6=8E=A5=E5=AD=98?= =?UTF-8?q?=E5=82=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/fr/design/gui/frpane/ImgChooseWrapper.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer-base/src/main/java/com/fr/design/gui/frpane/ImgChooseWrapper.java b/designer-base/src/main/java/com/fr/design/gui/frpane/ImgChooseWrapper.java index 19823d8b42..1f84758691 100644 --- a/designer-base/src/main/java/com/fr/design/gui/frpane/ImgChooseWrapper.java +++ b/designer-base/src/main/java/com/fr/design/gui/frpane/ImgChooseWrapper.java @@ -105,7 +105,7 @@ public class ImgChooseWrapper { } else { BufferedImage image = BaseUtils.readImage(selectedFile.getPath()); String type = ImageUtils.getImageType(selectedFile); - imageWithSuffix = new ImageWithSuffix(image, type); + imageWithSuffix = new ImageWithSuffix(image, type, selectedFile.getPath()); } CoreGraphHelper.waitForImage(imageWithSuffix); From 2185496cb52d7a101ea66adde1a34b20229fc835 Mon Sep 17 00:00:00 2001 From: "Henry.Wang" Date: Tue, 12 Apr 2022 11:23:31 +0800 Subject: [PATCH 02/49] =?UTF-8?q?REPORT-68987=20=E6=8A=8A=E9=AB=98?= =?UTF-8?q?=E7=BA=A7=E7=BC=96=E8=BE=91=E5=BD=93=E4=BD=9C=E5=8F=AF=E9=80=89?= =?UTF-8?q?=E7=9A=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/fr/design/javascript/JSContentPane.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/designer-base/src/main/java/com/fr/design/javascript/JSContentPane.java b/designer-base/src/main/java/com/fr/design/javascript/JSContentPane.java index 65bec03a84..c9344f5ca8 100644 --- a/designer-base/src/main/java/com/fr/design/javascript/JSContentPane.java +++ b/designer-base/src/main/java/com/fr/design/javascript/JSContentPane.java @@ -63,7 +63,9 @@ public class JSContentPane extends BasicPane { initFunctionTitle(args); JPanel jsParaPane = createJSParaPane(); - addNewPaneLabel(); + if (needAdvancedEditor()) { + addNewPaneLabel(); + } this.add(jsParaPane, BorderLayout.NORTH); UIScrollPane sp = createContentTextAreaPanel(); @@ -323,4 +325,8 @@ public class JSContentPane extends BasicPane { return provider; } + + protected boolean needAdvancedEditor() { + return true; + } } \ No newline at end of file From d657b5d8bde751e00727b710d75b906ad626d2f5 Mon Sep 17 00:00:00 2001 From: hades Date: Thu, 5 May 2022 18:52:09 +0800 Subject: [PATCH 03/49] =?UTF-8?q?REPORT-70446=20=E4=BA=A4=E4=BA=92?= =?UTF-8?q?=E8=A7=86=E8=A7=89=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mainframe/alphafine/component/ProductNewsImagePanel.java | 2 +- .../fr/design/mainframe/alphafine/question/QuestionPane.java | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/component/ProductNewsImagePanel.java b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/component/ProductNewsImagePanel.java index e87b6f199f..dd1b3c4833 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/component/ProductNewsImagePanel.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/component/ProductNewsImagePanel.java @@ -56,7 +56,7 @@ public class ProductNewsImagePanel extends JPanel { } Set readSet = DesignerEnvManager.getEnvManager().getAlphaFineConfigManager().getReadSet(); if (!readSet.contains(productNews.getId())) { - g2.drawImage(NEW_TIP_IMAGE, 0, 0, this); + g2.drawImage(NEW_TIP_IMAGE, 0, 0, (int) (NEW_TIP_IMAGE.getWidth(this) / SVGLoader.SYSTEM_SCALE), (int) (NEW_TIP_IMAGE.getHeight(this) / SVGLoader.SYSTEM_SCALE), this); } g2.setColor(BACKGROUND_COLOR); diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/question/QuestionPane.java b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/question/QuestionPane.java index 2726824b7b..81617d0d8a 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/question/QuestionPane.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/question/QuestionPane.java @@ -39,7 +39,9 @@ public class QuestionPane extends JPanel { } else { g2.drawImage(QUESTION_BACKGROUND_IMAGE, 0, 0, getWidth(), getHeight(), this); } - g2.drawImage(QUESTION_IMAGE, (getWidth() - QUESTION_IMAGE.getWidth(this)) / 2, (getHeight() - QUESTION_IMAGE.getHeight(this)) / 2, this); + int imageWidth = (int) (QUESTION_IMAGE.getWidth(this) / SVGLoader.SYSTEM_SCALE); + int imageHeight = (int) (QUESTION_IMAGE.getHeight(this) / SVGLoader.SYSTEM_SCALE); + g2.drawImage(QUESTION_IMAGE, (getWidth() - imageWidth) / 2, (getHeight() - imageHeight) / 2, imageWidth, imageHeight, this); } From 5f8806250a469f8f08a1913337021b71e38fc857 Mon Sep 17 00:00:00 2001 From: hades Date: Fri, 6 May 2022 11:02:53 +0800 Subject: [PATCH 04/49] =?UTF-8?q?REPORT-70387=20=E6=AC=A1=E7=AE=A1?= =?UTF-8?q?=E8=BF=9C=E7=A8=8B=E8=BF=9E=E6=8E=A5=EF=BC=8C=E4=BC=9A=E7=9C=8B?= =?UTF-8?q?=E5=88=B0=E7=89=B9=E5=AE=9A=E7=9A=84=E6=B2=A1=E6=9C=89=E6=9D=83?= =?UTF-8?q?=E9=99=90=E7=9A=84=E6=95=B0=E6=8D=AE=E8=BF=9E=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/data/datapane/connect/ConnectionComboBoxPanel.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer-base/src/main/java/com/fr/design/data/datapane/connect/ConnectionComboBoxPanel.java b/designer-base/src/main/java/com/fr/design/data/datapane/connect/ConnectionComboBoxPanel.java index fe69024a82..640fb2762a 100644 --- a/designer-base/src/main/java/com/fr/design/data/datapane/connect/ConnectionComboBoxPanel.java +++ b/designer-base/src/main/java/com/fr/design/data/datapane/connect/ConnectionComboBoxPanel.java @@ -142,7 +142,7 @@ public class ConnectionComboBoxPanel extends ItemEditableComboBoxPanel { if (StringUtils.isNotBlank(s)) { // 之前的写法有多线程问题,nameList异步尚未初始化完成的时候,这里可能无法匹配设置数据连接名称,导致DBTableDataPane打开后连接面板空白 // 这里的需求无非是设置上一次使用的数据连接,做个简单检查这个连接是否存在即可,存在就设置 - if (ConnectionConfig.getInstance().getConnection(s) != null) { + if (nameList.contains(s)) { this.setSelectedItem(s); } } From f2bdb747137a97b67b79cf716230122c24af0005 Mon Sep 17 00:00:00 2001 From: hades Date: Fri, 6 May 2022 16:42:15 +0800 Subject: [PATCH 05/49] =?UTF-8?q?REPORT-70446=20=E4=BA=A4=E4=BA=92?= =?UTF-8?q?=E8=A7=86=E8=A7=89=E4=BF=AE=E6=94=B9=20svg=E5=9B=BE=E7=89=87?= =?UTF-8?q?=E7=BB=98=E5=88=B6=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../component/ProductNewsImagePanel.java | 6 ++++- .../alphafine/question/QuestionPane.java | 23 +++++++++++++++---- .../mainframe/alphafine/images/group_new.svg | 2 +- 3 files changed, 24 insertions(+), 7 deletions(-) diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/component/ProductNewsImagePanel.java b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/component/ProductNewsImagePanel.java index dd1b3c4833..b46d094d8b 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/component/ProductNewsImagePanel.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/component/ProductNewsImagePanel.java @@ -2,8 +2,10 @@ package com.fr.design.mainframe.alphafine.component; import com.fr.base.GraphHelper; import com.fr.base.svg.SVGLoader; +import com.fr.base.svg.SystemScaleUtils; import com.fr.design.DesignerEnvManager; import com.fr.design.mainframe.alphafine.model.ProductNews; +import com.fr.design.utils.SvgPaintUtils; import java.awt.Color; import java.awt.Dimension; import java.awt.Graphics; @@ -56,7 +58,9 @@ public class ProductNewsImagePanel extends JPanel { } Set readSet = DesignerEnvManager.getEnvManager().getAlphaFineConfigManager().getReadSet(); if (!readSet.contains(productNews.getId())) { - g2.drawImage(NEW_TIP_IMAGE, 0, 0, (int) (NEW_TIP_IMAGE.getWidth(this) / SVGLoader.SYSTEM_SCALE), (int) (NEW_TIP_IMAGE.getHeight(this) / SVGLoader.SYSTEM_SCALE), this); + SvgPaintUtils.beforePaint(g2); + g2.drawImage(NEW_TIP_IMAGE, 0, 0, this); + SvgPaintUtils.afterPaint(g2); } g2.setColor(BACKGROUND_COLOR); diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/question/QuestionPane.java b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/question/QuestionPane.java index 81617d0d8a..e0d5288947 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/question/QuestionPane.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/question/QuestionPane.java @@ -1,7 +1,9 @@ package com.fr.design.mainframe.alphafine.question; import com.fr.base.svg.SVGLoader; +import com.fr.base.svg.SystemScaleUtils; import com.fr.design.mainframe.alphafine.AlphaFineUtil; +import com.fr.design.utils.SvgPaintUtils; import java.awt.Color; import java.awt.Dimension; import java.awt.Graphics; @@ -23,6 +25,10 @@ public class QuestionPane extends JPanel { private static final Image QUESTION_BACKGROUND_IMAGE = SVGLoader.load("/com/fr/design/mainframe/alphafine/images/groupbackgroud.svg"); + private static final int WIDTH = 40; + + private static final int HEIGHT = 40; + public QuestionPane() { this.setBackground(new Color(0, 0, 0, 0)); @@ -34,14 +40,21 @@ public class QuestionPane extends JPanel { Graphics2D g2 = (Graphics2D) g; g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); g2.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BILINEAR); + SvgPaintUtils.beforePaint(g2); + // 宽高保持 + int width = SystemScaleUtils.isJreHiDPIEnabled() ? (int) (getWidth() * SVGLoader.SYSTEM_SCALE) : getWidth(); + int height = SystemScaleUtils.isJreHiDPIEnabled() ? (int) (getHeight() * SVGLoader.SYSTEM_SCALE) : getHeight(); + if (AlphaFineUtil.unread()) { - g2.drawImage(NEW_MESSAGE_IMAGE, 0, 0, getWidth(), getHeight(), this); + g2.drawImage(NEW_MESSAGE_IMAGE, 0, 0, width, height, this); } else { - g2.drawImage(QUESTION_BACKGROUND_IMAGE, 0, 0, getWidth(), getHeight(), this); + g2.drawImage(QUESTION_BACKGROUND_IMAGE, 0, 0, width, height, this); } - int imageWidth = (int) (QUESTION_IMAGE.getWidth(this) / SVGLoader.SYSTEM_SCALE); - int imageHeight = (int) (QUESTION_IMAGE.getHeight(this) / SVGLoader.SYSTEM_SCALE); - g2.drawImage(QUESTION_IMAGE, (getWidth() - imageWidth) / 2, (getHeight() - imageHeight) / 2, imageWidth, imageHeight, this); + + int imageWidth = QUESTION_IMAGE.getWidth(this); + int imageHeight = QUESTION_IMAGE.getHeight(this); + g2.drawImage(QUESTION_IMAGE, (width - imageWidth) / 2, (height - imageHeight) / 2, imageWidth, imageHeight,this); + SvgPaintUtils.afterPaint(g2); } diff --git a/designer-realize/src/main/resources/com/fr/design/mainframe/alphafine/images/group_new.svg b/designer-realize/src/main/resources/com/fr/design/mainframe/alphafine/images/group_new.svg index af299d12bd..9b25587c48 100644 --- a/designer-realize/src/main/resources/com/fr/design/mainframe/alphafine/images/group_new.svg +++ b/designer-realize/src/main/resources/com/fr/design/mainframe/alphafine/images/group_new.svg @@ -1,4 +1,4 @@ - + From 5e3cf961e56c1ba3275668dff59f68942bbb38fe Mon Sep 17 00:00:00 2001 From: hades Date: Fri, 6 May 2022 16:42:56 +0800 Subject: [PATCH 06/49] =?UTF-8?q?REPORT-70446=20=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E5=B7=A5=E5=85=B7=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/utils/SvgPaintUtils.java | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 designer-base/src/main/java/com/fr/design/utils/SvgPaintUtils.java diff --git a/designer-base/src/main/java/com/fr/design/utils/SvgPaintUtils.java b/designer-base/src/main/java/com/fr/design/utils/SvgPaintUtils.java new file mode 100644 index 0000000000..fdb460eb41 --- /dev/null +++ b/designer-base/src/main/java/com/fr/design/utils/SvgPaintUtils.java @@ -0,0 +1,28 @@ +package com.fr.design.utils; + +import com.fr.base.svg.SVGLoader; +import com.fr.base.svg.SystemScaleUtils; +import java.awt.Graphics2D; + +/** + * 用于绘制svg图片缩放(高分屏下) + * + * @author hades + * @version 11.0 + * Created by hades on 2022/5/6 + */ +public class SvgPaintUtils { + + public static void beforePaint(Graphics2D g2) { + if (SystemScaleUtils.isJreHiDPIEnabled()) { + g2.scale(1 / SVGLoader.SYSTEM_SCALE, 1 / SVGLoader.SYSTEM_SCALE); + } + } + + public static void afterPaint(Graphics2D g2) { + if (SystemScaleUtils.isJreHiDPIEnabled()) { + g2.scale(SVGLoader.SYSTEM_SCALE, SVGLoader.SYSTEM_SCALE); + } + } + +} From 0da69cc600d2b8aea42b225e86fe415d760fba0a Mon Sep 17 00:00:00 2001 From: pengda Date: Sat, 7 May 2022 11:00:47 +0800 Subject: [PATCH 07/49] =?UTF-8?q?REPORT-70426=20=E6=9D=A1=E4=BB=B6?= =?UTF-8?q?=E5=B1=9E=E6=80=A7=E6=94=AF=E6=8C=81=E6=B1=87=E6=80=BB=E6=95=B0?= =?UTF-8?q?=E7=BB=84-=E4=BA=A4=E4=BA=92=E7=95=8C=E9=9D=A2=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ColSelectedWithSummaryMethodEditor.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/designer-chart/src/main/java/com/fr/design/chart/series/SeriesCondition/ColSelectedWithSummaryMethodEditor.java b/designer-chart/src/main/java/com/fr/design/chart/series/SeriesCondition/ColSelectedWithSummaryMethodEditor.java index 6b6fe08cc7..c8a2ec462f 100644 --- a/designer-chart/src/main/java/com/fr/design/chart/series/SeriesCondition/ColSelectedWithSummaryMethodEditor.java +++ b/designer-chart/src/main/java/com/fr/design/chart/series/SeriesCondition/ColSelectedWithSummaryMethodEditor.java @@ -2,6 +2,7 @@ package com.fr.design.chart.series.SeriesCondition; import com.fr.chart.chartattr.Chart; import com.fr.data.DSColumnWithSummaryMethod; +import com.fr.data.util.function.AbstractDataFunction; import com.fr.design.chart.ChartDataHelper; import com.fr.design.data.datapane.SummaryMethodComboBox; import com.fr.design.editor.editor.Editor; @@ -25,12 +26,15 @@ public class ColSelectedWithSummaryMethodEditor extends Editor Date: Sat, 7 May 2022 16:01:58 +0800 Subject: [PATCH 08/49] =?UTF-8?q?REPORT-70426=20=E6=9D=A1=E4=BB=B6?= =?UTF-8?q?=E5=B1=9E=E6=80=A7=E6=94=AF=E6=8C=81=E6=B1=87=E6=80=BB=E6=95=B0?= =?UTF-8?q?=E7=BB=84=E4=BA=A7=E5=93=81=E9=AA=8C=E6=94=B6=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../SeriesCondition/ColSelectedWithSummaryMethodEditor.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer-chart/src/main/java/com/fr/design/chart/series/SeriesCondition/ColSelectedWithSummaryMethodEditor.java b/designer-chart/src/main/java/com/fr/design/chart/series/SeriesCondition/ColSelectedWithSummaryMethodEditor.java index c8a2ec462f..875bc705a2 100644 --- a/designer-chart/src/main/java/com/fr/design/chart/series/SeriesCondition/ColSelectedWithSummaryMethodEditor.java +++ b/designer-chart/src/main/java/com/fr/design/chart/series/SeriesCondition/ColSelectedWithSummaryMethodEditor.java @@ -20,7 +20,7 @@ public class ColSelectedWithSummaryMethodEditor extends Editor summaryMethodComboBoxModel = new DefaultComboBoxModel<>(SummaryMethodComboBox.CALCULATE_ARRAY); public ColSelectedWithSummaryMethodEditor() { - this.setName(Toolkit.i18nText("Fine-Design_Chart_Summary_Array")); + this.setName(Toolkit.i18nText("Fine-Design_Chart_Summary_Field_Value")); this.setLayout(FRGUIPaneFactory.createLeftZeroLayout()); if (columnNameComboBox == null) { columnNameComboBox = new UIComboBox(); From 8194145fde9f4ce218d328cc2ac91d55f110eb3d Mon Sep 17 00:00:00 2001 From: hades Date: Sat, 7 May 2022 16:35:34 +0800 Subject: [PATCH 09/49] =?UTF-8?q?REPORT-70446=20svg=E7=BB=98=E5=88=B6?= =?UTF-8?q?=E5=8E=BB=E6=8E=89=E6=8A=97=E9=94=AF=E9=BD=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mainframe/alphafine/question/QuestionPane.java | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/question/QuestionPane.java b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/question/QuestionPane.java index e0d5288947..0d0d9ab633 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/question/QuestionPane.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/question/QuestionPane.java @@ -9,7 +9,6 @@ import java.awt.Dimension; import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.Image; -import java.awt.RenderingHints; import javax.swing.JPanel; /** @@ -25,11 +24,6 @@ public class QuestionPane extends JPanel { private static final Image QUESTION_BACKGROUND_IMAGE = SVGLoader.load("/com/fr/design/mainframe/alphafine/images/groupbackgroud.svg"); - private static final int WIDTH = 40; - - private static final int HEIGHT = 40; - - public QuestionPane() { this.setBackground(new Color(0, 0, 0, 0)); } @@ -38,22 +32,20 @@ public class QuestionPane extends JPanel { protected void paintComponent(Graphics g) { super.paintComponent(g); Graphics2D g2 = (Graphics2D) g; - g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); - g2.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BILINEAR); SvgPaintUtils.beforePaint(g2); // 宽高保持 int width = SystemScaleUtils.isJreHiDPIEnabled() ? (int) (getWidth() * SVGLoader.SYSTEM_SCALE) : getWidth(); int height = SystemScaleUtils.isJreHiDPIEnabled() ? (int) (getHeight() * SVGLoader.SYSTEM_SCALE) : getHeight(); if (AlphaFineUtil.unread()) { - g2.drawImage(NEW_MESSAGE_IMAGE, 0, 0, width, height, this); + g2.drawImage(NEW_MESSAGE_IMAGE, 0, 0, this); } else { - g2.drawImage(QUESTION_BACKGROUND_IMAGE, 0, 0, width, height, this); + g2.drawImage(QUESTION_BACKGROUND_IMAGE, 0, 0, this); } int imageWidth = QUESTION_IMAGE.getWidth(this); int imageHeight = QUESTION_IMAGE.getHeight(this); - g2.drawImage(QUESTION_IMAGE, (width - imageWidth) / 2, (height - imageHeight) / 2, imageWidth, imageHeight,this); + g2.drawImage(QUESTION_IMAGE, (width - imageWidth) / 2 - 2, (height - imageHeight) / 2 - 2,this); SvgPaintUtils.afterPaint(g2); } From b00644e34e67809ff63ba7aa57f3f1a837653c2f Mon Sep 17 00:00:00 2001 From: hades Date: Sat, 7 May 2022 16:37:36 +0800 Subject: [PATCH 10/49] =?UTF-8?q?REPORT-70681=20=E6=90=9C=E7=B4=A2?= =?UTF-8?q?=E7=BB=93=E6=9E=9C=E9=AB=98=E4=BA=AE=E5=92=8C=E6=90=9C=E7=B4=A2?= =?UTF-8?q?=E7=BB=93=E6=9E=9C=E5=87=86=E7=A1=AE=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../alphafine/component/AlphaFineFrame.java | 24 +++++++------------ .../ProductNewsSearchWorkerManager.java | 7 +++--- .../alphafine/search/SearchWorkerManager.java | 7 +++--- .../manager/fun/AlphaFineSearchProvider.java | 12 ++++++++++ .../manager/impl/ActionSearchManager.java | 7 ++++++ .../manager/impl/DocumentSearchManager.java | 12 +++++++--- .../manager/impl/FileSearchManager.java | 11 +++++++++ .../manager/impl/PluginSearchManager.java | 11 ++++++++- 8 files changed, 65 insertions(+), 26 deletions(-) diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/component/AlphaFineFrame.java b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/component/AlphaFineFrame.java index 28300c9b2a..d97710ef16 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/component/AlphaFineFrame.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/component/AlphaFineFrame.java @@ -171,38 +171,26 @@ public class AlphaFineFrame extends JFrame { this.settingSearchWorkerManager = new SearchWorkerManager( CellType.ACTION, - searchTextBean -> { - ActionSearchManager.getInstance().getLessSearchResult(searchTextBean.getSegmentation()); - return ActionSearchManager.getInstance().getMoreSearchResult(searchTextBean.getSearchText()); - }, + searchTextBean -> ActionSearchManager.getInstance().getSearchResult(searchTextBean), this, new SimpleRightSearchResultPane(new NoResultPane(NO_RESULT, AlphaFineConstants.NO_RESULT_ICON)) ); fileSearchWorkerManager = new SearchWorkerManager( CellType.FILE, - searchTextBean -> { - FileSearchManager.getInstance().getLessSearchResult(searchTextBean.getSearchText(), searchTextBean.getSegmentation()); - return FileSearchManager.getInstance().getMoreSearchResult(searchTextBean.getSearchText()); - }, + searchTextBean -> FileSearchManager.getInstance().getSearchResult(searchTextBean), this, new LoadingRightSearchResultPane() ); documentWorkerManager = new SearchWorkerManager( CellType.DOCUMENT, - searchTextBean -> { - DocumentSearchManager.getInstance().getLessSearchResult(searchTextBean.getSegmentation()); - return DocumentSearchManager.getInstance().getMoreSearchResult(searchTextBean.getSearchText()); - }, + searchTextBean -> DocumentSearchManager.getInstance().getSearchResult(searchTextBean), this, new SimpleRightSearchResultPane(new JPanel()) ); pluginSearchWorkerManager = new SearchWorkerManager( CellType.PLUGIN, - searchTextBean -> { - PluginSearchManager.getInstance().getLessSearchResult(searchTextBean.getSegmentation()); - return PluginSearchManager.getInstance().getMoreSearchResult(searchTextBean.getSearchText()); - }, + searchTextBean -> PluginSearchManager.getInstance().getSearchResult(searchTextBean), this, new LoadingRightSearchResultPane() ); @@ -663,6 +651,10 @@ public class AlphaFineFrame extends JFrame { resultPane.add(panel, flag); } + public void removeSearchResultPane(JPanel panel) { + resultPane.remove(panel); + } + private void doSearch(String text) { diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/ProductNewsSearchWorkerManager.java b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/ProductNewsSearchWorkerManager.java index 0c230844b8..40161e9baa 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/ProductNewsSearchWorkerManager.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/ProductNewsSearchWorkerManager.java @@ -48,10 +48,11 @@ public class ProductNewsSearchWorkerManager implements SearchManager { checkSearchWork(); searchOver = false; networkError = false; - if (searchResultPane == null) { - searchResultPane = new ProductNewsSearchResultPane(searchTextBean.getSegmentation()); - alphaFineFrame.addResult(searchResultPane, cellType.getFlagStr4Result()); + if (searchResultPane != null) { + alphaFineFrame.removeSearchResultPane(searchResultPane); } + searchResultPane = new ProductNewsSearchResultPane(searchTextBean.getSegmentation()); + alphaFineFrame.addResult(searchResultPane, cellType.getFlagStr4Result()); this.searchWorker = new SwingWorker, Void>() { @Override diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/SearchWorkerManager.java b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/SearchWorkerManager.java index 7aa86b84ae..0b25c3ca1e 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/SearchWorkerManager.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/SearchWorkerManager.java @@ -48,10 +48,11 @@ public class SearchWorkerManager implements SearchManager { } private void initSearchResult(SearchTextBean searchTextBean) { - if (searchResultPane == null) { - searchResultPane = new SearchResultPane(searchTextBean.getSegmentation(), resultShowPane); - alphaFineFrame.addResult(searchResultPane, cellType.getFlagStr4Result()); + if (searchResultPane != null) { + alphaFineFrame.removeSearchResultPane(searchResultPane); } + searchResultPane = new SearchResultPane(searchTextBean.getSegmentation(), resultShowPane); + alphaFineFrame.addResult(searchResultPane, cellType.getFlagStr4Result()); } diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/fun/AlphaFineSearchProvider.java b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/fun/AlphaFineSearchProvider.java index b75aa894c4..631fce88ea 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/fun/AlphaFineSearchProvider.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/fun/AlphaFineSearchProvider.java @@ -1,6 +1,7 @@ package com.fr.design.mainframe.alphafine.search.manager.fun; import com.fr.design.mainframe.alphafine.model.SearchResult; +import com.fr.design.mainframe.alphafine.search.SearchTextBean; /** * Created by XiaXiang on 2017/3/27. @@ -20,4 +21,15 @@ public interface AlphaFineSearchProvider { * @return */ SearchResult getMoreSearchResult(String searchText); + + + /** + * 获取所有搜索结果 取决于具体实现 + * + * @param searchTextBean + * @return + */ + default SearchResult getSearchResult(SearchTextBean searchTextBean) { + return new SearchResult(); + } } diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/ActionSearchManager.java b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/ActionSearchManager.java index 1c4fec0903..a2a1a7037f 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/ActionSearchManager.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/ActionSearchManager.java @@ -8,6 +8,7 @@ import com.fr.design.mainframe.alphafine.cell.model.ActionModel; import com.fr.design.mainframe.alphafine.cell.model.AlphaCellModel; import com.fr.design.mainframe.alphafine.cell.model.MoreModel; import com.fr.design.mainframe.alphafine.model.SearchResult; +import com.fr.design.mainframe.alphafine.search.SearchTextBean; import com.fr.design.mainframe.alphafine.search.manager.fun.AlphaFineSearchProvider; import com.fr.design.mainframe.toolbar.UpdateActionManager; import com.fr.design.mainframe.toolbar.UpdateActionModel; @@ -101,4 +102,10 @@ public class ActionSearchManager implements AlphaFineSearchProvider { public SearchResult getMoreSearchResult(String searchText) { return moreModelList; } + + @Override + public SearchResult getSearchResult(SearchTextBean searchTextBean) { + getLessSearchResult(searchTextBean.getSegmentation()); + return filterModelList; + } } diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/DocumentSearchManager.java b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/DocumentSearchManager.java index 0b49530831..7a74ee6c1d 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/DocumentSearchManager.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/DocumentSearchManager.java @@ -7,15 +7,14 @@ import com.fr.design.mainframe.alphafine.CellType; import com.fr.design.mainframe.alphafine.cell.model.DocumentModel; import com.fr.design.mainframe.alphafine.cell.model.MoreModel; import com.fr.design.mainframe.alphafine.model.SearchResult; +import com.fr.design.mainframe.alphafine.search.SearchTextBean; import com.fr.design.mainframe.alphafine.search.manager.fun.AlphaFineSearchProvider; import com.fr.general.http.HttpToolbox; import com.fr.json.JSONArray; -import com.fr.json.JSONException; import com.fr.json.JSONObject; import com.fr.log.FineLoggerFactory; import com.fr.stable.ArrayUtils; -import java.io.IOException; /** * Created by XiaXiang on 2017/3/27. @@ -24,6 +23,7 @@ public class DocumentSearchManager implements AlphaFineSearchProvider { private static volatile DocumentSearchManager instance; private SearchResult lessModelList; private SearchResult moreModelList; + private SearchResult searchResult; public static DocumentSearchManager getInstance() { if (instance == null) { @@ -54,6 +54,7 @@ public class DocumentSearchManager implements AlphaFineSearchProvider { public SearchResult getLessSearchResult(String[] searchText) { lessModelList = new SearchResult(); moreModelList = new SearchResult(); + searchResult = new SearchResult(); if (DesignerEnvManager.getEnvManager().getAlphaFineConfigManager().isContainDocument()) { if (ArrayUtils.isEmpty(searchText)) { lessModelList.add(new MoreModel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Community_Help"))); @@ -63,7 +64,7 @@ public class DocumentSearchManager implements AlphaFineSearchProvider { if(noConnectList != null){ return noConnectList; } - SearchResult searchResult = new SearchResult(); + searchResult = new SearchResult(); for (int j = 0; j < searchText.length; j++) { String url = AlphaFineConstants.DOCUMENT_SEARCH_URL + searchText[j]; try { @@ -106,4 +107,9 @@ public class DocumentSearchManager implements AlphaFineSearchProvider { return moreModelList; } + @Override + public SearchResult getSearchResult(SearchTextBean searchTextBean) { + getLessSearchResult(searchTextBean.getSegmentation()); + return searchResult; + } } diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/FileSearchManager.java b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/FileSearchManager.java index 327d0555c2..cbba249380 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/FileSearchManager.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/FileSearchManager.java @@ -9,16 +9,19 @@ import com.fr.design.mainframe.alphafine.CellType; import com.fr.design.mainframe.alphafine.cell.model.FileModel; import com.fr.design.mainframe.alphafine.cell.model.MoreModel; import com.fr.design.mainframe.alphafine.model.SearchResult; +import com.fr.design.mainframe.alphafine.search.SearchTextBean; import com.fr.design.mainframe.alphafine.search.manager.fun.AlphaFineSearchProvider; import com.fr.file.filetree.FileNode; import com.fr.file.filetree.FileNodes; import com.fr.general.ComparatorUtils; import com.fr.json.JSONObject; +import com.fr.log.FineLoggerFactory; import com.fr.rpc.ExceptionHandler; import com.fr.rpc.RPCInvokerExceptionInfo; import com.fr.stable.StringUtils; import com.fr.stable.project.ProjectConstants; import com.fr.workspace.WorkContext; +import java.util.Arrays; /** @@ -71,6 +74,8 @@ public class FileSearchManager implements AlphaFineSearchProvider { this.filterModelList = new SearchResult(); this.lessModelList = new SearchResult(); this.moreModelList = new SearchResult(); + FineLoggerFactory.getLogger().error("===={}====", searchStr); + FineLoggerFactory.getLogger().error("分词 ==={}===", Arrays.toString(searchText)); for (int j = 0; j < searchText.length; j++) { this.searchText = dealWithSearchText(searchText[j]); if (StringUtils.isBlank(this.searchText) || ComparatorUtils.equals(this.searchText, DS_NAME)) { @@ -114,6 +119,12 @@ public class FileSearchManager implements AlphaFineSearchProvider { return moreModelList; } + @Override + public SearchResult getSearchResult(SearchTextBean searchTextBean) { + getLessSearchResult(searchTextBean.getSearchText(), searchTextBean.getSegmentation()); + return filterModelList; + } + private void doSearch(String searchText) { if (DesignerEnvManager.getEnvManager().getAlphaFineConfigManager().isContainTemplate()) { for (FileNode node : fileNodes) { diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/PluginSearchManager.java b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/PluginSearchManager.java index 31a1b18ed9..56f7078b41 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/PluginSearchManager.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/PluginSearchManager.java @@ -7,6 +7,7 @@ import com.fr.design.mainframe.alphafine.CellType; import com.fr.design.mainframe.alphafine.cell.model.MoreModel; import com.fr.design.mainframe.alphafine.cell.model.PluginModel; import com.fr.design.mainframe.alphafine.model.SearchResult; +import com.fr.design.mainframe.alphafine.search.SearchTextBean; import com.fr.design.mainframe.alphafine.search.manager.fun.AlphaFineSearchProvider; import com.fr.general.ComparatorUtils; import com.fr.general.http.HttpToolbox; @@ -28,6 +29,7 @@ import java.net.URLEncoder; public class PluginSearchManager implements AlphaFineSearchProvider { private SearchResult lessModelList; private SearchResult moreModelList; + private SearchResult searchResult; private PluginSearchManager() { @@ -97,7 +99,7 @@ public class PluginSearchManager implements AlphaFineSearchProvider { public SearchResult getLessSearchResult(String[] searchText) { this.lessModelList = new SearchResult(); this.moreModelList = new SearchResult(); - SearchResult searchResult = new SearchResult(); + this.searchResult = new SearchResult(); if (DesignerEnvManager.getEnvManager().getAlphaFineConfigManager().isContainPlugin()) { if (ArrayUtils.isEmpty(searchText)) { lessModelList.add(new MoreModel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Plugin_Addon"))); @@ -146,4 +148,11 @@ public class PluginSearchManager implements AlphaFineSearchProvider { public SearchResult getMoreSearchResult(String searchText) { return this.moreModelList; } + + + @Override + public SearchResult getSearchResult(SearchTextBean searchTextBean) { + getLessSearchResult(searchTextBean.getSegmentation()); + return searchResult; + } } From 9f123d067d00837d9ae081dca1c4af4161cb1158 Mon Sep 17 00:00:00 2001 From: hades Date: Sat, 7 May 2022 16:46:57 +0800 Subject: [PATCH 11/49] =?UTF-8?q?REPORT-70681=20fix=20=E5=8E=BB=E6=8E=89?= =?UTF-8?q?=E8=B0=83=E8=AF=95=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../alphafine/question/QuestionWindow.java | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/question/QuestionWindow.java b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/question/QuestionWindow.java index dc78c22abe..ddfdc375ad 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/question/QuestionWindow.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/question/QuestionWindow.java @@ -3,6 +3,7 @@ package com.fr.design.mainframe.alphafine.question; import com.fr.design.i18n.Toolkit; import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.alphafine.AlphaFineHelper; +import com.fr.log.FineLoggerFactory; import java.awt.Color; import java.awt.Dimension; import java.awt.event.MouseAdapter; @@ -10,6 +11,7 @@ import java.awt.event.MouseEvent; import java.awt.event.MouseMotionAdapter; import java.awt.event.WindowAdapter; import java.awt.event.WindowEvent; +import java.awt.event.WindowFocusListener; import javax.swing.JWindow; /** @@ -51,13 +53,42 @@ public class QuestionWindow extends JWindow { @Override public void windowActivated(WindowEvent e) { QuestionWindow.getInstance().setVisible(true); + FineLoggerFactory.getLogger().error("=====> active"); } @Override public void windowDeactivated(WindowEvent e) { QuestionWindow.getInstance().setVisible(false); + FineLoggerFactory.getLogger().error("=====> Deactivate"); } + @Override + public void windowOpened(WindowEvent e) { + FineLoggerFactory.getLogger().error("=====> open"); + } + + @Override + public void windowGainedFocus(WindowEvent e) { + FineLoggerFactory.getLogger().error("===== get focus"); + } + + @Override + public void windowStateChanged(WindowEvent e) { + FineLoggerFactory.getLogger().error("new: {}", e.getNewState()); + FineLoggerFactory.getLogger().error("old: {}", e.getOldState()); + } + }); + + DesignerContext.getDesignerFrame().addWindowFocusListener(new WindowFocusListener() { + @Override + public void windowGainedFocus(WindowEvent e) { + FineLoggerFactory.getLogger().error("get focus"); + } + + @Override + public void windowLostFocus(WindowEvent e) { + FineLoggerFactory.getLogger().error("lost focus"); + } }); questionPane.setToolTipText(Toolkit.i18nText("Fine-Design_Report_AlphaFine_Learn_More_About")); this.setContentPane(questionPane); From 8799446feb3717909341ff9705eeb6989cf91b13 Mon Sep 17 00:00:00 2001 From: hades Date: Sat, 7 May 2022 16:48:42 +0800 Subject: [PATCH 12/49] =?UTF-8?q?REPORT-70681=20fix=20=E5=8E=BB=E6=8E=89?= =?UTF-8?q?=E8=B0=83=E8=AF=95=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../alphafine/question/QuestionWindow.java | 32 ------------------- .../manager/impl/FileSearchManager.java | 4 --- 2 files changed, 36 deletions(-) diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/question/QuestionWindow.java b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/question/QuestionWindow.java index ddfdc375ad..079eecadb8 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/question/QuestionWindow.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/question/QuestionWindow.java @@ -3,7 +3,6 @@ package com.fr.design.mainframe.alphafine.question; import com.fr.design.i18n.Toolkit; import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.alphafine.AlphaFineHelper; -import com.fr.log.FineLoggerFactory; import java.awt.Color; import java.awt.Dimension; import java.awt.event.MouseAdapter; @@ -11,7 +10,6 @@ import java.awt.event.MouseEvent; import java.awt.event.MouseMotionAdapter; import java.awt.event.WindowAdapter; import java.awt.event.WindowEvent; -import java.awt.event.WindowFocusListener; import javax.swing.JWindow; /** @@ -53,41 +51,11 @@ public class QuestionWindow extends JWindow { @Override public void windowActivated(WindowEvent e) { QuestionWindow.getInstance().setVisible(true); - FineLoggerFactory.getLogger().error("=====> active"); } @Override public void windowDeactivated(WindowEvent e) { QuestionWindow.getInstance().setVisible(false); - FineLoggerFactory.getLogger().error("=====> Deactivate"); - } - - @Override - public void windowOpened(WindowEvent e) { - FineLoggerFactory.getLogger().error("=====> open"); - } - - @Override - public void windowGainedFocus(WindowEvent e) { - FineLoggerFactory.getLogger().error("===== get focus"); - } - - @Override - public void windowStateChanged(WindowEvent e) { - FineLoggerFactory.getLogger().error("new: {}", e.getNewState()); - FineLoggerFactory.getLogger().error("old: {}", e.getOldState()); - } - }); - - DesignerContext.getDesignerFrame().addWindowFocusListener(new WindowFocusListener() { - @Override - public void windowGainedFocus(WindowEvent e) { - FineLoggerFactory.getLogger().error("get focus"); - } - - @Override - public void windowLostFocus(WindowEvent e) { - FineLoggerFactory.getLogger().error("lost focus"); } }); questionPane.setToolTipText(Toolkit.i18nText("Fine-Design_Report_AlphaFine_Learn_More_About")); diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/FileSearchManager.java b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/FileSearchManager.java index cbba249380..744b5a8399 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/FileSearchManager.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/FileSearchManager.java @@ -15,13 +15,11 @@ import com.fr.file.filetree.FileNode; import com.fr.file.filetree.FileNodes; import com.fr.general.ComparatorUtils; import com.fr.json.JSONObject; -import com.fr.log.FineLoggerFactory; import com.fr.rpc.ExceptionHandler; import com.fr.rpc.RPCInvokerExceptionInfo; import com.fr.stable.StringUtils; import com.fr.stable.project.ProjectConstants; import com.fr.workspace.WorkContext; -import java.util.Arrays; /** @@ -74,8 +72,6 @@ public class FileSearchManager implements AlphaFineSearchProvider { this.filterModelList = new SearchResult(); this.lessModelList = new SearchResult(); this.moreModelList = new SearchResult(); - FineLoggerFactory.getLogger().error("===={}====", searchStr); - FineLoggerFactory.getLogger().error("分词 ==={}===", Arrays.toString(searchText)); for (int j = 0; j < searchText.length; j++) { this.searchText = dealWithSearchText(searchText[j]); if (StringUtils.isBlank(this.searchText) || ComparatorUtils.equals(this.searchText, DS_NAME)) { From f79b56c2532dd0d82fae8115cd5213f853568512 Mon Sep 17 00:00:00 2001 From: yaohwu Date: Sat, 7 May 2022 17:55:23 +0800 Subject: [PATCH 13/49] =?UTF-8?q?REPORT-71028=20=E9=83=A8=E5=88=86execute?= =?UTF-8?q?=20=E5=9F=8B=E7=82=B9=E8=8E=B7=E5=8F=96=E4=B8=8D=E5=88=B0?= =?UTF-8?q?=E9=A2=9D=E5=A4=96=E7=9A=84session=E7=9B=B8=E5=85=B3=E4=BF=A1?= =?UTF-8?q?=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../record/analyzer/advice/MonitorAdvice.java | 56 ++++++------------- 1 file changed, 16 insertions(+), 40 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/record/analyzer/advice/MonitorAdvice.java b/designer-base/src/main/java/com/fr/design/record/analyzer/advice/MonitorAdvice.java index 68f8c8508f..b70bf44f97 100644 --- a/designer-base/src/main/java/com/fr/design/record/analyzer/advice/MonitorAdvice.java +++ b/designer-base/src/main/java/com/fr/design/record/analyzer/advice/MonitorAdvice.java @@ -5,22 +5,18 @@ import com.fr.general.GeneralUtils; import com.fr.intelli.measure.Estimator; import com.fr.intelli.metrics.Compute; import com.fr.intelli.metrics.MessageRecorderFactory; +import com.fr.intelli.metrics.SessionBinder; import com.fr.intelli.metrics.SupervisoryConfig; import com.fr.intelli.record.Measurable; import com.fr.intelli.record.MeasureObject; import com.fr.intelli.record.MeasureUnit; import com.fr.log.FineLoggerFactory; import com.fr.measure.DBMeterFactory; -import com.fr.stable.ArrayUtils; import com.fr.stable.StringUtils; -import com.fr.stable.web.Session; -import com.fr.stable.web.SessionProvider; import com.fr.third.net.bytebuddy.asm.Advice; import com.fr.third.net.bytebuddy.implementation.bytecode.assign.Assigner; -import com.fr.web.core.SessionPoolManager; import com.fr.web.session.SessionLocalManager; -import java.lang.annotation.Annotation; import java.lang.reflect.Method; import java.util.ArrayList; import java.util.Arrays; @@ -33,32 +29,31 @@ import java.util.regex.Pattern; * created by Harrison on 2022/03/07 **/ public class MonitorAdvice implements DesignerAnalyzerAdvice { - + private static final Pattern P = Pattern.compile("-?\\d+"); private static final int MIN_ERROR_CODE = 10000000; - + @Advice.OnMethodEnter public static void onMethodEnter(@Advice.Origin Method method, @Advice.AllArguments(typing = Assigner.Typing.DYNAMIC) Object[] args, @Advice.Local("startTime") Long startTime, - @Advice.Local("registeredSession") Boolean registeredSession) { - + @Advice.Local("sessionBinder") SessionBinder sessionBinder) { + startTime = (System.currentTimeMillis()); - registeredSession = (findSessionAnnotation(method, args)); + sessionBinder = new SessionBinder(); + sessionBinder.attachSession(method, args); } - + @Advice.OnMethodExit(onThrowable = Exception.class) public static void onMethodExit(@Advice.This(optional = true, typing = Assigner.Typing.DYNAMIC) Object self, @Advice.Origin Method method, @Advice.AllArguments(typing = Assigner.Typing.DYNAMIC) Object[] args, @Advice.Thrown(typing = Assigner.Typing.DYNAMIC) Exception e, @Advice.Local("startTime") Long startTime, - @Advice.Local("registeredSession") Boolean registeredSession) throws Exception { - + @Advice.Local("sessionBinder") SessionBinder sessionBinder) throws Exception { + String error = StringUtils.EMPTY; - try { - if (e != null) { try { error = getErrorContent(e); @@ -95,14 +90,11 @@ public class MonitorAdvice implements DesignerAnalyzerAdvice { } catch (Exception ignore) { //埋点信息入库失败应该不能影响业务流程 } finally { - if (registeredSession) { - // 如果上面记录了,这里就要释放 - SessionLocalManager.releaseSession(); - } + sessionBinder.detachSession(); } } } - + public static String getErrorContent(Exception e) { int errorCode = GeneralUtils.objectToNumber( extractCodeFromString(e.getMessage()) @@ -110,7 +102,7 @@ public class MonitorAdvice implements DesignerAnalyzerAdvice { // 提取字符串中的第一个数字,最小的错误码为10000000 return e.getClass().getName() + ":" + (errorCode >= MIN_ERROR_CODE ? errorCode : StringUtils.EMPTY); } - + public static String extractCodeFromString(String errorMsg) { Matcher m = P.matcher(errorMsg); if (m.find()) { @@ -118,38 +110,22 @@ public class MonitorAdvice implements DesignerAnalyzerAdvice { } return StringUtils.EMPTY; } - + public static void recordSQLDetail(String uuid) { DBMeterFactory.getMeter().submit(uuid); } - + public static void recordSQL(Compute once, MeasureObject measureObject) { if (SupervisoryConfig.getInstance().isEnableMeasureSql() && once.computeSql()) { measureObject.sqlTime(SessionLocalManager.getSqlTime()); measureObject.sql(SessionLocalManager.getSql()); } } - + public static void recordMemory(Compute once, Measurable measurable, MeasureObject measureObject) { if (SupervisoryConfig.getInstance().isEnableMeasureMemory() && once.computeMemory()) { MeasureUnit unit = measurable.measureUnit(); measureObject.memory(unit.measureMemory()); } } - - public static boolean findSessionAnnotation(Method method, Object[] args) { - Annotation[][] all = method.getParameterAnnotations(); - int len = ArrayUtils.getLength(args); - for (int i = 0; i < len; i++) { - Annotation[] current = all[i]; - for (Annotation annotation : current) { - if (annotation.annotationType().equals(Session.class)) { - SessionLocalManager.setSession( - SessionPoolManager.getSessionIDInfor(GeneralUtils.objectToString(args[i]), SessionProvider.class)); - return true; - } - } - } - return false; - } } From 90875d379d3dbbc1e0489d1a85876b15ea3e6f73 Mon Sep 17 00:00:00 2001 From: shine Date: Mon, 9 May 2022 10:16:12 +0800 Subject: [PATCH 14/49] =?UTF-8?q?REPORT-71075=20fix:=E5=9C=BA=E6=99=AF?= =?UTF-8?q?=E5=9C=B0=E5=9B=BE=E8=B6=85=E9=93=BE=E5=BC=B9=E6=A1=86=E5=92=8C?= =?UTF-8?q?=E6=82=AC=E6=B5=AE=E7=AA=97=E5=9B=BE=E8=A1=A8=E4=B8=80=E4=B8=AA?= =?UTF-8?q?=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../designer/component/VanChartUIListControlPane.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartUIListControlPane.java b/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartUIListControlPane.java index 823012f580..bfa8b43e94 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartUIListControlPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartUIListControlPane.java @@ -10,6 +10,7 @@ import com.fr.design.gui.itoolbar.UIToolbar; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayoutHelper; +import com.fr.design.mainframe.chart.mode.ChartEditContext; import com.fr.design.utils.gui.GUICoreUtils; import com.fr.stable.Nameable; import com.fr.van.chart.designer.TableLayout4VanChartHelper; @@ -128,7 +129,9 @@ public abstract class VanChartUIListControlPane extends UIListControlPane implem public void populate(Nameable[] nameableArray) { //特殊处理,使用instanceof判断,弹出不同的面板 - if (SwingUtilities.getWindowAncestor(this) instanceof PopupEditDialog) { + //悬浮窗图表弹框 || 场景地图编辑弹框 都是真正的弹框 从if走 + //fvs.chart走super + if (SwingUtilities.getWindowAncestor(this) instanceof JDialog && !ChartEditContext.duchampMode()) { popupEditDialog = new HyperDialog(cardPane); } super.populate(nameableArray); @@ -136,7 +139,7 @@ public abstract class VanChartUIListControlPane extends UIListControlPane implem protected void popupEditDialog(Point mousePos) { //特殊处理,处理连续弹窗情况,弹出面板定为方式不同 - if (SwingUtilities.getWindowAncestor(this) instanceof PopupEditDialog) { + if (SwingUtilities.getWindowAncestor(this) instanceof JDialog && !ChartEditContext.duchampMode()) { GUICoreUtils.centerWindow(popupEditDialog); popupEditDialog.setVisible(true); return; From 310ec18e723435af5c391f75865de5aa2b12439b Mon Sep 17 00:00:00 2001 From: hades Date: Mon, 9 May 2022 10:41:29 +0800 Subject: [PATCH 15/49] =?UTF-8?q?REPORT-71082=20alphafine=E5=9C=A8?= =?UTF-8?q?=E7=82=B9=E5=87=BB=E5=B8=AE=E5=8A=A9=E6=96=87=E6=A1=A3=E8=B7=B3?= =?UTF-8?q?=E8=BD=AC=E5=90=8E=20=E4=BC=9A=E8=87=AA=E5=8A=A8=E8=B7=B3?= =?UTF-8?q?=E5=88=B0=E6=9C=80=E5=BA=95=E5=B1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/mainframe/alphafine/component/AlphaFineList.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/component/AlphaFineList.java b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/component/AlphaFineList.java index b58a3e51b2..665af56652 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/component/AlphaFineList.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/component/AlphaFineList.java @@ -3,6 +3,7 @@ package com.fr.design.mainframe.alphafine.component; import com.fr.design.mainframe.alphafine.AlphaFineConstants; import com.fr.design.mainframe.alphafine.AlphaFineHelper; import com.fr.design.mainframe.alphafine.cell.model.AlphaCellModel; +import com.fr.design.mainframe.alphafine.cell.model.DocumentModel; import com.fr.design.mainframe.alphafine.preview.ResultShowPane; import java.awt.event.KeyAdapter; import java.awt.event.KeyEvent; @@ -26,7 +27,10 @@ public class AlphaFineList extends JList { AlphaCellModel selectedValue = getSelectedValue(); if (e.getClickCount() == AlphaFineConstants.DEFAULT_CLICK_COUNT && selectedValue.hasAction()) { // 点击搜索结果 主页面移动到后面 - AlphaFineHelper.getAlphaFineDialog().toBack(); + if (!(selectedValue instanceof DocumentModel)) { + // 帮助文档不跳转 + AlphaFineHelper.getAlphaFineDialog().toBack(); + } dealWithSearchResult(); } } From 8fa4db6705b5fee8a20a5e1cc4f7c98a73d4dd3f Mon Sep 17 00:00:00 2001 From: hades Date: Mon, 9 May 2022 10:43:03 +0800 Subject: [PATCH 16/49] =?UTF-8?q?REPORT-70681=20=E5=BC=82=E5=B8=B8?= =?UTF-8?q?=E8=BE=93=E5=87=BA=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../alphafine/search/manager/impl/DocumentSearchManager.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/DocumentSearchManager.java b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/DocumentSearchManager.java index 7a74ee6c1d..bc3b214d0a 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/DocumentSearchManager.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/DocumentSearchManager.java @@ -11,6 +11,7 @@ import com.fr.design.mainframe.alphafine.search.SearchTextBean; import com.fr.design.mainframe.alphafine.search.manager.fun.AlphaFineSearchProvider; import com.fr.general.http.HttpToolbox; import com.fr.json.JSONArray; +import com.fr.json.JSONException; import com.fr.json.JSONObject; import com.fr.log.FineLoggerFactory; import com.fr.stable.ArrayUtils; @@ -82,6 +83,8 @@ public class DocumentSearchManager implements AlphaFineSearchProvider { } } } + } catch (JSONException jsonException) { + FineLoggerFactory.getLogger().warn(jsonException, jsonException.getMessage()); } catch (Exception e) { FineLoggerFactory.getLogger().error("document search error: " + e.getMessage()); } From 437eacd0441949eb9e157f237f04437271f62b0b Mon Sep 17 00:00:00 2001 From: hades Date: Mon, 9 May 2022 12:31:55 +0800 Subject: [PATCH 17/49] =?UTF-8?q?REPORT-71083=20=E6=B8=85=E7=A9=BA?= =?UTF-8?q?=E5=90=8E=20=E9=87=8D=E6=96=B0=E6=90=9C=E7=B4=A2=E5=90=8C?= =?UTF-8?q?=E6=A0=B7=E5=86=85=E5=AE=B9=E6=97=A0=E7=BB=93=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/mainframe/alphafine/component/AlphaFineFrame.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/component/AlphaFineFrame.java b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/component/AlphaFineFrame.java index d97710ef16..86edc6caa2 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/component/AlphaFineFrame.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/component/AlphaFineFrame.java @@ -282,6 +282,7 @@ public class AlphaFineFrame extends JFrame { @Override public void mousePressed(MouseEvent e) { searchTextField.setText(StringUtils.EMPTY); + beforeSearchStr = StringUtils.EMPTY; clearLabel.setVisible(false); } }); @@ -543,6 +544,8 @@ public class AlphaFineFrame extends JFrame { if (StringUtils.isNotEmpty(searchTextField.getText())) { clearLabel.setVisible(true); SearchTooltipPopup.getInstance().show(searchTextFieldWrapperPane); + } else { + beforeSearchStr = StringUtils.EMPTY; } AlphaFineToolTipList alphaFineToolTipList = SearchTooltipPopup.getInstance().getAlphaFineToolTipList(); if (e.getKeyCode() == KeyEvent.VK_ENTER) { From d19abdf10d8762b0e1901b41a7ad0ea4005d7cf3 Mon Sep 17 00:00:00 2001 From: hades Date: Mon, 9 May 2022 12:40:24 +0800 Subject: [PATCH 18/49] =?UTF-8?q?=20REPORT-71083=20=E6=B8=85=E7=A9=BA?= =?UTF-8?q?=E5=90=8E=20=E9=87=8D=E6=96=B0=E6=90=9C=E7=B4=A2=E5=90=8C?= =?UTF-8?q?=E6=A0=B7=E5=86=85=E5=AE=B9=E6=97=A0=E7=BB=93=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/mainframe/alphafine/component/AlphaFineFrame.java | 1 + 1 file changed, 1 insertion(+) diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/component/AlphaFineFrame.java b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/component/AlphaFineFrame.java index 86edc6caa2..218b244baa 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/component/AlphaFineFrame.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/component/AlphaFineFrame.java @@ -593,6 +593,7 @@ public class AlphaFineFrame extends JFrame { SearchTooltipPopup.getInstance().hide(); clearLabel.setVisible(false); switchType(selectedType); + beforeSearchStr = StringUtils.EMPTY; } else if (searchTextField.hasFocus()) { clearLabel.setVisible(true); SearchTooltipPopup.getInstance().show(searchTextFieldWrapperPane); From 9f4492592dcd13bd7dc9b44f28d30431d68467f2 Mon Sep 17 00:00:00 2001 From: "Link.Zhao" Date: Mon, 9 May 2022 16:01:28 +0800 Subject: [PATCH 19/49] =?UTF-8?q?REPORT-71052=20=E3=80=90=E5=86=92?= =?UTF-8?q?=E7=83=9F=E3=80=91=E5=8D=95=E5=85=83=E6=A0=BC=E5=88=A0=E9=99=A4?= =?UTF-8?q?=E6=89=80=E6=9C=89=E8=B6=85=E9=93=BE=EF=BC=8C=E5=86=8D=E6=AC=A1?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=B6=85=E9=93=BE=EF=BC=8C=E6=A0=B7=E5=BC=8F?= =?UTF-8?q?=E6=B2=A1=E6=9C=89=E6=81=A2=E5=A4=8D=E4=B8=BA=E9=BB=98=E8=AE=A4?= =?UTF-8?q?=E8=93=9D=E5=AD=97+=E4=B8=8B=E5=88=92=E7=BA=BF=201=E3=80=81?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/mainframe/HyperlinkGroupPaneActionImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/HyperlinkGroupPaneActionImpl.java b/designer-realize/src/main/java/com/fr/design/mainframe/HyperlinkGroupPaneActionImpl.java index b3bbaf1df0..f2b8076020 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/HyperlinkGroupPaneActionImpl.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/HyperlinkGroupPaneActionImpl.java @@ -89,7 +89,7 @@ public class HyperlinkGroupPaneActionImpl implements HyperlinkGroupPaneActionPro } // 首次添加超链接,将文字样式默认改为蓝色下划线 - if (editCellElement.getNameHyperlinkGroup() == null && hyperlinkGroupPane.getCurrentEvent() != null && hyperlinkGroupPane.getCurrentEvent().getType() == ListDataEvent.INTERVAL_ADDED) { + if ((editCellElement.getNameHyperlinkGroup() == null || editCellElement.getNameHyperlinkGroup().size() == 0) && hyperlinkGroupPane.getCurrentEvent() != null && hyperlinkGroupPane.getCurrentEvent().getType() == ListDataEvent.INTERVAL_ADDED) { editCellElement.setStyle(elementStyle.deriveFRFont(frFont)); } From 191b18826b895a974ea5fa454d134172d0ee8056 Mon Sep 17 00:00:00 2001 From: "Link.Zhao" Date: Mon, 9 May 2022 16:04:09 +0800 Subject: [PATCH 20/49] =?UTF-8?q?REPORT-71052=20=E3=80=90=E5=86=92?= =?UTF-8?q?=E7=83=9F=E3=80=91=E5=8D=95=E5=85=83=E6=A0=BC=E5=88=A0=E9=99=A4?= =?UTF-8?q?=E6=89=80=E6=9C=89=E8=B6=85=E9=93=BE=EF=BC=8C=E5=86=8D=E6=AC=A1?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=B6=85=E9=93=BE=EF=BC=8C=E6=A0=B7=E5=BC=8F?= =?UTF-8?q?=E6=B2=A1=E6=9C=89=E6=81=A2=E5=A4=8D=E4=B8=BA=E9=BB=98=E8=AE=A4?= =?UTF-8?q?=E8=93=9D=E5=AD=97+=E4=B8=8B=E5=88=92=E7=BA=BF=201=E3=80=81?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/fr/design/gui/frpane/ImgChooseWrapper.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer-base/src/main/java/com/fr/design/gui/frpane/ImgChooseWrapper.java b/designer-base/src/main/java/com/fr/design/gui/frpane/ImgChooseWrapper.java index 1f84758691..19823d8b42 100644 --- a/designer-base/src/main/java/com/fr/design/gui/frpane/ImgChooseWrapper.java +++ b/designer-base/src/main/java/com/fr/design/gui/frpane/ImgChooseWrapper.java @@ -105,7 +105,7 @@ public class ImgChooseWrapper { } else { BufferedImage image = BaseUtils.readImage(selectedFile.getPath()); String type = ImageUtils.getImageType(selectedFile); - imageWithSuffix = new ImageWithSuffix(image, type, selectedFile.getPath()); + imageWithSuffix = new ImageWithSuffix(image, type); } CoreGraphHelper.waitForImage(imageWithSuffix); From e4af85f87cb09cfb85ee6bf5ea6ff87c48c2f8a2 Mon Sep 17 00:00:00 2001 From: hades Date: Mon, 9 May 2022 17:41:13 +0800 Subject: [PATCH 21/49] =?UTF-8?q?REPORT-71157=20alphafine=20=E9=AB=98?= =?UTF-8?q?=E7=BA=A7=E6=90=9C=E7=B4=A2=E5=8A=9F=E8=83=BD=E5=A4=B1=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../alphafine/component/AlphaFineFrame.java | 29 ++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/component/AlphaFineFrame.java b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/component/AlphaFineFrame.java index 218b244baa..100e58cd38 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/component/AlphaFineFrame.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/component/AlphaFineFrame.java @@ -77,6 +77,18 @@ import javax.swing.Timer; public class AlphaFineFrame extends JFrame { private static final String ADVANCED_SEARCH_MARK = "k:"; + private static final String ACTION_MARK_SHORT = "k:1 "; + private static final String ACTION_MARK = "k:setting "; + private static final String DOCUMENT_MARK_SHORT = "k:2 "; + private static final String DOCUMENT_MARK = "k:help "; + private static final String FILE_MARK_SHORT = "k:3 "; + private static final String FILE_MARK = "k:reportlets "; + private static final String CPT_MARK = "k:cpt "; + private static final String FRM_MARK = "k:frm "; + private static final String DS_MARK = "k:ds "; + private static final String DS_NAME = "dsname=\""; + private static final String PLUGIN_MARK_SHORT = "k:4 "; + private static final String PLUGIN_MARK = "k:shop "; private static final int TIMER_DELAY = 300; @@ -663,7 +675,7 @@ public class AlphaFineFrame extends JFrame { private void doSearch(String text) { initSearchLoadingPane(); - SearchTextBean searchTextBean = new SearchTextBean(text, segmentationResult); + SearchTextBean searchTextBean = generateSearchTextBean(text); this.productNewsSearchWorkerManager.doSearch(searchTextBean); this.settingSearchWorkerManager.doSearch(searchTextBean); this.fileSearchWorkerManager.doSearch(searchTextBean); @@ -671,6 +683,21 @@ public class AlphaFineFrame extends JFrame { this.pluginSearchWorkerManager.doSearch(searchTextBean); } + private SearchTextBean generateSearchTextBean(String searchText) { + if (searchText.startsWith(ACTION_MARK_SHORT) || searchText.startsWith(ACTION_MARK) + || searchText.startsWith(DOCUMENT_MARK_SHORT) || searchText.startsWith(DOCUMENT_MARK)) { + return new SearchTextBean(StringUtils.EMPTY, new String[]{getStoreText(searchText)}); + } else if (searchText.startsWith(FILE_MARK_SHORT) || searchText.startsWith(FILE_MARK) + || searchText.startsWith(CPT_MARK) || searchText.startsWith(FRM_MARK) + || searchText.startsWith(PLUGIN_MARK_SHORT) || searchText.startsWith(PLUGIN_MARK)) { + return new SearchTextBean(getStoreText(searchText), new String[]{getStoreText(searchText)}); + } else if (searchText.startsWith(DS_MARK)) { + return new SearchTextBean(getStoreText(searchText), new String[]{DS_NAME + getStoreText(searchText)}); + } else { + return new SearchTextBean(searchText, segmentationResult); + } + } + /** * 仅搜索依赖网络的搜索项 * From 7ad91ed466cca3ec4864eb8bdb29de6ccae06511 Mon Sep 17 00:00:00 2001 From: Yvan Date: Mon, 9 May 2022 19:05:29 +0800 Subject: [PATCH 22/49] =?UTF-8?q?REPORT-69725=20=E8=BF=9C=E7=A8=8B?= =?UTF-8?q?=E9=9B=86=E7=BE=A4=E7=8E=AF=E5=A2=83=EF=BC=8C=E5=AD=98=E5=82=A8?= =?UTF-8?q?=E8=BF=87=E7=A8=8B=E6=95=B0=E6=8D=AE=E9=9B=86=E7=9A=84=E5=8F=82?= =?UTF-8?q?=E6=95=B0=E6=B2=A1=E6=9C=89=E5=A4=8D=E5=88=B6=E8=BF=87=E6=9D=A5?= =?UTF-8?q?=20=E3=80=90=E9=97=AE=E9=A2=98=E5=8E=9F=E5=9B=A0=E3=80=91?= =?UTF-8?q?=E7=B2=98=E8=B4=B4=E6=95=B0=E6=8D=AE=E9=9B=86=E7=9A=84=E9=80=BB?= =?UTF-8?q?=E8=BE=91=E6=98=AF=E4=BD=BF=E7=94=A8TableDataWrapper=E7=94=9F?= =?UTF-8?q?=E6=88=90TableDataPane=20+=20=E4=BD=BF=E7=94=A8=E5=BD=93?= =?UTF-8?q?=E4=BD=BF=E7=94=A8TableDataPane=E7=94=9F=E6=88=90=E6=96=B0?= =?UTF-8?q?=E7=9A=84=E6=95=B0=E6=8D=AE=E9=9B=86=EF=BC=9B=E5=9C=A8=E7=94=9F?= =?UTF-8?q?=E6=88=90TableDataPane=E7=9A=84=E6=97=B6=E5=80=99=EF=BC=8C?= =?UTF-8?q?=E4=BC=9A=E8=B0=83=E7=94=A8=E5=AF=B9=E5=BA=94Class=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B=E7=9A=84=E6=9E=84=E9=80=A0=E6=96=B9=E6=B3=95=EF=BC=8C?= =?UTF-8?q?=E5=B9=B6populateBean=E4=B8=80=E4=B8=8B=EF=BC=9B=E5=AF=B9?= =?UTF-8?q?=E4=BA=8E=E5=AD=98=E5=82=A8=E8=BF=87=E7=A8=8B=EF=BC=8CProcedure?= =?UTF-8?q?DataPane=E5=9C=A8populateBean=E7=9A=84=E6=97=B6=E5=80=99?= =?UTF-8?q?=E4=BC=9A=E5=9C=A8SwingWorker=E7=9A=84doInBackground()=E4=B8=AD?= =?UTF-8?q?=E5=8E=BB=E5=81=9A=E4=B8=80=E6=AC=A1=E6=9F=A5=E8=AF=A2=EF=BC=8C?= =?UTF-8?q?=E7=84=B6=E5=90=8E=E5=9C=A8done()=E6=9B=B4=E6=96=B0=E5=8F=82?= =?UTF-8?q?=E6=95=B0=EF=BC=9B=E8=BF=9C=E7=A8=8B=E8=BF=9E=E6=8E=A5=E4=B8=8B?= =?UTF-8?q?=EF=BC=8C=E6=9F=A5=E8=AF=A2=E7=9A=84=E8=BF=87=E7=A8=8B=E5=8F=98?= =?UTF-8?q?=E9=95=BF=EF=BC=8C=E5=AF=BC=E8=87=B4=E8=BF=98=E6=B2=A1=E6=9D=A5?= =?UTF-8?q?=E5=BE=97=E5=8F=8A=E6=9B=B4=E6=96=B0=E4=B8=8A=E5=8F=82=E6=95=B0?= =?UTF-8?q?=EF=BC=8C=E5=90=8E=E7=BB=AD=E4=BD=BF=E7=94=A8TableDataPane?= =?UTF-8?q?=E7=94=9F=E6=88=90=E6=96=B0=E7=9A=84=E6=95=B0=E6=8D=AE=E9=9B=86?= =?UTF-8?q?=E6=97=B6=EF=BC=8C=E5=8F=82=E6=95=B0=E4=B8=BA=E7=A9=BA=EF=BC=8C?= =?UTF-8?q?=E5=9B=A0=E6=AD=A4=E5=88=9B=E5=BB=BADataModel=E7=9A=84=E6=97=B6?= =?UTF-8?q?=E5=80=99=E5=90=8E=E5=8F=B0=E6=8A=A5=E9=94=99=E7=BC=BA=E5=A4=B1?= =?UTF-8?q?=E5=8F=82=E6=95=B0=EF=BC=8C=E5=89=8D=E7=AB=AF=E8=A1=A8=E7=8E=B0?= =?UTF-8?q?=E4=B8=BA=E6=95=B0=E6=8D=AE=E9=9B=86=E7=BC=96=E8=BE=91=E9=9D=A2?= =?UTF-8?q?=E6=9D=BF=E4=B8=8A=E6=B2=A1=E5=8F=82=E6=95=B0=20=E3=80=90?= =?UTF-8?q?=E6=94=B9=E5=8A=A8=E6=96=B9=E6=A1=88=E3=80=911.=E4=B8=93?= =?UTF-8?q?=E5=B1=9E=E4=BA=8E=E5=AD=98=E5=82=A8=E8=BF=87=E7=A8=8B=E7=9A=84?= =?UTF-8?q?ProcedureDataPane=E4=B8=AD=E6=8F=90=E4=BE=9B=E5=8F=AF=E4=BB=A5?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=8F=82=E6=95=B0=E7=9A=84=E6=96=B9=E6=B3=95?= =?UTF-8?q?=EF=BC=9B2.=E5=AF=B9=E5=A4=8D=E5=88=B6=E7=B2=98=E8=B4=B4?= =?UTF-8?q?=E6=97=B6=E8=B0=83=E7=94=A8=E7=9A=84=E7=94=9F=E6=88=90TableData?= =?UTF-8?q?Pane=E7=9A=84=E6=96=B9=E6=B3=95=E5=8C=85=E4=BA=86=E4=B8=80?= =?UTF-8?q?=E5=B1=82=EF=BC=8C=E7=84=B6=E5=90=8E=E5=88=A4=E6=96=AD=E6=98=AF?= =?UTF-8?q?=E5=90=A6=E4=B8=BA=E5=AD=98=E5=82=A8=E8=BF=87=E7=A8=8B=EF=BC=8C?= =?UTF-8?q?=E5=A6=82=E6=9E=9C=E6=98=AF=E7=9A=84=E8=AF=9D=EF=BC=8C=E5=B0=86?= =?UTF-8?q?=E6=BA=90TableData=E7=9A=84=E5=8F=82=E6=95=B0=E7=9B=B4=E6=8E=A5?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E8=BF=9B=E5=8E=BB=EF=BC=8C=E4=BF=9D=E8=AF=81?= =?UTF-8?q?=E5=90=8E=E9=9D=A2=E8=BF=99=E4=B8=AAPane=E9=87=8C=E6=98=AF?= =?UTF-8?q?=E4=B8=80=E7=9B=B4=E6=9C=89=E5=8F=82=E6=95=B0=E7=9A=84=20?= =?UTF-8?q?=E3=80=90review=E5=BB=BA=E8=AE=AE=E3=80=91=E5=8F=AF=E8=83=BD?= =?UTF-8?q?=E6=9C=89=E6=9B=B4=E5=A5=BD=E7=9A=84=E6=94=B9=E6=B3=95=EF=BC=8C?= =?UTF-8?q?=E8=BF=99=E9=87=8C=E8=BF=99=E4=B9=88=E6=94=B9=E4=B8=BB=E8=A6=81?= =?UTF-8?q?=E6=98=AF=E5=9B=A0=E4=B8=BA=E7=94=9F=E6=88=90TableDataPane?= =?UTF-8?q?=E5=92=8CpopulateBean=E7=9A=84=E4=BB=A3=E7=A0=81=E9=83=BD?= =?UTF-8?q?=E6=AF=94=E8=BE=83=E5=8F=A4=E8=80=81=EF=BC=8C=E9=80=BB=E8=BE=91?= =?UTF-8?q?=E4=B9=9F=E4=B8=8D=E7=86=9F=EF=BC=8C=E4=B8=8D=E5=A4=AA=E6=95=A2?= =?UTF-8?q?=E6=94=B9=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../data/datapane/TableDataTreePane.java | 4 ++-- .../paste/TableDataFollowingPasteUtils.java | 20 +++++++++++++++++-- .../tabledatapane/ProcedureDataPane.java | 8 ++++++++ 3 files changed, 28 insertions(+), 4 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/data/datapane/TableDataTreePane.java b/designer-base/src/main/java/com/fr/design/data/datapane/TableDataTreePane.java index 8f03b1cfc4..e425751772 100644 --- a/designer-base/src/main/java/com/fr/design/data/datapane/TableDataTreePane.java +++ b/designer-base/src/main/java/com/fr/design/data/datapane/TableDataTreePane.java @@ -19,6 +19,7 @@ import com.fr.design.data.datapane.management.search.pane.TreeSearchToolbarPane; import com.fr.design.data.datapane.management.search.searcher.TableDataSearchMode; import com.fr.design.data.datapane.management.search.TableDataTreeSearchManager; import com.fr.design.data.tabledata.StoreProcedureWorkerListener; +import com.fr.design.data.tabledata.paste.TableDataFollowingPasteUtils; import com.fr.design.data.tabledata.tabledatapane.AbstractTableDataPane; import com.fr.design.data.tabledata.tabledatapane.DBTableDataPane; import com.fr.design.data.tabledata.wrapper.AbstractTableDataWrapper; @@ -1132,8 +1133,7 @@ public class TableDataTreePane extends BasicTableDataTreePane { // 处理数据集名称 String dsName = getNoRepeatedDsName4Paste(dataWrapperEntry.getKey()); AbstractTableDataWrapper wrapper = dataWrapperEntry.getValue(); - AbstractTableDataPane tableDataPane = wrapper.creatTableDataPane(); - addDataPane(tableDataPane, dsName); + addDataPane(TableDataFollowingPasteUtils.generateTableDataPaneWhenPaste(wrapper), dsName); } } } diff --git a/designer-base/src/main/java/com/fr/design/data/tabledata/paste/TableDataFollowingPasteUtils.java b/designer-base/src/main/java/com/fr/design/data/tabledata/paste/TableDataFollowingPasteUtils.java index f69312d47f..e90b8a4208 100644 --- a/designer-base/src/main/java/com/fr/design/data/tabledata/paste/TableDataFollowingPasteUtils.java +++ b/designer-base/src/main/java/com/fr/design/data/tabledata/paste/TableDataFollowingPasteUtils.java @@ -3,10 +3,12 @@ package com.fr.design.data.tabledata.paste; import com.fr.base.TableData; import com.fr.base.chart.BaseChartCollection; import com.fr.data.TableDataSource; +import com.fr.data.impl.storeproc.StoreProcedure; import com.fr.design.DesignModelAdapter; import com.fr.design.data.DesignTableDataManager; import com.fr.design.data.datapane.TableDataTreePane; import com.fr.design.data.tabledata.tabledatapane.AbstractTableDataPane; +import com.fr.design.data.tabledata.tabledatapane.ProcedureDataPane; import com.fr.design.data.tabledata.wrapper.AbstractTableDataWrapper; import com.fr.design.data.tabledata.wrapper.TableDataWrapper; import com.fr.design.data.tabledata.wrapper.TemplateTableDataWrapper; @@ -63,8 +65,7 @@ public class TableDataFollowingPasteUtils { continue; } AbstractTableDataWrapper tableDataWrapper = new TemplateTableDataWrapper(dataWrapperEntry.getValue(), dsName); - AbstractTableDataPane tableDataPane = tableDataWrapper.creatTableDataPane(); - tableDataTreePane.addDataPane(tableDataPane, dsName); + tableDataTreePane.addDataPane(generateTableDataPaneWhenPaste(tableDataWrapper), dsName); } } @@ -337,4 +338,19 @@ public class TableDataFollowingPasteUtils { return templeteDataSet; } + /** + * 生成粘贴(新建)时使用的AbstractTableDataPane + * 主要是为了处理StoreProcedure,它在远程情况下,无法及时获取参数。这边因为是复制粘贴,所以直接用原TableData的参数即可 + * @param tableDataWrapper wrapper + * @return AbstractTableDataPane + */ + public static AbstractTableDataPane generateTableDataPaneWhenPaste(AbstractTableDataWrapper tableDataWrapper) { + AbstractTableDataPane tableDataPane = tableDataWrapper.creatTableDataPane(); + TableData tableData = tableDataWrapper.getTableData(); + if (tableData instanceof StoreProcedure) { + StoreProcedure storeProcedure = (StoreProcedure) tableData; + ((ProcedureDataPane) tableDataPane).populateParameters(storeProcedure.getParameters()); + } + return tableDataPane; + } } diff --git a/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/ProcedureDataPane.java b/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/ProcedureDataPane.java index d2a1918d4f..a2a279b60e 100644 --- a/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/ProcedureDataPane.java +++ b/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/ProcedureDataPane.java @@ -225,6 +225,14 @@ public class ProcedureDataPane extends AbstractTableDataPane imp } + /** + * 手动更新参数,用于上面populateBean方法中SwingWorker查询来不及的情况 + * @param procedureParameters + */ + public void populateParameters(StoreProcedureParameter[] procedureParameters) { + this.editorPane.populate(procedureParameters); + } + /** * 增加存储过程监听器 * From 1a49e536029074c7204514d3e3054c0d17bbea46 Mon Sep 17 00:00:00 2001 From: hades Date: Mon, 9 May 2022 19:51:37 +0800 Subject: [PATCH 23/49] =?UTF-8?q?REPORT-67417=20=E6=90=9C=E7=B4=A2?= =?UTF-8?q?=E5=8E=86=E5=8F=B2/=E5=B7=B2=E8=AF=BB=E5=8A=A8=E6=80=81=20?= =?UTF-8?q?=E5=8A=A0=E4=B8=8A=E6=8C=81=E4=B9=85=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../alphafine/AlphaFineConfigManager.java | 66 ++++++++++++++++++- 1 file changed, 64 insertions(+), 2 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/actions/help/alphafine/AlphaFineConfigManager.java b/designer-base/src/main/java/com/fr/design/actions/help/alphafine/AlphaFineConfigManager.java index a8970f9d10..892c57ff88 100644 --- a/designer-base/src/main/java/com/fr/design/actions/help/alphafine/AlphaFineConfigManager.java +++ b/designer-base/src/main/java/com/fr/design/actions/help/alphafine/AlphaFineConfigManager.java @@ -9,7 +9,7 @@ import com.fr.stable.xml.XMLPrintWriter; import com.fr.stable.xml.XMLReadable; import com.fr.stable.xml.XMLable; import com.fr.stable.xml.XMLableReader; -import java.util.ArrayList; +import java.util.Arrays; import java.util.HashSet; import java.util.LinkedHashMap; import java.util.List; @@ -99,7 +99,6 @@ public class AlphaFineConfigManager implements XMLable { private String cacheBuildNO; - // todo 暂不持久化 方便测试 /** * key: 登录的bbs用户 * value: alphaFine历史搜索记录 @@ -154,6 +153,10 @@ public class AlphaFineConfigManager implements XMLable { } else if (reader.isChildNode()) { if (ComparatorUtils.equals(reader.getTagName(), "ActionSearchTextCache")) { readActionSearchTextCacheXML(reader); + } else if ("SearchHistory".equals(reader.getTagName())) { + readHistorySearch(reader); + } else if ("ReadSet".equals(reader.getTagName())) { + readReadSet(reader); } } } @@ -180,6 +183,47 @@ public class AlphaFineConfigManager implements XMLable { }); } + private void readHistorySearch(XMLableReader reader) { + reader.readXMLObject(new XMLReadable() { + @Override + public void readXML(XMLableReader xmLableReader) { + if (ComparatorUtils.equals(reader.getTagName(), "history")) { + String tmpVal = reader.getElementValue(); + if (tmpVal != null) { + tmpVal = tmpVal.replace("[",StringUtils.EMPTY).replace("]",StringUtils.EMPTY); + Stack stack = new SizedStack<>(3); + List historyList = Arrays.asList(tmpVal.split(",")); + for (String history : historyList) { + stack.add(history.trim()); + } + historySearchMap.put(reader.getAttrAsString("user", StringUtils.EMPTY), stack); + } + } + } + }); + } + + + private void readReadSet(XMLableReader reader) { + reader.readXMLObject(new XMLReadable() { + @Override + public void readXML(XMLableReader xmLableReader) { + if (ComparatorUtils.equals(reader.getTagName(), "readId")) { + String tmpVal = reader.getElementValue(); + if (tmpVal != null) { + tmpVal = tmpVal.replace("[",StringUtils.EMPTY).replace("]",StringUtils.EMPTY); + String[] idArr = tmpVal.split(","); + Set setId = new HashSet<>(); + for (String id : idArr) { + setId.add(Long.parseLong(id.trim())); + } + readSetMap.put(reader.getAttrAsString("user", StringUtils.EMPTY), setId); + } + } + } + }); + } + @Override public void writeXML(XMLPrintWriter writer) { writer.startTAG("AlphaFineConfigManager"); @@ -198,6 +242,8 @@ public class AlphaFineConfigManager implements XMLable { .attr("needIntelligentCustomerService", this.isNeedIntelligentCustomerService()) .attr("productDynamics", this.isProductDynamics()); writeActionSearchTextCacheXML(writer); + writeSearchHistory(writer); + writeReadSet(writer); writer.end(); } @@ -212,6 +258,22 @@ public class AlphaFineConfigManager implements XMLable { writer.end(); } + private void writeSearchHistory(XMLPrintWriter writer) { + writer.startTAG("SearchHistory"); + for (Map.Entry> entry : historySearchMap.entrySet()) { + writer.startTAG("history").attr("user", entry.getKey()).textNode(entry.getValue().toString()).end(); + } + writer.end(); + } + + private void writeReadSet(XMLPrintWriter writer) { + writer.startTAG("ReadSet"); + for (Map.Entry> entry : readSetMap.entrySet()) { + writer.startTAG("readId").attr("user", entry.getKey()).textNode(entry.getValue().toString()).end(); + } + writer.end(); + } + public boolean isSearchOnLine() { return searchOnLine; } From f47fda9a9f9c14fb7db424e87369c10816194d02 Mon Sep 17 00:00:00 2001 From: hades Date: Tue, 10 May 2022 14:15:39 +0800 Subject: [PATCH 24/49] =?UTF-8?q?REPORT-71217=20alphafine=E4=BB=85?= =?UTF-8?q?=E5=BC=80=E5=90=AF=E6=A8=A1=E7=89=88=E6=97=B6=EF=BC=8C=E8=BF=98?= =?UTF-8?q?=E4=BC=9A=E5=87=BA=E7=8E=B0=E4=BA=A7=E5=93=81=E5=8A=A8=E6=80=81?= =?UTF-8?q?=E4=B8=80=E9=94=AE=E5=A4=84=E7=90=86=E7=9A=84=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/mainframe/alphafine/component/AlphaFineFrame.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/component/AlphaFineFrame.java b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/component/AlphaFineFrame.java index 100e58cd38..bb5d6d0602 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/component/AlphaFineFrame.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/component/AlphaFineFrame.java @@ -385,6 +385,11 @@ public class AlphaFineFrame extends JFrame { selectedLabelList.add(new SelectedLabel(PLUGIN, CellType.PLUGIN)); } selectedType = selectedLabelList.get(0).getCellType(); + // 第一个tab 非产品动态 + if (selectedType != CellType.PRODUCT_NEWS) { + tabLabel.setText(selectedLabelList.get(0).getText()); + readLabel.setVisible(false); + } for (SelectedLabel selectedLabel : selectedLabelList) { selectedLabel.addMouseListener(new MouseAdapter() { From 163293d50a11745b183a2217acc688bd21735ee7 Mon Sep 17 00:00:00 2001 From: hades Date: Tue, 10 May 2022 14:18:37 +0800 Subject: [PATCH 25/49] =?UTF-8?q?REPORT-71221=20=E4=BD=BF=E7=94=A8alt+=20f?= =?UTF-8?q?4=20,=20alphafine=E9=9D=A2=E6=9D=BF=E4=BB=8D=E4=BC=9A=E4=BF=9D?= =?UTF-8?q?=E7=95=99=E4=B8=8A=E4=B8=80=E6=AC=A1=E6=90=9C=E7=B4=A2=E7=BB=93?= =?UTF-8?q?=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/mainframe/alphafine/component/AlphaFineFrame.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/component/AlphaFineFrame.java b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/component/AlphaFineFrame.java index bb5d6d0602..d93a7b2964 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/component/AlphaFineFrame.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/component/AlphaFineFrame.java @@ -808,6 +808,9 @@ public class AlphaFineFrame extends JFrame { public void setVisible(boolean b) { super.setVisible(b); QuestionWindow.getInstance().setVisible(!b); + if (!b) { + AlphaFineHelper.resetAlphaFineDialog(); + } } @Override From 781c00e627cbceeb0f09edbf73242ddf3fdea5a3 Mon Sep 17 00:00:00 2001 From: hades Date: Tue, 10 May 2022 14:19:47 +0800 Subject: [PATCH 26/49] =?UTF-8?q?REPORT-67417=20=E5=A4=84=E7=90=86?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E7=A9=BA=E5=80=BC=E5=9C=BA=E6=99=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../help/alphafine/AlphaFineConfigManager.java | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/actions/help/alphafine/AlphaFineConfigManager.java b/designer-base/src/main/java/com/fr/design/actions/help/alphafine/AlphaFineConfigManager.java index 892c57ff88..1dd08c5266 100644 --- a/designer-base/src/main/java/com/fr/design/actions/help/alphafine/AlphaFineConfigManager.java +++ b/designer-base/src/main/java/com/fr/design/actions/help/alphafine/AlphaFineConfigManager.java @@ -192,9 +192,12 @@ public class AlphaFineConfigManager implements XMLable { if (tmpVal != null) { tmpVal = tmpVal.replace("[",StringUtils.EMPTY).replace("]",StringUtils.EMPTY); Stack stack = new SizedStack<>(3); - List historyList = Arrays.asList(tmpVal.split(",")); + String[] historyList = tmpVal.split(","); for (String history : historyList) { - stack.add(history.trim()); + String value = history.trim(); + if (StringUtils.isNotEmpty(value)) { + stack.add(value); + } } historySearchMap.put(reader.getAttrAsString("user", StringUtils.EMPTY), stack); } @@ -215,7 +218,10 @@ public class AlphaFineConfigManager implements XMLable { String[] idArr = tmpVal.split(","); Set setId = new HashSet<>(); for (String id : idArr) { - setId.add(Long.parseLong(id.trim())); + String value = id.trim(); + if (StringUtils.isNotEmpty(value)) { + setId.add(Long.parseLong(value)); + } } readSetMap.put(reader.getAttrAsString("user", StringUtils.EMPTY), setId); } From f57f3b1fe15c8e892c96ff2312e60b304054a9be Mon Sep 17 00:00:00 2001 From: hades Date: Tue, 10 May 2022 14:20:48 +0800 Subject: [PATCH 27/49] =?UTF-8?q?REPORT-71160=20=E4=BA=A4=E4=BA=92?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/mainframe/alphafine/component/AlphaFineList.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/component/AlphaFineList.java b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/component/AlphaFineList.java index 665af56652..f4ffe50e39 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/component/AlphaFineList.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/component/AlphaFineList.java @@ -49,6 +49,10 @@ public class AlphaFineList extends JList { @Override public void keyPressed(KeyEvent e) { if (e.getKeyCode() == KeyEvent.VK_ENTER) { + AlphaCellModel selectedValue = getSelectedValue(); + if (selectedValue.hasAction() && !(selectedValue instanceof DocumentModel)) { + AlphaFineHelper.getAlphaFineDialog().toBack(); + } dealWithSearchResult(); } } From 4b04d52fdc79ec317519be42b32bc0dfc90b572d Mon Sep 17 00:00:00 2001 From: pengda Date: Tue, 10 May 2022 14:46:45 +0800 Subject: [PATCH 28/49] =?UTF-8?q?REPORT-70955=20=E8=AE=B8=E5=A4=9A?= =?UTF-8?q?=E5=9C=BA=E6=99=AF=E4=B8=8D=E6=94=AF=E6=8C=81=E5=8D=83=E5=88=86?= =?UTF-8?q?=E6=AF=94=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fr/design/gui/style/TextFormatPane.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer-base/src/main/java/com/fr/design/gui/style/TextFormatPane.java b/designer-base/src/main/java/com/fr/design/gui/style/TextFormatPane.java index a53235cf2c..a477cb16c1 100644 --- a/designer-base/src/main/java/com/fr/design/gui/style/TextFormatPane.java +++ b/designer-base/src/main/java/com/fr/design/gui/style/TextFormatPane.java @@ -58,7 +58,7 @@ public class TextFormatPane extends AbstractBasicStylePane implements GlobalName private static final Integer[] TYPES = new Integer[]{ FormatContents.NULL, FormatContents.NUMBER, FormatContents.CURRENCY, FormatContents.PERCENT, - FormatContents.THOUSANDTHS,FormatContents.SCIENTIFIC, + FormatContents.SCIENTIFIC, FormatContents.DATE, FormatContents.TIME, FormatContents.TEXT}; From bb4279b19c0d109f6e96d87d0b82c3326e0d46c8 Mon Sep 17 00:00:00 2001 From: wtianye <10320502+wtianye@user.noreply.gitee.com> Date: Tue, 10 May 2022 15:37:09 +0800 Subject: [PATCH 29/49] =?UTF-8?q?REPORT-71207=20=E5=9C=BA=E6=99=AF?= =?UTF-8?q?=E5=9C=B0=E5=9B=BE=E5=88=A0=E9=99=A4=E8=B6=85=E9=93=BE=E5=BC=B9?= =?UTF-8?q?=E6=A1=86=E7=9A=84=E2=80=9C=E5=8F=96=E6=B6=88=E2=80=9D=E6=8C=89?= =?UTF-8?q?=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../chart/designer/component/VanChartUIListControlPane.java | 4 ---- 1 file changed, 4 deletions(-) diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartUIListControlPane.java b/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartUIListControlPane.java index bfa8b43e94..ba66c03920 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartUIListControlPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartUIListControlPane.java @@ -173,12 +173,8 @@ public abstract class VanChartUIListControlPane extends UIListControlPane implem JPanel buttonsPane = new JPanel(new FlowLayout(FlowLayout.LEFT, 10, 0)); controlPane.add(buttonsPane, BorderLayout.EAST); - //确定 addOkButton(buttonsPane); - //取消 - addCancelButton(buttonsPane); - controlPane.setBorder(BorderFactory.createEmptyBorder(10, 0, 10, 0)); return controlPane; From 875098ed2aa7b3ee364d88e0a46858686e6d074e Mon Sep 17 00:00:00 2001 From: Starryi Date: Tue, 10 May 2022 15:53:09 +0800 Subject: [PATCH 30/49] =?UTF-8?q?REPORT-71158=20=E6=89=93=E5=BC=80fvs?= =?UTF-8?q?=EF=BC=8C=E4=BB=8E=E8=BF=9C=E7=A8=8B=E5=88=87=E6=8D=A2=E5=88=B0?= =?UTF-8?q?=E6=9C=AC=E5=9C=B0=EF=BC=8C=E8=AE=BE=E8=AE=A1=E5=99=A8=E6=A8=A1?= =?UTF-8?q?=E6=9D=BF=E5=B1=95=E7=A4=BA=E7=A9=BA=E7=99=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 【问题原因】 检测JTemplate类型,避免类型转换失败 【改动思路】 同上 【review建议】 --- .../main/java/com/fr/design/gui/xpane/LayoutBorderPane.java | 4 ++-- .../main/java/com/fr/design/gui/xpane/LayoutStylePane.java | 6 ++++-- .../widget/ui/designer/component/WidgetBoundPane.java | 4 ++-- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/designer-form/src/main/java/com/fr/design/gui/xpane/LayoutBorderPane.java b/designer-form/src/main/java/com/fr/design/gui/xpane/LayoutBorderPane.java index cf460f9ceb..7a00075d61 100644 --- a/designer-form/src/main/java/com/fr/design/gui/xpane/LayoutBorderPane.java +++ b/designer-form/src/main/java/com/fr/design/gui/xpane/LayoutBorderPane.java @@ -333,8 +333,8 @@ public class LayoutBorderPane extends BasicPane { JPanel rightPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); defaultPane.add(rightPane, BorderLayout.EAST); rightPane.add(initRightBottomPane(), BorderLayout.CENTER); - JTemplate jTemplate = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate(); - if (!jTemplate.isJWorkBook() && ((JForm)jTemplate).isSelectRootPane()){ + JTemplate jTemplate = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate(); + if (!jTemplate.isJWorkBook() && jTemplate instanceof JForm && ((JForm)jTemplate).isSelectRootPane()){ //界面上表单主体只有背景和透明度可以设置 rightPane.add(initBodyRightTopPane(), BorderLayout.NORTH); } else { diff --git a/designer-form/src/main/java/com/fr/design/gui/xpane/LayoutStylePane.java b/designer-form/src/main/java/com/fr/design/gui/xpane/LayoutStylePane.java index 4a034e9be5..5cbddadb4d 100644 --- a/designer-form/src/main/java/com/fr/design/gui/xpane/LayoutStylePane.java +++ b/designer-form/src/main/java/com/fr/design/gui/xpane/LayoutStylePane.java @@ -66,8 +66,10 @@ public class LayoutStylePane extends BasicBeanPane { this.setLayout(FRGUIPaneFactory.createBorderLayout()); this.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); - JTemplate currentEditingTemplate = HistoryTemplateListCache.getInstance().getCurrentEditingTemplate(); - boolean isRootLayout = currentEditingTemplate != null && !currentEditingTemplate.isJWorkBook() && ((JForm)currentEditingTemplate).isSelectRootPane(); + JTemplate currentEditingTemplate = HistoryTemplateListCache.getInstance().getCurrentEditingTemplate(); + boolean isRootLayout = currentEditingTemplate != null && + !currentEditingTemplate.isJWorkBook() && + currentEditingTemplate instanceof JForm && ((JForm)currentEditingTemplate).isSelectRootPane(); namedTitleStylePane = createNamedTitleStylePane(isRootLayout); namedBodyStylePane = createNamedBodyStylePane(isRootLayout); diff --git a/designer-form/src/main/java/com/fr/design/widget/ui/designer/component/WidgetBoundPane.java b/designer-form/src/main/java/com/fr/design/widget/ui/designer/component/WidgetBoundPane.java index 85265fa6ec..1c77bdaf1e 100644 --- a/designer-form/src/main/java/com/fr/design/widget/ui/designer/component/WidgetBoundPane.java +++ b/designer-form/src/main/java/com/fr/design/widget/ui/designer/component/WidgetBoundPane.java @@ -76,8 +76,8 @@ public class WidgetBoundPane extends BasicPane { height.setEnabled(false); } - JTemplate jTemplate = HistoryTemplateListCache.getInstance().getCurrentEditingTemplate(); - if (jTemplate.isJWorkBook() || !((JForm)jTemplate).isSelectRootPane()) { + JTemplate jTemplate = HistoryTemplateListCache.getInstance().getCurrentEditingTemplate(); + if (jTemplate.isJWorkBook() || !((jTemplate instanceof JForm) && ((JForm)jTemplate).isSelectRootPane())) { ratioLockedButton = new AspectRatioLockedButton(width, height); ratioLockedButton.setGlobalName(i18nText("Fine-Design_Form_Coords_And_Size")); ratioLockedButton.setLockEnabled(false); From 03d61df45ca7181e5aac4e989ff23c37bde92780 Mon Sep 17 00:00:00 2001 From: hades Date: Tue, 10 May 2022 16:03:16 +0800 Subject: [PATCH 31/49] =?UTF-8?q?REPORT-71062=20=E3=80=90=E5=86=92?= =?UTF-8?q?=E7=83=9F=E3=80=91=E8=AE=BE=E8=AE=A1=E5=99=A8=E5=90=AF=E5=8A=A8?= =?UTF-8?q?=E6=8A=A5=E9=94=99=20=E4=B8=8D=E5=BD=B1=E5=93=8D=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=E7=9A=84=E6=8A=A5=E9=94=99=E6=97=A5=E5=BF=97=20?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/fr/design/login/socketio/LoginAuthServer.java | 2 +- .../com/fr/design/record/analyzer/DesignerAnalyzerListener.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/login/socketio/LoginAuthServer.java b/designer-base/src/main/java/com/fr/design/login/socketio/LoginAuthServer.java index 0340fc3de3..2353965581 100644 --- a/designer-base/src/main/java/com/fr/design/login/socketio/LoginAuthServer.java +++ b/designer-base/src/main/java/com/fr/design/login/socketio/LoginAuthServer.java @@ -74,7 +74,7 @@ public class LoginAuthServer { try { server.start(); } catch (Exception e) { - FineLoggerFactory.getLogger().error(e.getMessage(), e); + FineLoggerFactory.getLogger().warn(e.getMessage(), e); } } diff --git a/designer-base/src/main/java/com/fr/design/record/analyzer/DesignerAnalyzerListener.java b/designer-base/src/main/java/com/fr/design/record/analyzer/DesignerAnalyzerListener.java index 8db3a395f1..cd52cec38e 100644 --- a/designer-base/src/main/java/com/fr/design/record/analyzer/DesignerAnalyzerListener.java +++ b/designer-base/src/main/java/com/fr/design/record/analyzer/DesignerAnalyzerListener.java @@ -18,6 +18,6 @@ public class DesignerAnalyzerListener extends AgentBuilder.Listener.Adapter { @Override public void onError(String typeName, ClassLoader classLoader, JavaModule module, boolean loaded, Throwable throwable) { - FineLoggerFactory.getLogger().error("Designer-Analyzer transform error:" + typeName); + FineLoggerFactory.getLogger().warn("Designer-Analyzer transform error:" + typeName); } } From 04435927b963c0fd63af039fd671a5aa59431fd5 Mon Sep 17 00:00:00 2001 From: rinoux Date: Tue, 10 May 2022 16:45:14 +0800 Subject: [PATCH 32/49] =?UTF-8?q?REPORT-69285=20=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E8=BF=9E=E6=8E=A5=E5=AE=89=E5=85=A8=E5=85=B3=E9=94=AE=E5=AD=97?= =?UTF-8?q?=E6=A3=80=E6=9F=A5=E6=8B=A6=E6=88=AA=EF=BC=8C=E8=AE=BE=E8=AE=A1?= =?UTF-8?q?=E5=99=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ConnectionListDialogActionAdapter.java | 12 +++++++++- .../datapane/connect/ConnectionListPane.java | 23 +++++++++++++++++-- .../connect/ConnectionManagerPane.java | 7 +++--- .../datapane/connect/ConnectionShowPane.java | 2 +- 4 files changed, 36 insertions(+), 8 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/data/datapane/connect/ConnectionListDialogActionAdapter.java b/designer-base/src/main/java/com/fr/design/data/datapane/connect/ConnectionListDialogActionAdapter.java index 2428c9a005..947cb6e75f 100644 --- a/designer-base/src/main/java/com/fr/design/data/datapane/connect/ConnectionListDialogActionAdapter.java +++ b/designer-base/src/main/java/com/fr/design/data/datapane/connect/ConnectionListDialogActionAdapter.java @@ -2,11 +2,15 @@ package com.fr.design.data.datapane.connect; import com.fr.design.dialog.BasicDialog; import com.fr.design.dialog.DialogActionAdapter; +import com.fr.design.dialog.FineJOptionPane; import com.fr.design.editlock.EditLockUtils; +import com.fr.design.i18n.Toolkit; import com.fr.design.mainframe.DesignerContext; import com.fr.file.ConnectionConfig; import com.fr.report.LockItem; +import javax.swing.JOptionPane; + /** * @author hades * @version 11.0 @@ -32,7 +36,13 @@ public class ConnectionListDialogActionAdapter extends DialogActionAdapter { connectionListDialog.setDoOKSucceed(false); return; } - connectionManagerPane.update(connectionConfig); + try { + connectionManagerPane.update(connectionConfig); + } catch (Exception e) { + connectionListDialog.setDoOKSucceed(false); + FineJOptionPane.showMessageDialog(connectionManagerPane, e.getMessage(), Toolkit.i18nText("Fine-Design_Basic_Error"), JOptionPane.ERROR_MESSAGE); + return; + } DesignerContext.getDesignerBean("databasename").refreshBeanElement(); // 关闭定义数据连接页面,为其解锁 EditLockUtils.unlock(LockItem.CONNECTION); diff --git a/designer-base/src/main/java/com/fr/design/data/datapane/connect/ConnectionListPane.java b/designer-base/src/main/java/com/fr/design/data/datapane/connect/ConnectionListPane.java index 12c62b4350..e4deae04ba 100644 --- a/designer-base/src/main/java/com/fr/design/data/datapane/connect/ConnectionListPane.java +++ b/designer-base/src/main/java/com/fr/design/data/datapane/connect/ConnectionListPane.java @@ -1,6 +1,7 @@ package com.fr.design.data.datapane.connect; import com.fr.config.RemoteConfigEvent; +import com.fr.data.core.db.JDBCSecurityChecker; import com.fr.data.impl.Connection; import com.fr.data.impl.ConnectionBean; import com.fr.data.impl.JDBCDatabaseConnection; @@ -28,6 +29,7 @@ import com.fr.transaction.WorkerFacade; import com.fr.workspace.WorkContext; import java.awt.Window; +import java.sql.SQLException; import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; @@ -166,7 +168,7 @@ public class ConnectionListPane extends JListControlPane implements ConnectionSh /** * Update. */ - public void update(ConnectionConfig connectionConfig) { + public void update(ConnectionConfig connectionConfig) throws Exception { // Nameable[]居然不能强转成NameObject[],一定要这么写... Nameable[] res = this.update(); Map updatedMap = new LinkedHashMap<>(); @@ -188,10 +190,27 @@ public class ConnectionListPane extends JListControlPane implements ConnectionSh } }); - + this.checkSecurity(addedOrUpdatedConnections); this.alterConnections(removedConnNames, addedOrUpdatedConnections); } + + private void checkSecurity(List addedOrUpdatedConnections) throws Exception { + + for (ConnectionBean connectionBean : addedOrUpdatedConnections) { + Connection connection = connectionBean.getConnection(); + if (connection instanceof JDBCDatabaseConnection) { + try { + JDBCSecurityChecker.checkURL(((JDBCDatabaseConnection) connection).getURL()); + JDBCSecurityChecker.checkValidationQuery(((JDBCDatabaseConnection) connection).getDbcpAttr().getValidationQuery()); + } catch (SQLException e) { + throw new SQLException(Toolkit.i18nText("Fine-Design_Basic_Database_Connection_Invalid_Config", connectionBean.getName()) + ", " + e.getMessage(), e.getCause()); + } + } + } + + } + private void alterConnections(List removedConnNames, List addedOrUpdatedConnections) { try { diff --git a/designer-base/src/main/java/com/fr/design/data/datapane/connect/ConnectionManagerPane.java b/designer-base/src/main/java/com/fr/design/data/datapane/connect/ConnectionManagerPane.java index 6c768145f3..eadf456e09 100644 --- a/designer-base/src/main/java/com/fr/design/data/datapane/connect/ConnectionManagerPane.java +++ b/designer-base/src/main/java/com/fr/design/data/datapane/connect/ConnectionManagerPane.java @@ -4,9 +4,8 @@ import com.fr.design.gui.frpane.LoadingBasicPane; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.file.ConnectionConfig; - -import javax.swing.*; -import java.awt.*; +import javax.swing.JPanel; +import java.awt.BorderLayout; import java.util.HashMap; public class ConnectionManagerPane extends LoadingBasicPane implements ConnectionShowPane { @@ -39,7 +38,7 @@ public class ConnectionManagerPane extends LoadingBasicPane implements Connectio this.connectionListPane.populate(datasourceManager); } - public void update(ConnectionConfig datasourceManager) { + public void update(ConnectionConfig datasourceManager) throws Exception { this.connectionListPane.update(datasourceManager); } diff --git a/designer-base/src/main/java/com/fr/design/data/datapane/connect/ConnectionShowPane.java b/designer-base/src/main/java/com/fr/design/data/datapane/connect/ConnectionShowPane.java index b5ae09be8e..2b74ddcf9e 100644 --- a/designer-base/src/main/java/com/fr/design/data/datapane/connect/ConnectionShowPane.java +++ b/designer-base/src/main/java/com/fr/design/data/datapane/connect/ConnectionShowPane.java @@ -7,7 +7,7 @@ import com.fr.file.ConnectionConfig; * 数据链接显示面板 */ public interface ConnectionShowPane { - void update(ConnectionConfig connectionConfig); + void update(ConnectionConfig connectionConfig) throws Exception; void populate(ConnectionConfig connectionConfig); From 00a9347e5f2981beea40e098b608afea55c153ba Mon Sep 17 00:00:00 2001 From: Yvan Date: Tue, 10 May 2022 18:26:12 +0800 Subject: [PATCH 33/49] =?UTF-8?q?REPORT-70857=20=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E9=9B=86=E5=A4=8D=E5=88=B6=E5=90=8E=E7=8B=AC=E7=AB=8B=20?= =?UTF-8?q?=E3=80=90=E9=97=AE=E9=A2=98=E5=8E=9F=E5=9B=A0=E3=80=91=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E9=9B=86=E5=9C=A8=E5=81=9A=E5=A4=8D=E5=88=B6=E7=B2=98?= =?UTF-8?q?=E8=B4=B4=E7=9A=84=E6=97=B6=E5=80=99=EF=BC=8C=E6=B2=A1=E6=9C=89?= =?UTF-8?q?clone=E6=95=B0=E6=8D=AE=E6=BA=90=EF=BC=8C=E5=AF=BC=E8=87=B4?= =?UTF-8?q?=E8=AE=B8=E5=A4=9A=E5=8F=98=E9=87=8F=E9=83=BD=E5=85=B1=E7=94=A8?= =?UTF-8?q?=E4=BA=86=EF=BC=8C=E4=BA=8E=E6=98=AF=E4=BC=9A=E6=94=B9=E4=B8=80?= =?UTF-8?q?=E4=B8=AA=3D=E6=94=B9=E4=B8=80=E7=89=87=20=E3=80=90=E6=94=B9?= =?UTF-8?q?=E5=8A=A8=E6=96=B9=E6=A1=88=E3=80=91=E6=B7=BB=E5=8A=A0clone?= =?UTF-8?q?=E5=A4=84=E7=90=86=20=E3=80=90review=E5=BB=BA=E8=AE=AE=E3=80=91?= =?UTF-8?q?=E6=97=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../clip/TableDataTreeClipboard.java | 8 +++- .../paste/TableDataFollowingPasteUtils.java | 37 +++++++++++++++++++ 2 files changed, 44 insertions(+), 1 deletion(-) diff --git a/designer-base/src/main/java/com/fr/design/data/datapane/management/clip/TableDataTreeClipboard.java b/designer-base/src/main/java/com/fr/design/data/datapane/management/clip/TableDataTreeClipboard.java index 44ae90b2cf..3094df145b 100644 --- a/designer-base/src/main/java/com/fr/design/data/datapane/management/clip/TableDataTreeClipboard.java +++ b/designer-base/src/main/java/com/fr/design/data/datapane/management/clip/TableDataTreeClipboard.java @@ -1,6 +1,9 @@ package com.fr.design.data.datapane.management.clip; +import com.fr.base.TableData; +import com.fr.design.data.tabledata.paste.TableDataFollowingPasteUtils; import com.fr.design.data.tabledata.wrapper.AbstractTableDataWrapper; +import com.fr.design.data.tabledata.wrapper.TemplateTableDataWrapper; import com.fr.general.NameObject; import java.util.HashMap; @@ -45,7 +48,10 @@ public class TableDataTreeClipboard { return resultMap; } for (NameObject selectedNameObject : selectedNameObjects) { - resultMap.put(selectedNameObject.getName(), (AbstractTableDataWrapper) selectedNameObject.getObject()); + TableData cloned = TableDataFollowingPasteUtils.cloneTableData(((AbstractTableDataWrapper) selectedNameObject.getObject()).getTableData()); + if (cloned != null) { + resultMap.put(selectedNameObject.getName(), new TemplateTableDataWrapper(cloned)); + } } return resultMap; } diff --git a/designer-base/src/main/java/com/fr/design/data/tabledata/paste/TableDataFollowingPasteUtils.java b/designer-base/src/main/java/com/fr/design/data/tabledata/paste/TableDataFollowingPasteUtils.java index e90b8a4208..d9892c7637 100644 --- a/designer-base/src/main/java/com/fr/design/data/tabledata/paste/TableDataFollowingPasteUtils.java +++ b/designer-base/src/main/java/com/fr/design/data/tabledata/paste/TableDataFollowingPasteUtils.java @@ -28,6 +28,7 @@ import com.fr.report.cell.FloatElement; import com.fr.report.cell.tabledata.ElementUsedTableDataProvider; import com.fr.report.worksheet.FormElementCase; import com.fr.stable.StringUtils; +import org.jetbrains.annotations.Nullable; import java.util.Arrays; import java.util.HashMap; @@ -97,6 +98,8 @@ public class TableDataFollowingPasteUtils { } } } + // 对TableData做clone处理 + tempMap = dealWithTableData4Clone(tempMap); // 处理存储过程名称问题 return dealWithStoreProcedure(tempMap); } catch (Exception e) { @@ -179,6 +182,8 @@ public class TableDataFollowingPasteUtils { collectTableDataInChartCollection(templateTableData, tempMap, widget); collectTableDataInElementCaseEditor(templateTableData, tempMap, widget); } + // 对TableData做clone处理 + tempMap = dealWithTableData4Clone(tempMap); // 处理存储过程名称问题 return dealWithStoreProcedure(tempMap); } catch (Exception e) { @@ -187,6 +192,23 @@ public class TableDataFollowingPasteUtils { return new HashMap<>(); } + /** + * 对Map中所有的TableData做clone处理 + * @param tempMap + */ + private static Map dealWithTableData4Clone(Map tempMap) { + Map resultMap = new HashMap<>(); + for (Map.Entry entry : tempMap.entrySet()) { + String name = entry.getKey(); + TableData tableData = entry.getValue(); + TableData clonedTableData = cloneTableData(tableData); + if (clonedTableData != null) { + resultMap.put(name, clonedTableData); + } + } + return resultMap; + } + /** * 收集控件-报表块中使用的数据集 * @@ -353,4 +375,19 @@ public class TableDataFollowingPasteUtils { } return tableDataPane; } + + /** + * clone数据源,如果失败,打印日志,并返回null,谨慎使用 + * @param tableData + * @return + */ + @Nullable + public static TableData cloneTableData(TableData tableData) { + try { + return (TableData) tableData.clone(); + } catch (Exception e) { + FineLoggerFactory.getLogger().error(e, "clone table data {} failed", tableData.getName()); + } + return null; + } } From b1d773ab502fa6a6c35c734910b7efeabc0be7b4 Mon Sep 17 00:00:00 2001 From: hades Date: Tue, 10 May 2022 21:54:05 +0800 Subject: [PATCH 34/49] =?UTF-8?q?REPORT-71213=20=E8=AE=BE=E8=AE=A1?= =?UTF-8?q?=E5=99=A8=E5=85=B3=E9=97=AD=E5=A4=B1=E8=B4=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fr/exit/ConfigToPropMigrator.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/designer-base/src/main/java/com/fr/exit/ConfigToPropMigrator.java b/designer-base/src/main/java/com/fr/exit/ConfigToPropMigrator.java index 909768beef..ec77559856 100644 --- a/designer-base/src/main/java/com/fr/exit/ConfigToPropMigrator.java +++ b/designer-base/src/main/java/com/fr/exit/ConfigToPropMigrator.java @@ -40,7 +40,14 @@ public class ConfigToPropMigrator { } public void execute() { + try { + _execute(); + } catch (Throwable throwable) { + FineLoggerFactory.getLogger().warn(throwable.getMessage(), throwable); + } + } + private void _execute() { if (WorkContext.getCurrent().isLocal()) { String url = "jdbc:hsqldb:file://" + WorkContext.getCurrent().getPath() + "/" + ProjectConstants.EMBED_DB_DIRECTORY + "/finedb/db;hsqldb.tx=mvcc"; From 65413b2db67980e26b50a8d147eac711c0eb183d Mon Sep 17 00:00:00 2001 From: hades Date: Tue, 10 May 2022 21:55:39 +0800 Subject: [PATCH 35/49] =?UTF-8?q?REPORT-70446=20mac=E4=B8=8B=E6=82=AC?= =?UTF-8?q?=E6=B5=AE=E5=BC=B9=E7=AA=97=E9=9A=90=E8=97=8F=E9=87=8D=E6=96=B0?= =?UTF-8?q?=E5=B1=95=E7=A4=BA=E6=97=B6=E5=81=B6=E7=8E=B0=E7=99=BD=E7=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/mainframe/alphafine/question/QuestionWindow.java | 1 + 1 file changed, 1 insertion(+) diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/question/QuestionWindow.java b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/question/QuestionWindow.java index 079eecadb8..c69b6c468e 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/question/QuestionWindow.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/question/QuestionWindow.java @@ -55,6 +55,7 @@ public class QuestionWindow extends JWindow { @Override public void windowDeactivated(WindowEvent e) { + QuestionWindow.getInstance().dispose(); QuestionWindow.getInstance().setVisible(false); } }); From db44cbdb55f519f339617de2bf6be6e52282bcb6 Mon Sep 17 00:00:00 2001 From: Yvan Date: Wed, 11 May 2022 11:25:20 +0800 Subject: [PATCH 36/49] =?UTF-8?q?REPORT-70857=20=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E9=9B=86=E5=A4=8D=E5=88=B6=E5=90=8E=E7=8B=AC=E7=AB=8B=20?= =?UTF-8?q?=E3=80=90=E9=97=AE=E9=A2=98=E5=8E=9F=E5=9B=A0=E3=80=91=E8=B7=9F?= =?UTF-8?q?=E9=9A=8F=E5=A4=8D=E5=88=B6=E7=9A=84=E6=97=B6=E5=80=99=E9=9C=80?= =?UTF-8?q?=E8=A6=81=E5=A4=84=E7=90=86=E5=AD=98=E5=82=A8=E8=BF=87=E7=A8=8B?= =?UTF-8?q?=E5=90=8D=E7=A7=B0=E9=97=AE=E9=A2=98=EF=BC=8C=E5=85=B6=E4=B8=AD?= =?UTF-8?q?=E6=9C=89=E5=8C=B9=E9=85=8DTableData=E7=9A=84=E6=93=8D=E4=BD=9C?= =?UTF-8?q?=EF=BC=8C=E8=80=8C=E5=A4=8D=E5=88=B6=E6=9C=AC=E8=BA=AB=E8=BF=98?= =?UTF-8?q?=E9=9C=80=E8=A6=81=E5=A4=84=E7=90=86TableData=E7=9A=84clone?= =?UTF-8?q?=EF=BC=8C=E5=A6=82=E6=9E=9C=E5=85=88clone=EF=BC=8C=E5=86=8D?= =?UTF-8?q?=E5=8E=BB=E5=8C=B9=E9=85=8DTableData=EF=BC=8C=E5=AF=B9=E8=B1=A1?= =?UTF-8?q?=E5=B0=B1=E4=B8=8D=E7=9B=B8=E7=AD=89=E4=BA=86=20=E3=80=90?= =?UTF-8?q?=E6=94=B9=E5=8A=A8=E6=80=9D=E8=B7=AF=E3=80=91=E5=B0=86=E5=8C=B9?= =?UTF-8?q?=E9=85=8DTableData=E7=9A=84=E6=93=8D=E4=BD=9C=E6=94=BE=E5=9C=A8?= =?UTF-8?q?clone=E5=A4=84=E7=90=86=E4=B9=8B=E5=89=8D=20=E3=80=90review?= =?UTF-8?q?=E5=BB=BA=E8=AE=AE=E3=80=91=E6=97=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../paste/TableDataFollowingPasteUtils.java | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/data/tabledata/paste/TableDataFollowingPasteUtils.java b/designer-base/src/main/java/com/fr/design/data/tabledata/paste/TableDataFollowingPasteUtils.java index d9892c7637..6ebfdca0e8 100644 --- a/designer-base/src/main/java/com/fr/design/data/tabledata/paste/TableDataFollowingPasteUtils.java +++ b/designer-base/src/main/java/com/fr/design/data/tabledata/paste/TableDataFollowingPasteUtils.java @@ -28,6 +28,7 @@ import com.fr.report.cell.FloatElement; import com.fr.report.cell.tabledata.ElementUsedTableDataProvider; import com.fr.report.worksheet.FormElementCase; import com.fr.stable.StringUtils; +import com.fr.third.org.apache.commons.lang3.ObjectUtils; import org.jetbrains.annotations.Nullable; import java.util.Arrays; @@ -98,10 +99,11 @@ public class TableDataFollowingPasteUtils { } } } + // 处理存储过程名称问题,名称问题需要优先处理,否则就找不到匹配的TableData了 + tempMap = dealWithStoreProcedure(tempMap); // 对TableData做clone处理 tempMap = dealWithTableData4Clone(tempMap); - // 处理存储过程名称问题 - return dealWithStoreProcedure(tempMap); + return tempMap; } catch (Exception e) { FineLoggerFactory.getLogger().error("transfer widget tabledata failed", e); } @@ -153,7 +155,8 @@ public class TableDataFollowingPasteUtils { for (Map.Entry dataWrapperEntry : dataWrapperMap.entrySet()) { String tdName = dataWrapperEntry.getKey(); TableData td = dataWrapperEntry.getValue().getTableData(); - if (ComparatorUtils.equals(td, tableData)) { + // 用TableData自己重写的equals方法来比较,实际上直接用"="号也行 + if (tableData.equals(td)) { return tdName; } } @@ -182,10 +185,11 @@ public class TableDataFollowingPasteUtils { collectTableDataInChartCollection(templateTableData, tempMap, widget); collectTableDataInElementCaseEditor(templateTableData, tempMap, widget); } + // 处理存储过程名称问题,名称问题需要优先处理,否则就找不到匹配的TableData了 + tempMap = dealWithStoreProcedure(tempMap); // 对TableData做clone处理 tempMap = dealWithTableData4Clone(tempMap); - // 处理存储过程名称问题 - return dealWithStoreProcedure(tempMap); + return tempMap; } catch (Exception e) { FineLoggerFactory.getLogger().error("transfer widget tabledata failed", e); } From e4249c6256994f1397c05fd1adbfff6d3012a9a4 Mon Sep 17 00:00:00 2001 From: Yvan Date: Wed, 11 May 2022 11:26:49 +0800 Subject: [PATCH 37/49] =?UTF-8?q?REPORT-70857=20=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E9=9B=86=E5=A4=8D=E5=88=B6=E5=90=8E=E7=8B=AC=E7=AB=8B=20?= =?UTF-8?q?=E5=88=A0=E5=8E=BB=E5=A4=9A=E4=BD=99import?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../data/tabledata/paste/TableDataFollowingPasteUtils.java | 1 - 1 file changed, 1 deletion(-) diff --git a/designer-base/src/main/java/com/fr/design/data/tabledata/paste/TableDataFollowingPasteUtils.java b/designer-base/src/main/java/com/fr/design/data/tabledata/paste/TableDataFollowingPasteUtils.java index 6ebfdca0e8..a9483bf89e 100644 --- a/designer-base/src/main/java/com/fr/design/data/tabledata/paste/TableDataFollowingPasteUtils.java +++ b/designer-base/src/main/java/com/fr/design/data/tabledata/paste/TableDataFollowingPasteUtils.java @@ -28,7 +28,6 @@ import com.fr.report.cell.FloatElement; import com.fr.report.cell.tabledata.ElementUsedTableDataProvider; import com.fr.report.worksheet.FormElementCase; import com.fr.stable.StringUtils; -import com.fr.third.org.apache.commons.lang3.ObjectUtils; import org.jetbrains.annotations.Nullable; import java.util.Arrays; From 834044d06b066c4d9344117810ce303e7daaa857 Mon Sep 17 00:00:00 2001 From: Yvan Date: Wed, 11 May 2022 11:40:07 +0800 Subject: [PATCH 38/49] =?UTF-8?q?REPORT-70857=20=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E9=9B=86=E5=A4=8D=E5=88=B6=E5=90=8E=E7=8B=AC=E7=AB=8B=20?= =?UTF-8?q?=E3=80=90=E9=97=AE=E9=A2=98=E5=8E=9F=E5=9B=A0=E3=80=91=E5=A4=84?= =?UTF-8?q?=E7=90=86=E9=87=8D=E5=A4=8D=E4=BB=A3=E7=A0=81=E9=97=AE=E9=A2=98?= =?UTF-8?q?=20=E3=80=90=E6=94=B9=E5=8A=A8=E6=80=9D=E8=B7=AF=E3=80=91?= =?UTF-8?q?=E5=A4=84=E7=90=86=E9=87=8D=E5=A4=8D=E4=BB=A3=E7=A0=81=E9=97=AE?= =?UTF-8?q?=E9=A2=98=20=E3=80=90review=E5=BB=BA=E8=AE=AE=E3=80=91=E6=97=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../paste/TableDataFollowingPasteUtils.java | 30 +++++++++++-------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/data/tabledata/paste/TableDataFollowingPasteUtils.java b/designer-base/src/main/java/com/fr/design/data/tabledata/paste/TableDataFollowingPasteUtils.java index a9483bf89e..9c604aa724 100644 --- a/designer-base/src/main/java/com/fr/design/data/tabledata/paste/TableDataFollowingPasteUtils.java +++ b/designer-base/src/main/java/com/fr/design/data/tabledata/paste/TableDataFollowingPasteUtils.java @@ -98,23 +98,32 @@ public class TableDataFollowingPasteUtils { } } } - // 处理存储过程名称问题,名称问题需要优先处理,否则就找不到匹配的TableData了 - tempMap = dealWithStoreProcedure(tempMap); - // 对TableData做clone处理 - tempMap = dealWithTableData4Clone(tempMap); - return tempMap; + return dealWithTableDataMap(tempMap); } catch (Exception e) { FineLoggerFactory.getLogger().error("transfer widget tabledata failed", e); } return new HashMap<>(); } + /** + * 处理结果集 + * @param tableDataMap + * @return + */ + private static Map dealWithTableDataMap(Map tableDataMap) { + // 处理存储过程名称问题,名称问题需要优先处理,否则就找不到匹配的TableData了 + tableDataMap = dealWithStoreProcedure(tableDataMap); + // 对TableData做clone处理 + tableDataMap = dealWithTableData4Clone(tableDataMap); + return tableDataMap; + } + /** * 处理结果集,将结果集中的存储过程子表替换为原本的存储过程,否则跟随粘贴过去的存储过程名称有问题 * * @param tableDataMap */ - public static Map dealWithStoreProcedure(Map tableDataMap) { + private static Map dealWithStoreProcedure(Map tableDataMap) { Map resultMap = new HashMap<>(); if (tableDataMap == null) { return resultMap; @@ -154,8 +163,7 @@ public class TableDataFollowingPasteUtils { for (Map.Entry dataWrapperEntry : dataWrapperMap.entrySet()) { String tdName = dataWrapperEntry.getKey(); TableData td = dataWrapperEntry.getValue().getTableData(); - // 用TableData自己重写的equals方法来比较,实际上直接用"="号也行 - if (tableData.equals(td)) { + if (td.equals(tableData)) { return tdName; } } @@ -184,11 +192,7 @@ public class TableDataFollowingPasteUtils { collectTableDataInChartCollection(templateTableData, tempMap, widget); collectTableDataInElementCaseEditor(templateTableData, tempMap, widget); } - // 处理存储过程名称问题,名称问题需要优先处理,否则就找不到匹配的TableData了 - tempMap = dealWithStoreProcedure(tempMap); - // 对TableData做clone处理 - tempMap = dealWithTableData4Clone(tempMap); - return tempMap; + return dealWithTableDataMap(tempMap); } catch (Exception e) { FineLoggerFactory.getLogger().error("transfer widget tabledata failed", e); } From ba1855ccd90500d2a2e8607948fa7f7b925dd4a9 Mon Sep 17 00:00:00 2001 From: Yvan Date: Wed, 11 May 2022 14:39:35 +0800 Subject: [PATCH 39/49] =?UTF-8?q?REPORT-70857=20=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E9=9B=86=E5=A4=8D=E5=88=B6=E5=90=8E=E7=8B=AC=E7=AB=8B=20?= =?UTF-8?q?=E3=80=90=E9=97=AE=E9=A2=98=E5=8E=9F=E5=9B=A0=E3=80=91=E5=8C=B9?= =?UTF-8?q?=E9=85=8DTableData=E6=97=B6=EF=BC=8C=E7=94=A8=E7=9A=84equals?= =?UTF-8?q?=E6=AF=94=E8=BE=83=EF=BC=8C=E4=BD=86=E6=98=AF=E5=90=8C=E4=B8=80?= =?UTF-8?q?=E4=B8=AA=E5=AF=B9=E8=B1=A1equals=E4=B8=BAfalse=EF=BC=8C?= =?UTF-8?q?=E7=9B=AE=E5=89=8D=E5=B7=B2=E7=9F=A5=E7=9A=84=E6=98=AF=E5=AD=98?= =?UTF-8?q?=E5=82=A8=E8=BF=87=E7=A8=8BTableData=EF=BC=8C=E5=B7=B2=E7=BB=8F?= =?UTF-8?q?=E8=B7=9Frinoux=E6=B2=9F=E9=80=9A=20=E3=80=90=E6=94=B9=E5=8A=A8?= =?UTF-8?q?=E6=80=9D=E8=B7=AF=E3=80=91=E7=9B=B4=E6=8E=A5=E6=8D=A2=E6=88=90?= =?UTF-8?q?=E5=AF=B9=E8=B1=A1=E6=AF=94=E8=BE=83=20=E3=80=90review=E5=BB=BA?= =?UTF-8?q?=E8=AE=AE=E3=80=91=E6=97=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../data/tabledata/paste/TableDataFollowingPasteUtils.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/designer-base/src/main/java/com/fr/design/data/tabledata/paste/TableDataFollowingPasteUtils.java b/designer-base/src/main/java/com/fr/design/data/tabledata/paste/TableDataFollowingPasteUtils.java index 9c604aa724..80ac3e6142 100644 --- a/designer-base/src/main/java/com/fr/design/data/tabledata/paste/TableDataFollowingPasteUtils.java +++ b/designer-base/src/main/java/com/fr/design/data/tabledata/paste/TableDataFollowingPasteUtils.java @@ -163,7 +163,8 @@ public class TableDataFollowingPasteUtils { for (Map.Entry dataWrapperEntry : dataWrapperMap.entrySet()) { String tdName = dataWrapperEntry.getKey(); TableData td = dataWrapperEntry.getValue().getTableData(); - if (td.equals(tableData)) { + // 有些数据集的equals方法有问题,这里直接判断对象地址 + if (td == tableData) { return tdName; } } From 8811cfb6bd297cff2ed571bfa698273967f7acee Mon Sep 17 00:00:00 2001 From: hades Date: Tue, 10 May 2022 21:55:39 +0800 Subject: [PATCH 40/49] =?UTF-8?q?REPORT-70446=20mac=E4=B8=8B=E6=82=AC?= =?UTF-8?q?=E6=B5=AE=E5=BC=B9=E7=AA=97=E9=9A=90=E8=97=8F=E9=87=8D=E6=96=B0?= =?UTF-8?q?=E5=B1=95=E7=A4=BA=E6=97=B6=E5=81=B6=E7=8E=B0=E7=99=BD=E7=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/mainframe/alphafine/question/QuestionWindow.java | 1 + 1 file changed, 1 insertion(+) diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/question/QuestionWindow.java b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/question/QuestionWindow.java index 079eecadb8..c69b6c468e 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/question/QuestionWindow.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/question/QuestionWindow.java @@ -55,6 +55,7 @@ public class QuestionWindow extends JWindow { @Override public void windowDeactivated(WindowEvent e) { + QuestionWindow.getInstance().dispose(); QuestionWindow.getInstance().setVisible(false); } }); From 5d7ce0e012222ce8b45e979fdfea2d4923951b47 Mon Sep 17 00:00:00 2001 From: hades Date: Tue, 10 May 2022 21:54:05 +0800 Subject: [PATCH 41/49] =?UTF-8?q?REPORT-71213=20=E8=AE=BE=E8=AE=A1?= =?UTF-8?q?=E5=99=A8=E5=85=B3=E9=97=AD=E5=A4=B1=E8=B4=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fr/exit/ConfigToPropMigrator.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/designer-base/src/main/java/com/fr/exit/ConfigToPropMigrator.java b/designer-base/src/main/java/com/fr/exit/ConfigToPropMigrator.java index 909768beef..ec77559856 100644 --- a/designer-base/src/main/java/com/fr/exit/ConfigToPropMigrator.java +++ b/designer-base/src/main/java/com/fr/exit/ConfigToPropMigrator.java @@ -40,7 +40,14 @@ public class ConfigToPropMigrator { } public void execute() { + try { + _execute(); + } catch (Throwable throwable) { + FineLoggerFactory.getLogger().warn(throwable.getMessage(), throwable); + } + } + private void _execute() { if (WorkContext.getCurrent().isLocal()) { String url = "jdbc:hsqldb:file://" + WorkContext.getCurrent().getPath() + "/" + ProjectConstants.EMBED_DB_DIRECTORY + "/finedb/db;hsqldb.tx=mvcc"; From fd62632d3c4c5943dbb2faa703a328e2020c283b Mon Sep 17 00:00:00 2001 From: hades Date: Wed, 11 May 2022 14:58:17 +0800 Subject: [PATCH 42/49] =?UTF-8?q?REPORT-71213=20=E4=BA=A4=E4=BA=92?= =?UTF-8?q?=E7=82=B9=E8=A1=A5=E5=85=85=EF=BC=9A=E5=85=B3=E9=97=AD=E4=BA=86?= =?UTF-8?q?=E4=BA=A7=E5=93=81=E5=8A=A8=E6=80=81=E6=97=B6,=E6=82=AC?= =?UTF-8?q?=E6=B5=AE=E6=8C=89=E9=92=AE=E4=B8=8D=E6=98=BE=E7=A4=BA=E6=9C=89?= =?UTF-8?q?=E6=96=B0=E6=B6=88=E6=81=AF=E6=8E=A8=E9=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/mainframe/alphafine/question/QuestionPane.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/question/QuestionPane.java b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/question/QuestionPane.java index 0d0d9ab633..b2c186a9ea 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/question/QuestionPane.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/question/QuestionPane.java @@ -2,6 +2,7 @@ package com.fr.design.mainframe.alphafine.question; import com.fr.base.svg.SVGLoader; import com.fr.base.svg.SystemScaleUtils; +import com.fr.design.DesignerEnvManager; import com.fr.design.mainframe.alphafine.AlphaFineUtil; import com.fr.design.utils.SvgPaintUtils; import java.awt.Color; @@ -37,7 +38,7 @@ public class QuestionPane extends JPanel { int width = SystemScaleUtils.isJreHiDPIEnabled() ? (int) (getWidth() * SVGLoader.SYSTEM_SCALE) : getWidth(); int height = SystemScaleUtils.isJreHiDPIEnabled() ? (int) (getHeight() * SVGLoader.SYSTEM_SCALE) : getHeight(); - if (AlphaFineUtil.unread()) { + if (AlphaFineUtil.unread() && DesignerEnvManager.getEnvManager().getAlphaFineConfigManager().isProductDynamics()) { g2.drawImage(NEW_MESSAGE_IMAGE, 0, 0, this); } else { g2.drawImage(QUESTION_BACKGROUND_IMAGE, 0, 0, this); From 43f7b03a3e98c98bda1b93019031c7732cba91aa Mon Sep 17 00:00:00 2001 From: hades Date: Wed, 11 May 2022 15:21:49 +0800 Subject: [PATCH 43/49] =?UTF-8?q?REPORT-71309=20&&=20REPORT-71298=20?= =?UTF-8?q?=E6=90=9C=E7=B4=A2=E5=B1=95=E7=A4=BA=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mainframe/alphafine/AlphaFineUtil.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/AlphaFineUtil.java b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/AlphaFineUtil.java index 0d23a6fc97..d0efa84351 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/AlphaFineUtil.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/AlphaFineUtil.java @@ -32,6 +32,10 @@ public class AlphaFineUtil { private static String getReplacedString(String modelName, String string) { + // 如果是直接包含了高亮字符 返回 + if (modelName.contains(string)) { + return string; + } //需要考虑modelName有空格的情况 //比如现在是work boo k 搜索词是workb,应该要替换的部分是work b //先去掉已经匹配替换过的部分,因为考虑到分词的情况,可能会进行多次替换 @@ -53,6 +57,18 @@ public class AlphaFineUtil { return result.toString(); } + public static String escapeExprSpecialWord(String keyword) { + if (StringUtils.isNotBlank(keyword)) { + String[] fbsArr = { "\\", "$", "(", ")", "*", "+", ".", "[", "]", "?", "^", "{", "}", "|" }; + for (String key : fbsArr) { + if (keyword.contains(key)) { + keyword = keyword.replace(key, "\\" + key); + } + } + } + return keyword; + } + public static boolean unread() { Set readSet = DesignerEnvManager.getEnvManager().getAlphaFineConfigManager().getReadSet(); Set idSet = ProductNewsSearchManager.getInstance().getIdSet(); From 95d467ea38fb937961d73f7ce3bac7d0085f2265 Mon Sep 17 00:00:00 2001 From: hades Date: Wed, 11 May 2022 15:22:17 +0800 Subject: [PATCH 44/49] =?UTF-8?q?REPORT-71213=20=E6=8B=86=E5=88=86?= =?UTF-8?q?=E4=B8=8B=E5=A4=A7=E6=96=B9=E6=B3=95=20&&=20=E5=A4=84=E7=90=86?= =?UTF-8?q?=E7=A9=BA=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../alphafine/component/AlphaFineFrame.java | 157 +++++++++--------- 1 file changed, 83 insertions(+), 74 deletions(-) diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/component/AlphaFineFrame.java b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/component/AlphaFineFrame.java index d93a7b2964..b6763f8cff 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/component/AlphaFineFrame.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/component/AlphaFineFrame.java @@ -367,6 +367,87 @@ public class AlphaFineFrame extends JFrame { JPanel tabPane = new JPanel(new FlowLayout(FlowLayout.LEFT, 20, 10)); tabPane.setBackground(Color.WHITE); + List selectedLabelList = createSelectedLabelList(); + selectedType = selectedLabelList.get(0).getCellType(); + // 第一个tab 非产品动态 + if (selectedType != CellType.PRODUCT_NEWS) { + tabLabel.setText(selectedLabelList.get(0).getText()); + readLabel.setVisible(false); + } + for (SelectedLabel selectedLabel : selectedLabelList) { + selectedLabel.addMouseListener(createMouseListener(selectedLabelList, selectedLabel, tabPane, tabLabel, readLabel)); + tabPane.add(selectedLabel); + } + showPane.add(tabPane, BorderLayout.NORTH); + showPane.add(labelPane, BorderLayout.CENTER); + showPane.add(resultPane, BorderLayout.SOUTH); + return showPane; + } + + private MouseAdapter createMouseListener(List selectedLabelList, SelectedLabel selectedLabel, + JPanel tabPane, UILabel tabLabel, UILabel readLabel) { + return new MouseAdapter() { + @Override + public void mousePressed(MouseEvent e) { + for (SelectedLabel label : selectedLabelList) { + label.setSelected(false); + label.setForeground(AlphaFineConstants.FOREGROUND_COLOR_8); + } + selectedLabel.setSelected(true); + // 处理产品动态 tab与下方文字展示不一致 + if (ComparatorUtils.equals(selectedLabel.getText().trim(), PRODUCT_NEWS)) { + tabLabel.setText(PRODUCT_DYNAMICS); + } else { + tabLabel.setText(selectedLabel.getText()); + } + readLabel.setVisible(false); + tabPane.repaint(); + switch (selectedLabel.getCellType()) { + case PRODUCT_NEWS: + readLabel.setVisible(true); + switchType(CellType.PRODUCT_NEWS); + break; + case ACTION: + currentSearchWorkerManager = settingSearchWorkerManager; + switchType(CellType.ACTION); + break; + case FILE: + currentSearchWorkerManager = fileSearchWorkerManager; + switchType(CellType.FILE); + break; + case DOCUMENT: + currentSearchWorkerManager = documentWorkerManager; + switchType(CellType.DOCUMENT); + break; + case PLUGIN: + currentSearchWorkerManager = pluginSearchWorkerManager; + switchType(CellType.PLUGIN); + break; + } + if (currentSearchWorkerManager != null) { + AlphaFineList alphaFineList = currentSearchWorkerManager.getSearchResultList(); + if (alphaFineList != null) { + alphaFineList.setSelectedIndex(0); + } + } + } + + private Color defaultColor; + + @Override + public void mouseEntered(MouseEvent e) { + defaultColor = selectedLabel.getForeground(); + selectedLabel.setForeground(AlphaFineConstants.SUSPENDED_COLOR); + } + + @Override + public void mouseExited(MouseEvent e) { + selectedLabel.setForeground(defaultColor); + } + }; + } + + private List createSelectedLabelList() { List selectedLabelList = new ArrayList<>(); AlphaFineConfigManager alphaFineConfigManager = DesignerEnvManager.getEnvManager().getAlphaFineConfigManager(); if (alphaFineConfigManager.isProductDynamics()) { @@ -384,79 +465,7 @@ public class AlphaFineFrame extends JFrame { if (alphaFineConfigManager.isContainPlugin()) { selectedLabelList.add(new SelectedLabel(PLUGIN, CellType.PLUGIN)); } - selectedType = selectedLabelList.get(0).getCellType(); - // 第一个tab 非产品动态 - if (selectedType != CellType.PRODUCT_NEWS) { - tabLabel.setText(selectedLabelList.get(0).getText()); - readLabel.setVisible(false); - } - for (SelectedLabel selectedLabel : selectedLabelList) { - - selectedLabel.addMouseListener(new MouseAdapter() { - @Override - public void mousePressed(MouseEvent e) { - for (SelectedLabel label : selectedLabelList) { - label.setSelected(false); - label.setForeground(AlphaFineConstants.FOREGROUND_COLOR_8); - } - selectedLabel.setSelected(true); - // 处理产品动态 tab与下方文字展示不一致 - if (ComparatorUtils.equals(selectedLabel.getText().trim(), PRODUCT_NEWS)) { - tabLabel.setText(PRODUCT_DYNAMICS); - } else { - tabLabel.setText(selectedLabel.getText()); - } - readLabel.setVisible(false); - tabPane.repaint(); - switch (selectedLabel.getCellType()) { - case PRODUCT_NEWS: - readLabel.setVisible(true); - switchType(CellType.PRODUCT_NEWS); - break; - case ACTION: - currentSearchWorkerManager = settingSearchWorkerManager; - switchType(CellType.ACTION); - break; - case FILE: - currentSearchWorkerManager = fileSearchWorkerManager; - switchType(CellType.FILE); - break; - case DOCUMENT: - currentSearchWorkerManager = documentWorkerManager; - switchType(CellType.DOCUMENT); - break; - case PLUGIN: - currentSearchWorkerManager = pluginSearchWorkerManager; - switchType(CellType.PLUGIN); - break; - } - if (currentSearchWorkerManager != null) { - AlphaFineList alphaFineList = currentSearchWorkerManager.getSearchResultList(); - if (alphaFineList != null) { - alphaFineList.setSelectedIndex(0); - } - } - } - - private Color defaultColor; - - @Override - public void mouseEntered(MouseEvent e) { - defaultColor = selectedLabel.getForeground(); - selectedLabel.setForeground(AlphaFineConstants.SUSPENDED_COLOR); - } - - @Override - public void mouseExited(MouseEvent e) { - selectedLabel.setForeground(defaultColor); - } - }); - tabPane.add(selectedLabel); - } - showPane.add(tabPane, BorderLayout.NORTH); - showPane.add(labelPane, BorderLayout.CENTER); - showPane.add(resultPane, BorderLayout.SOUTH); - return showPane; + return selectedLabelList; } private void fireOneClickRead() { @@ -699,7 +708,7 @@ public class AlphaFineFrame extends JFrame { } else if (searchText.startsWith(DS_MARK)) { return new SearchTextBean(getStoreText(searchText), new String[]{DS_NAME + getStoreText(searchText)}); } else { - return new SearchTextBean(searchText, segmentationResult); + return new SearchTextBean(searchText, segmentationResult == null ? new String[]{} : segmentationResult); } } From 239d754fd3b2e23073e07cdc8b206e9a286852a5 Mon Sep 17 00:00:00 2001 From: hades Date: Wed, 11 May 2022 15:54:36 +0800 Subject: [PATCH 45/49] =?UTF-8?q?REPORT-71309=20fix=20=E5=8F=AF=E8=83=BD?= =?UTF-8?q?=E7=9A=84npe?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/fr/design/mainframe/alphafine/AlphaFineUtil.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/AlphaFineUtil.java b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/AlphaFineUtil.java index d0efa84351..814bc3530d 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/AlphaFineUtil.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/AlphaFineUtil.java @@ -33,7 +33,7 @@ public class AlphaFineUtil { private static String getReplacedString(String modelName, String string) { // 如果是直接包含了高亮字符 返回 - if (modelName.contains(string)) { + if (StringUtils.contains(modelName, string)) { return string; } //需要考虑modelName有空格的情况 From a350e241b70a05d06d08225ceb078047013973e3 Mon Sep 17 00:00:00 2001 From: Yvan Date: Thu, 12 May 2022 10:01:05 +0800 Subject: [PATCH 46/49] =?UTF-8?q?REPORT-71449=20=E3=80=90=E5=86=92?= =?UTF-8?q?=E7=83=9F=E3=80=91=E4=B8=8D=E5=A4=8D=E5=88=B6=E6=96=B0=E7=9A=84?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E9=9B=86=EF=BC=8C=E2=80=9C=E5=89=AA=E8=B4=B4?= =?UTF-8?q?=E7=89=88=E2=80=9D=E7=9A=84=E6=95=B0=E6=8D=AE=E9=9B=86=E4=BC=9A?= =?UTF-8?q?=E5=8F=98=E5=8C=96=20=E3=80=90=E9=97=AE=E9=A2=98=E5=8E=9F?= =?UTF-8?q?=E5=9B=A0=E3=80=91=E5=A4=8D=E5=88=B6=E5=88=B0=E5=89=AA=E5=88=87?= =?UTF-8?q?=E6=9D=BF=E4=B8=AD=E7=9A=84=E6=95=B0=E6=8D=AE=E9=9B=86=EF=BC=8C?= =?UTF-8?q?=E5=9C=A8=E7=B2=98=E8=B4=B4=E7=9A=84=E6=97=B6=E5=80=99=EF=BC=8C?= =?UTF-8?q?TableData=E6=B2=A1=E5=81=9Aclone=E5=A4=84=E7=90=86=EF=BC=8C?= =?UTF-8?q?=E5=BD=93=E4=BF=AE=E6=94=B9=E7=B2=98=E8=B4=B4=E5=87=BA=E6=9D=A5?= =?UTF-8?q?=E7=9A=84=E6=95=B0=E6=8D=AE=E9=9B=86=E6=97=B6=EF=BC=8C=E4=BC=9A?= =?UTF-8?q?=E5=90=8C=E6=AD=A5=E5=BD=B1=E5=93=8D=E5=89=AA=E5=88=87=E6=9D=BF?= =?UTF-8?q?=E9=87=8C=E7=9A=84TableData=20=E3=80=90=E6=94=B9=E5=8A=A8?= =?UTF-8?q?=E6=80=9D=E8=B7=AF=E3=80=91=E7=B2=98=E8=B4=B4=E6=97=B6=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0clone=E5=A4=84=E7=90=86=20=E3=80=90review=E5=BB=BA?= =?UTF-8?q?=E8=AE=AE=E3=80=91=E6=97=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../data/tabledata/paste/TableDataFollowingPasteUtils.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/data/tabledata/paste/TableDataFollowingPasteUtils.java b/designer-base/src/main/java/com/fr/design/data/tabledata/paste/TableDataFollowingPasteUtils.java index 80ac3e6142..a9b3b70ad7 100644 --- a/designer-base/src/main/java/com/fr/design/data/tabledata/paste/TableDataFollowingPasteUtils.java +++ b/designer-base/src/main/java/com/fr/design/data/tabledata/paste/TableDataFollowingPasteUtils.java @@ -375,8 +375,10 @@ public class TableDataFollowingPasteUtils { * @return AbstractTableDataPane */ public static AbstractTableDataPane generateTableDataPaneWhenPaste(AbstractTableDataWrapper tableDataWrapper) { - AbstractTableDataPane tableDataPane = tableDataWrapper.creatTableDataPane(); - TableData tableData = tableDataWrapper.getTableData(); + // 粘贴时再做一次TableData的clone + AbstractTableDataWrapper clonedWrapper = new TemplateTableDataWrapper(cloneTableData(tableDataWrapper.getTableData())); + AbstractTableDataPane tableDataPane = clonedWrapper.creatTableDataPane(); + TableData tableData = clonedWrapper.getTableData(); if (tableData instanceof StoreProcedure) { StoreProcedure storeProcedure = (StoreProcedure) tableData; ((ProcedureDataPane) tableDataPane).populateParameters(storeProcedure.getParameters()); From 66cea01ce10a57fb4de4fa1cf1eb05fe4a38645b Mon Sep 17 00:00:00 2001 From: Yvan Date: Thu, 12 May 2022 10:45:39 +0800 Subject: [PATCH 47/49] =?UTF-8?q?REPORT-71449=20=E3=80=90=E5=86=92?= =?UTF-8?q?=E7=83=9F=E3=80=91=E4=B8=8D=E5=A4=8D=E5=88=B6=E6=96=B0=E7=9A=84?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E9=9B=86=EF=BC=8C=E2=80=9C=E5=89=AA=E8=B4=B4?= =?UTF-8?q?=E7=89=88=E2=80=9D=E7=9A=84=E6=95=B0=E6=8D=AE=E9=9B=86=E4=BC=9A?= =?UTF-8?q?=E5=8F=98=E5=8C=96=20=E3=80=90=E9=97=AE=E9=A2=98=E5=8E=9F?= =?UTF-8?q?=E5=9B=A0=E3=80=91=E7=B2=98=E8=B4=B4=E7=9A=84=E6=97=B6=E5=80=99?= =?UTF-8?q?=E6=B2=A1=E6=9C=89=E5=81=9Aclone=E5=A4=84=E7=90=86=EF=BC=8C?= =?UTF-8?q?=E5=81=87=E5=A6=82=E4=BF=AE=E6=94=B9=E7=B2=98=E8=B4=B4=E5=90=8E?= =?UTF-8?q?=E7=9A=84=E6=95=B0=E6=8D=AE=E9=9B=86=EF=BC=8C=E4=BC=9A=E5=90=8C?= =?UTF-8?q?=E6=AD=A5=E4=BF=AE=E6=94=B9=E6=8E=89=E5=89=AA=E5=88=87=E6=9D=BF?= =?UTF-8?q?=E9=87=8C=E5=AD=98=E7=9A=84Tableda=20=E3=80=90=E6=94=B9?= =?UTF-8?q?=E5=8A=A8=E6=80=9D=E8=B7=AF=E3=80=91=E6=B7=BB=E5=8A=A0=E7=B2=98?= =?UTF-8?q?=E8=B4=B4=E6=97=B6TableData=E7=9A=84clone=E9=80=BB=E8=BE=91=20?= =?UTF-8?q?=E3=80=90review=E5=BB=BA=E8=AE=AE=E3=80=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/data/datapane/TableDataTreePane.java | 5 ++++- .../paste/TableDataFollowingPasteUtils.java | 14 +++++++++++--- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/data/datapane/TableDataTreePane.java b/designer-base/src/main/java/com/fr/design/data/datapane/TableDataTreePane.java index e425751772..112adff560 100644 --- a/designer-base/src/main/java/com/fr/design/data/datapane/TableDataTreePane.java +++ b/designer-base/src/main/java/com/fr/design/data/datapane/TableDataTreePane.java @@ -1133,7 +1133,10 @@ public class TableDataTreePane extends BasicTableDataTreePane { // 处理数据集名称 String dsName = getNoRepeatedDsName4Paste(dataWrapperEntry.getKey()); AbstractTableDataWrapper wrapper = dataWrapperEntry.getValue(); - addDataPane(TableDataFollowingPasteUtils.generateTableDataPaneWhenPaste(wrapper), dsName); + AbstractTableDataPane tableDataPane = TableDataFollowingPasteUtils.generateTableDataPaneWhenPaste(wrapper); + if (tableDataPane != null) { + addDataPane(tableDataPane, dsName); + } } } } diff --git a/designer-base/src/main/java/com/fr/design/data/tabledata/paste/TableDataFollowingPasteUtils.java b/designer-base/src/main/java/com/fr/design/data/tabledata/paste/TableDataFollowingPasteUtils.java index a9b3b70ad7..4c39e28545 100644 --- a/designer-base/src/main/java/com/fr/design/data/tabledata/paste/TableDataFollowingPasteUtils.java +++ b/designer-base/src/main/java/com/fr/design/data/tabledata/paste/TableDataFollowingPasteUtils.java @@ -66,7 +66,10 @@ public class TableDataFollowingPasteUtils { continue; } AbstractTableDataWrapper tableDataWrapper = new TemplateTableDataWrapper(dataWrapperEntry.getValue(), dsName); - tableDataTreePane.addDataPane(generateTableDataPaneWhenPaste(tableDataWrapper), dsName); + AbstractTableDataPane tableDataPane = generateTableDataPaneWhenPaste(tableDataWrapper); + if (tableDataPane != null) { + tableDataTreePane.addDataPane(tableDataPane, dsName); + } } } @@ -372,11 +375,16 @@ public class TableDataFollowingPasteUtils { * 生成粘贴(新建)时使用的AbstractTableDataPane * 主要是为了处理StoreProcedure,它在远程情况下,无法及时获取参数。这边因为是复制粘贴,所以直接用原TableData的参数即可 * @param tableDataWrapper wrapper - * @return AbstractTableDataPane + * @return AbstractTableDataPane,当TableData clone失败时,方法返回null */ + @Nullable public static AbstractTableDataPane generateTableDataPaneWhenPaste(AbstractTableDataWrapper tableDataWrapper) { // 粘贴时再做一次TableData的clone - AbstractTableDataWrapper clonedWrapper = new TemplateTableDataWrapper(cloneTableData(tableDataWrapper.getTableData())); + TableData clonedTableData = cloneTableData(tableDataWrapper.getTableData()); + if (clonedTableData == null) { + return null; + } + AbstractTableDataWrapper clonedWrapper = new TemplateTableDataWrapper(clonedTableData); AbstractTableDataPane tableDataPane = clonedWrapper.creatTableDataPane(); TableData tableData = clonedWrapper.getTableData(); if (tableData instanceof StoreProcedure) { From a3c437cf29323ba47ca3fadadadc9ffbca4882d2 Mon Sep 17 00:00:00 2001 From: Harrison Date: Thu, 7 Apr 2022 17:28:08 +0800 Subject: [PATCH 48/49] =?UTF-8?q?REPORT-71544=20M1-MAC=20=E8=AE=BE?= =?UTF-8?q?=E8=AE=A1=E5=99=A8=E5=90=AF=E5=8A=A8=E5=90=8E=E4=BC=9A=E5=8D=A1?= =?UTF-8?q?=E4=BD=8F=20=E4=B8=BB=E8=A6=81=E6=98=AF=E8=BD=AC=E8=AF=91?= =?UTF-8?q?=E6=97=B6=EF=BC=8CInstrumentation=20=E7=9A=84=E6=80=A7=E8=83=BD?= =?UTF-8?q?=E9=97=AE=E9=A2=98=E3=80=82=20=E9=A9=AC=E4=B8=8A=E5=8F=91?= =?UTF-8?q?=E5=B8=83=E4=BA=86=E5=B1=8F=E8=94=BD=E4=B8=80=E4=B8=8B=EF=BC=8C?= =?UTF-8?q?=E6=9A=82=E6=97=B6=20windows,=20intel-mac=20=E9=83=BD=E6=9C=AA?= =?UTF-8?q?=E5=8F=91=E7=8E=B0=E8=BF=99=E4=B8=AA=E9=97=AE=E9=A2=98=20?= =?UTF-8?q?=E5=A6=82=E6=9E=9C=E8=BF=98=E6=98=AF=E6=9C=89=EF=BC=8C=E9=82=A3?= =?UTF-8?q?=E5=B0=B1=E4=B8=8B=E4=B8=AA=E7=89=88=E6=9C=AC=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E4=B8=80=E4=B8=8B=EF=BC=8C=E5=81=9A=E4=B8=80=E4=B8=AA=E6=99=BA?= =?UTF-8?q?=E8=83=BD=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/record/analyzer/DesignerAnalyzerActivator.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer-base/src/main/java/com/fr/design/record/analyzer/DesignerAnalyzerActivator.java b/designer-base/src/main/java/com/fr/design/record/analyzer/DesignerAnalyzerActivator.java index 0a83d81c20..411789e1f8 100644 --- a/designer-base/src/main/java/com/fr/design/record/analyzer/DesignerAnalyzerActivator.java +++ b/designer-base/src/main/java/com/fr/design/record/analyzer/DesignerAnalyzerActivator.java @@ -41,7 +41,7 @@ public class DesignerAnalyzerActivator extends Activator implements Prepare { @Override public void start() { - OptimizeUtil.open(() -> { + OptimizeUtil.open(OptimizeUtil.Module.ANALYZER,() -> { AnalyzerAssemblyFactory basicFactory = createBasicFactory(); From 985c713e2e59a37ba9447b2e730bbc14c6d9766a Mon Sep 17 00:00:00 2001 From: hades Date: Thu, 12 May 2022 18:26:45 +0800 Subject: [PATCH 49/49] =?UTF-8?q?REPORT-71213=20=E5=85=B3=E9=97=ADalphafin?= =?UTF-8?q?e=20=E9=BB=98=E8=AE=A4=E4=B8=8D=E5=B1=95=E7=A4=BA=E6=82=AC?= =?UTF-8?q?=E6=B5=AE=E5=BC=B9=E7=AA=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mainframe/alphafine/question/QuestionWindow.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/question/QuestionWindow.java b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/question/QuestionWindow.java index c69b6c468e..e5d9edfec2 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/question/QuestionWindow.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/question/QuestionWindow.java @@ -1,5 +1,6 @@ package com.fr.design.mainframe.alphafine.question; +import com.fr.design.DesignerEnvManager; import com.fr.design.i18n.Toolkit; import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.alphafine.AlphaFineHelper; @@ -68,6 +69,14 @@ public class QuestionWindow extends JWindow { DesignerContext.getDesignerFrame().getHeight() - 100); } + @Override + public void setVisible(boolean visible) { + if (visible && !DesignerEnvManager.getEnvManager().getAlphaFineConfigManager().isEnabled()) { + return; + } + super.setVisible(visible); + } + public static QuestionWindow getInstance() { return INSTANCE; }