From aeff582dcac4bbc8d9950a92fd9e33d61463d080 Mon Sep 17 00:00:00 2001 From: "Leo.Qin" Date: Thu, 2 Mar 2023 11:13:26 +0800 Subject: [PATCH 1/2] =?UTF-8?q?REPORT-90598=20=E9=A6=96=E6=AC=A1=E9=87=8D?= =?UTF-8?q?=E5=90=AF=E8=AE=BE=E8=AE=A1=E5=99=A8=E6=96=B0=E5=BB=BAsql=20ser?= =?UTF-8?q?ver=E6=95=B0=E6=8D=AE=E8=BF=9E=E6=8E=A5=E9=A6=96=E6=AC=A1?= =?UTF-8?q?=E4=BF=9D=E5=AD=98=E6=8A=A5=E9=94=99=E6=95=B0=E6=8D=AE=E5=BA=93?= =?UTF-8?q?=E9=99=90=E5=88=B6=20=E3=80=90=E9=97=AE=E9=A2=98=E5=8E=9F?= =?UTF-8?q?=E5=9B=A0=E3=80=91=E9=A6=96=E6=AC=A1=E8=8E=B7=E5=8F=96lic?= =?UTF-8?q?=E4=B8=AD=E6=94=AF=E6=8C=81=E7=9A=84=E6=95=B0=E6=8D=AE=E5=BA=93?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B=E6=97=B6=EF=BC=8C=E6=9E=9A=E4=B8=BE=E7=B1=BB?= =?UTF-8?q?=E6=9C=AA=E5=88=9D=E5=A7=8B=E5=8C=96=EF=BC=8C=E5=AF=BC=E8=87=B4?= =?UTF-8?q?=E8=8E=B7=E5=8F=96=E4=B8=BA=E7=A9=BA=20=E3=80=90=E6=94=B9?= =?UTF-8?q?=E5=8A=A8=E6=80=9D=E8=B7=AF=E3=80=91=E4=BF=AE=E6=94=B9=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/data/datapane/connect/ConnectionListPane.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) 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 f836757399..87b1c404f3 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 @@ -21,8 +21,8 @@ import com.fr.event.EventDispatcher; import com.fr.file.ConnectionConfig; import com.fr.file.ConnectionOperator; import com.fr.general.NameObject; -import com.fr.license.database.BaseDataBaseTypePoint; import com.fr.license.database.DBTypes; +import com.fr.license.database.DataBaseTypePointManager; import com.fr.license.exception.DataBaseNotSupportedException; import com.fr.log.FineLoggerFactory; import com.fr.stable.ArrayUtils; @@ -279,8 +279,7 @@ public class ConnectionListPane extends JListControlPane implements ConnectionSh Connection connection = bean.getConnection(); // 仅校验jdbc连接,其他插件数据连接不进行校验 if (connection instanceof JDBCDatabaseConnection) { - BaseDataBaseTypePoint dataBaseTypePoint = BaseDataBaseTypePoint.getDataBaseTypePoint(connection.getDriver(), connection.feature()); - + DBTypes dataBaseTypePoint = DataBaseTypePointManager.getInstance().getDataBaseTypePoint(connection.getDriver(), connection.feature()); if (connectionIsNotSupported(connection, dataBaseTypePoint)) { notSupportedConnections.addAll(dataBaseTypePoint.getDataBaseType()); } @@ -296,9 +295,9 @@ public class ConnectionListPane extends JListControlPane implements ConnectionSh /** * 校验当前数据连接是否被限制 */ - private static boolean connectionIsNotSupported(Connection connection, BaseDataBaseTypePoint dataBaseTypePoint) { + private static boolean connectionIsNotSupported(Connection connection, DBTypes dataBaseTypePoint) { return !validateFRDemo(connection.getDriver(), connection.feature()) && - (dataBaseTypePoint != null && !supportedDatabaseTypes.containsAll(dataBaseTypePoint.getDatabaseType())); + (dataBaseTypePoint != null && !supportedDatabaseTypes.containsAll(dataBaseTypePoint.getDataBaseType())); } /** From 611e056f9a742fd0988a08656a2795f8bfbbec62 Mon Sep 17 00:00:00 2001 From: "Destiny.Lin" Date: Thu, 2 Mar 2023 16:22:34 +0800 Subject: [PATCH 2/2] =?UTF-8?q?REPORT-87567=20=E6=8B=96=E5=8A=A8=E4=B8=80?= =?UTF-8?q?=E5=BC=A0=E6=A8=A1=E6=9D=BF=E8=BF=9B=E5=85=A5=E8=AE=BE=E8=AE=A1?= =?UTF-8?q?=E5=99=A8=EF=BC=8C=E9=BC=A0=E6=A0=87=E5=8F=B3=E9=94=AE=E6=89=BE?= =?UTF-8?q?=E5=88=B0=E5=B7=A6=E4=BE=A7=E6=A8=A1=E6=9D=BF=E6=A0=91=E4=B8=AD?= =?UTF-8?q?=E7=9A=84=E4=BD=8D=E7=BD=AE=EF=BC=8C=E6=B2=A1=E6=9C=89=E5=8F=8D?= =?UTF-8?q?=E5=BA=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/fr/design/file/MultiTemplateTabPane.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/designer-base/src/main/java/com/fr/design/file/MultiTemplateTabPane.java b/designer-base/src/main/java/com/fr/design/file/MultiTemplateTabPane.java index 646f0e517a..b506dd81c3 100644 --- a/designer-base/src/main/java/com/fr/design/file/MultiTemplateTabPane.java +++ b/designer-base/src/main/java/com/fr/design/file/MultiTemplateTabPane.java @@ -24,6 +24,7 @@ import com.fr.design.utils.gui.GUIPaintUtils; import com.fr.design.worker.WorkerManager; import com.fr.design.worker.save.CallbackSaveWorker; import com.fr.file.FILE; +import com.fr.file.FileNodeFILE; import com.fr.general.ComparatorUtils; import com.fr.general.IOUtils; import com.fr.log.FineLoggerFactory; @@ -282,7 +283,8 @@ public class MultiTemplateTabPane extends JComponent { private void locateTemplate(JTemplate template) { FILE currentTemplate = template.getEditingFILE(); //模板不属于当前环境,跟预览一样先提示保存,再定位模板 - if (!currentTemplate.exists()) { + //如果是拖拽进来的模板单单用exist不能判断,这边参考预览的判断逻辑(browserTemplate),补充一下 + if (!currentTemplate.exists() || !(currentTemplate instanceof FileNodeFILE)) { int selVal = showConfirmDialog( DesignerContext.getDesignerFrame(), Toolkit.i18nText("Fine-Design_Basic_Web_Preview_Message"),