diff --git a/designer_base/src/com/fr/design/data/datapane/ChoosePane.java b/designer_base/src/com/fr/design/data/datapane/ChoosePane.java index d7707a3b9..6d6bce0e5 100644 --- a/designer_base/src/com/fr/design/data/datapane/ChoosePane.java +++ b/designer_base/src/com/fr/design/data/datapane/ChoosePane.java @@ -180,7 +180,7 @@ public class ChoosePane extends BasicBeanPane implements Refresha dsNameComboBox.setRefreshingModel(true); ConnectionConfig connectionConfig = ConnectionConfig.getInstance(); @SuppressWarnings("unchecked") - Iterator datasourceNameIterator = connectionConfig.getConnectionNameIterator(); + Iterator datasourceNameIterator = connectionConfig.getConnections().keySet().iterator(); List dsList = new ArrayList(); while (datasourceNameIterator.hasNext()) { dsList.add((String) datasourceNameIterator.next()); @@ -287,7 +287,7 @@ public class ChoosePane extends BasicBeanPane implements Refresha } ConnectionConfig connectionConfig = ConnectionConfig.getInstance(); @SuppressWarnings("unchecked") - Iterator datasourceNameIterator = connectionConfig.getConnectionNameIterator(); + Iterator datasourceNameIterator = connectionConfig.getConnections().keySet().iterator(); while (datasourceNameIterator.hasNext()) { String datasourceName = datasourceNameIterator.next(); if (ComparatorUtils.equals(selectedDSName, datasourceName)) { diff --git a/designer_base/src/com/fr/design/data/datapane/connect/ConnectionListPane.java b/designer_base/src/com/fr/design/data/datapane/connect/ConnectionListPane.java index 010227c92..7cb3b5df3 100644 --- a/designer_base/src/com/fr/design/data/datapane/connect/ConnectionListPane.java +++ b/designer_base/src/com/fr/design/data/datapane/connect/ConnectionListPane.java @@ -133,7 +133,7 @@ public class ConnectionListPane extends JListControlPane implements ConnectionSh * @param connectionConfig the new datasourceManager. */ public void populate(ConnectionConfig connectionConfig) { - Iterator nameIt = connectionConfig.getConnectionNameIterator(); + Iterator nameIt = connectionConfig.getConnections().keySet().iterator(); List nameObjectList = new ArrayList(); while (nameIt.hasNext()) { @@ -153,11 +153,11 @@ public class ConnectionListPane extends JListControlPane implements ConnectionSh NameObject[] res_array = new NameObject[res.length]; java.util.Arrays.asList(res).toArray(res_array); - connectionConfig.clearAllConnection(); + connectionConfig.removeAllConnection(); for (int i = 0; i < res_array.length; i++) { NameObject nameObject = res_array[i]; - connectionConfig.putConnection(nameObject.getName(), (Connection) nameObject.getObject()); + connectionConfig.addConnection(nameObject.getName(), (Connection) nameObject.getObject()); } } } \ No newline at end of file diff --git a/designer_base/src/com/fr/design/data/datapane/connect/ConnectionManagerPane.java b/designer_base/src/com/fr/design/data/datapane/connect/ConnectionManagerPane.java index 627834820..f91b16d7e 100644 --- a/designer_base/src/com/fr/design/data/datapane/connect/ConnectionManagerPane.java +++ b/designer_base/src/com/fr/design/data/datapane/connect/ConnectionManagerPane.java @@ -1,17 +1,14 @@ package com.fr.design.data.datapane.connect; -import com.fr.base.FRContext; import com.fr.design.gui.frpane.LoadingBasicPane; import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.itextfield.UITextField; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.file.ConnectionConfig; import com.fr.general.Inter; -import com.fr.stable.project.ProjectConstants; import javax.swing.*; import java.awt.*; -import java.io.File; import java.util.HashMap; public class ConnectionManagerPane extends LoadingBasicPane implements ConnectionShowPane { @@ -49,8 +46,9 @@ public class ConnectionManagerPane extends LoadingBasicPane implements Connectio } public void populate(ConnectionConfig datasourceManager) { - this.connectionTextField.setText(FRContext.getCurrentEnv().getPath() + File.separator + ProjectConstants.RESOURCES_NAME - + File.separator + datasourceManager.fileName()); + //todo 原来界面上显示的xml路径 +// this.connectionTextField.setText(FRContext.getCurrentEnv().getPath() + File.separator + ProjectConstants.RESOURCES_NAME +// + File.separator + datasourceManager.fileName()); this.connectionListPane.populate(datasourceManager); }