|
|
@ -13,6 +13,8 @@ import com.fr.design.ExtraDesignClassManager; |
|
|
|
import com.fr.design.data.MapCompareUtils; |
|
|
|
import com.fr.design.data.MapCompareUtils; |
|
|
|
import com.fr.design.data.datapane.preview.ConnectionInfoBeanHelper; |
|
|
|
import com.fr.design.data.datapane.preview.ConnectionInfoBeanHelper; |
|
|
|
import com.fr.design.dialog.BasicDialog; |
|
|
|
import com.fr.design.dialog.BasicDialog; |
|
|
|
|
|
|
|
import com.fr.design.dialog.FineJOptionPane; |
|
|
|
|
|
|
|
import com.fr.design.editlock.EditLockUtils; |
|
|
|
import com.fr.design.fun.ConnectionProvider; |
|
|
|
import com.fr.design.fun.ConnectionProvider; |
|
|
|
import com.fr.design.gui.controlpane.JListControlPane; |
|
|
|
import com.fr.design.gui.controlpane.JListControlPane; |
|
|
|
import com.fr.design.gui.controlpane.NameObjectCreator; |
|
|
|
import com.fr.design.gui.controlpane.NameObjectCreator; |
|
|
@ -26,6 +28,7 @@ import com.fr.license.database.DBTypes; |
|
|
|
import com.fr.license.database.DataBaseTypePointManager; |
|
|
|
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.report.LockItem; |
|
|
|
import com.fr.stable.ArrayUtils; |
|
|
|
import com.fr.stable.ArrayUtils; |
|
|
|
import com.fr.stable.Nameable; |
|
|
|
import com.fr.stable.Nameable; |
|
|
|
import com.fr.stable.StringUtils; |
|
|
|
import com.fr.stable.StringUtils; |
|
|
@ -36,6 +39,7 @@ import com.fr.workspace.server.entity.connection.ConnectionBean; |
|
|
|
import com.fr.workspace.server.repository.connection.ConnectionRepository; |
|
|
|
import com.fr.workspace.server.repository.connection.ConnectionRepository; |
|
|
|
import org.jetbrains.annotations.NotNull; |
|
|
|
import org.jetbrains.annotations.NotNull; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import javax.swing.JOptionPane; |
|
|
|
import javax.swing.SwingWorker; |
|
|
|
import javax.swing.SwingWorker; |
|
|
|
import java.awt.Window; |
|
|
|
import java.awt.Window; |
|
|
|
import java.util.ArrayList; |
|
|
|
import java.util.ArrayList; |
|
|
@ -366,8 +370,8 @@ public class ConnectionListPane extends JListControlPane implements ConnectionSh |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public static void showDialog(Window parent) { |
|
|
|
public static void showDialog(Window parent) { |
|
|
|
|
|
|
|
try { |
|
|
|
final Map<String, Connection> connectionMap = ConnectionInfoBeanHelper.createConnectionMap(ConnectionRepository.getInstance().getAll()); |
|
|
|
final Map<String, Connection> connectionMap = ConnectionInfoBeanHelper.createConnectionMap(ConnectionRepository.getInstance().getAll()); |
|
|
|
final ConnectionManagerPane connectionManagerPane = new ConnectionManagerPane() { |
|
|
|
final ConnectionManagerPane connectionManagerPane = new ConnectionManagerPane() { |
|
|
|
@Override |
|
|
|
@Override |
|
|
@ -378,6 +382,12 @@ public class ConnectionListPane extends JListControlPane implements ConnectionSh |
|
|
|
final BasicDialog connectionListDialog = connectionManagerPane.showLargeWindow(parent, null); |
|
|
|
final BasicDialog connectionListDialog = connectionManagerPane.showLargeWindow(parent, null); |
|
|
|
connectionListDialog.addDialogActionListener(new ConnectionListDialogActionAdapter(connectionManagerPane, connectionListDialog, connectionMap)); |
|
|
|
connectionListDialog.addDialogActionListener(new ConnectionListDialogActionAdapter(connectionManagerPane, connectionListDialog, connectionMap)); |
|
|
|
connectionListDialog.setVisible(true); |
|
|
|
connectionListDialog.setVisible(true); |
|
|
|
|
|
|
|
} catch (Exception e) { |
|
|
|
|
|
|
|
FineLoggerFactory.getLogger().error(e.getMessage(), e); |
|
|
|
|
|
|
|
FineJOptionPane.showMessageDialog(null, Toolkit.i18nText("Fine-Design_Remote_Data_Error"), |
|
|
|
|
|
|
|
Toolkit.i18nText("Fine-Design_Basic_Error"), JOptionPane.ERROR_MESSAGE); |
|
|
|
|
|
|
|
EditLockUtils.unlock(LockItem.CONNECTION); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|