Browse Source

Merge pull request #11556 in DESIGN/design from bugfix/11.0 to feature/x

* commit 'ee344e27c99601ec522ebad716d35e734f1dcdaa':
  REPORT-87567 拖动一张模板进入设计器,鼠标右键找到左侧模板树中的位置,没有反应
  REPORT-90598 首次重启设计器新建sql server数据连接首次保存报错数据库限制 【问题原因】首次获取lic中支持的数据库类型时,枚举类未初始化,导致获取为空 【改动思路】修改接口
feature/x
superman 1 year ago
parent
commit
79a463618c
  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.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()));
}
/**

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.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"),

Loading…
Cancel
Save