Browse Source

Merge pull request #11555 in DESIGN/design from release/11.0 to bugfix/11.0

* commit 'a6ee03adce42d60e9387c932a457da1f6c4d4c7b':
  REPORT-87567 拖动一张模板进入设计器,鼠标右键找到左侧模板树中的位置,没有反应
  REPORT-90598 首次重启设计器新建sql server数据连接首次保存报错数据库限制 【问题原因】首次获取lic中支持的数据库类型时,枚举类未初始化,导致获取为空 【改动思路】修改接口
bugfix/11.0
superman 2 years ago
parent
commit
ee344e27c9
  1. 9
      designer-base/src/main/java/com/fr/design/data/datapane/connect/ConnectionListPane.java
  2. 4
      designer-base/src/main/java/com/fr/design/file/MultiTemplateTabPane.java

9
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.ConnectionConfig;
import com.fr.file.ConnectionOperator; import com.fr.file.ConnectionOperator;
import com.fr.general.NameObject; import com.fr.general.NameObject;
import com.fr.license.database.BaseDataBaseTypePoint;
import com.fr.license.database.DBTypes; import com.fr.license.database.DBTypes;
import com.fr.license.database.DataBaseTypePointManager;
import com.fr.license.exception.DataBaseNotSupportedException; import com.fr.license.exception.DataBaseNotSupportedException;
import com.fr.log.FineLoggerFactory; import com.fr.log.FineLoggerFactory;
import com.fr.stable.ArrayUtils; import com.fr.stable.ArrayUtils;
@ -279,8 +279,7 @@ public class ConnectionListPane extends JListControlPane implements ConnectionSh
Connection connection = bean.getConnection(); Connection connection = bean.getConnection();
// 仅校验jdbc连接,其他插件数据连接不进行校验 // 仅校验jdbc连接,其他插件数据连接不进行校验
if (connection instanceof JDBCDatabaseConnection) { 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)) { if (connectionIsNotSupported(connection, dataBaseTypePoint)) {
notSupportedConnections.addAll(dataBaseTypePoint.getDataBaseType()); 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()) && return !validateFRDemo(connection.getDriver(), connection.feature()) &&
(dataBaseTypePoint != null && !supportedDatabaseTypes.containsAll(dataBaseTypePoint.getDatabaseType())); (dataBaseTypePoint != null && !supportedDatabaseTypes.containsAll(dataBaseTypePoint.getDataBaseType()));
} }
/** /**

4
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.WorkerManager;
import com.fr.design.worker.save.CallbackSaveWorker; import com.fr.design.worker.save.CallbackSaveWorker;
import com.fr.file.FILE; import com.fr.file.FILE;
import com.fr.file.FileNodeFILE;
import com.fr.general.ComparatorUtils; import com.fr.general.ComparatorUtils;
import com.fr.general.IOUtils; import com.fr.general.IOUtils;
import com.fr.log.FineLoggerFactory; import com.fr.log.FineLoggerFactory;
@ -282,7 +283,8 @@ public class MultiTemplateTabPane extends JComponent {
private void locateTemplate(JTemplate<?, ?> template) { private void locateTemplate(JTemplate<?, ?> template) {
FILE currentTemplate = template.getEditingFILE(); FILE currentTemplate = template.getEditingFILE();
//模板不属于当前环境,跟预览一样先提示保存,再定位模板 //模板不属于当前环境,跟预览一样先提示保存,再定位模板
if (!currentTemplate.exists()) { //如果是拖拽进来的模板单单用exist不能判断,这边参考预览的判断逻辑(browserTemplate),补充一下
if (!currentTemplate.exists() || !(currentTemplate instanceof FileNodeFILE)) {
int selVal = showConfirmDialog( int selVal = showConfirmDialog(
DesignerContext.getDesignerFrame(), DesignerContext.getDesignerFrame(),
Toolkit.i18nText("Fine-Design_Basic_Web_Preview_Message"), Toolkit.i18nText("Fine-Design_Basic_Web_Preview_Message"),

Loading…
Cancel
Save