Browse Source

REPORT-6956 设计器适配10.0配置写法

master
kerry 7 years ago
parent
commit
3060718f50
  1. 7
      designer_base/src/com/fr/design/actions/server/ConnectionListAction.java
  2. 6
      designer_base/src/com/fr/design/actions/server/GlobalTableDataAction.java

7
designer_base/src/com/fr/design/actions/server/ConnectionListAction.java

@ -2,6 +2,7 @@ package com.fr.design.actions.server;
import com.fr.config.Configuration; import com.fr.config.Configuration;
import com.fr.data.impl.Connection;
import com.fr.design.actions.UpdateAction; import com.fr.design.actions.UpdateAction;
import com.fr.design.data.datapane.connect.ConnectionManagerPane; import com.fr.design.data.datapane.connect.ConnectionManagerPane;
import com.fr.design.data.datapane.connect.ConnectionShowPane; import com.fr.design.data.datapane.connect.ConnectionShowPane;
@ -15,12 +16,12 @@ import com.fr.file.ConnectionConfig;
import com.fr.general.IOUtils; import com.fr.general.IOUtils;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.locale.InterProviderFactory; import com.fr.locale.InterProviderFactory;
import com.fr.stable.ListMap;
import com.fr.transaction.Configurations; import com.fr.transaction.Configurations;
import com.fr.transaction.Worker; import com.fr.transaction.Worker;
import javax.swing.*; import javax.swing.*;
import java.awt.event.ActionEvent; import java.awt.event.ActionEvent;
import java.util.Map;
/** /**
* DatasourceList Action * DatasourceList Action
@ -163,10 +164,10 @@ public class ConnectionListAction extends UpdateAction {
* @return 包含则返回序列 ,若返回-1则说明不包含重命名key * @return 包含则返回序列 ,若返回-1则说明不包含重命名key
*/ */
public static int isConnectionMapContainsRename(ConnectionConfig datasourceManager) { public static int isConnectionMapContainsRename(ConnectionConfig datasourceManager) {
ListMap tableDataMap = (ListMap) datasourceManager.getConnections(); Map<String, Connection> tableDataMap = datasourceManager.getConnections();
String rename = InterProviderFactory.getProvider().getLocText("FR-Engine_Please_Rename") + "!"; String rename = InterProviderFactory.getProvider().getLocText("FR-Engine_Please_Rename") + "!";
if (tableDataMap.containsKey(rename)) { if (tableDataMap.containsKey(rename)) {
return tableDataMap.indexOf(rename); return datasourceManager.getConnectionIndex(rename);
} }
//todo 这边同上面和远程修改数据集属性有关先屏蔽 //todo 这边同上面和远程修改数据集属性有关先屏蔽
// for (int i = tableDataRenameIndex; i >= 1; i--) { // for (int i = tableDataRenameIndex; i >= 1; i--) {

6
designer_base/src/com/fr/design/actions/server/GlobalTableDataAction.java

@ -4,6 +4,7 @@
package com.fr.design.actions.server; package com.fr.design.actions.server;
import com.fr.base.BaseUtils; import com.fr.base.BaseUtils;
import com.fr.base.TableData;
import com.fr.config.Configuration; import com.fr.config.Configuration;
import com.fr.design.DesignModelAdapter; import com.fr.design.DesignModelAdapter;
import com.fr.design.actions.UpdateAction; import com.fr.design.actions.UpdateAction;
@ -20,7 +21,6 @@ import com.fr.file.ProcedureConfig;
import com.fr.file.TableDataConfig; import com.fr.file.TableDataConfig;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.locale.InterProviderFactory; import com.fr.locale.InterProviderFactory;
import com.fr.stable.ListMap;
import com.fr.transaction.Configurations; import com.fr.transaction.Configurations;
import com.fr.transaction.Worker; import com.fr.transaction.Worker;
@ -184,10 +184,10 @@ public class GlobalTableDataAction extends UpdateAction implements ResponseDataS
* @return 包含则返回序列 ,若返回-1则说明不包含重命名key * @return 包含则返回序列 ,若返回-1则说明不包含重命名key
*/ */
public int isTableDataMapContainsRename(TableDataConfig datasourceManager) { public int isTableDataMapContainsRename(TableDataConfig datasourceManager) {
ListMap tableDataMap = (ListMap) datasourceManager.getTableDatas(); Map<String, TableData> tableDataMap = datasourceManager.getTableDatas();
String rename = InterProviderFactory.getProvider().getLocText("FR-Engine_Please_Rename") + "!"; String rename = InterProviderFactory.getProvider().getLocText("FR-Engine_Please_Rename") + "!";
if (tableDataMap.containsKey(rename)) { if (tableDataMap.containsKey(rename)) {
return tableDataMap.indexOf(rename); return datasourceManager.getTableDataIndex(rename);
} }
//todo 这边同上面和远程修改数据集属性有关先屏蔽 //todo 这边同上面和远程修改数据集属性有关先屏蔽
// for (int i = tableDataRenameIndex; i >= 1; i--) { // for (int i = tableDataRenameIndex; i >= 1; i--) {

Loading…
Cancel
Save