|
|
|
@ -12,6 +12,7 @@ import com.fr.design.fun.ConnectionProvider;
|
|
|
|
|
import com.fr.design.gui.controlpane.JListControlPane; |
|
|
|
|
import com.fr.design.gui.controlpane.NameObjectCreator; |
|
|
|
|
import com.fr.design.gui.controlpane.NameableCreator; |
|
|
|
|
import com.fr.design.gui.ilist.ListModelElement; |
|
|
|
|
import com.fr.design.i18n.Toolkit; |
|
|
|
|
import com.fr.event.EventDispatcher; |
|
|
|
|
import com.fr.file.ConnectionConfig; |
|
|
|
@ -27,13 +28,14 @@ import com.fr.third.org.apache.commons.collections4.MapUtils;
|
|
|
|
|
import com.fr.workspace.WorkContext; |
|
|
|
|
import com.fr.file.ConnectionOperator; |
|
|
|
|
import java.awt.Window; |
|
|
|
|
import javax.swing.*; |
|
|
|
|
import javax.swing.SwingUtilities; |
|
|
|
|
import java.util.ArrayList; |
|
|
|
|
import java.util.Arrays; |
|
|
|
|
import java.util.HashMap; |
|
|
|
|
import java.util.List; |
|
|
|
|
import java.util.Map; |
|
|
|
|
import java.util.Set; |
|
|
|
|
import java.util.UUID; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* Connection List Pane. |
|
|
|
@ -202,4 +204,18 @@ public class ConnectionListPane extends JListControlPane implements ConnectionSh
|
|
|
|
|
connectionListDialog.addDialogActionListener(new ConnectionListDialogActionAdapter(connectionManagerPane, connectionListDialog, connectionConfig)); |
|
|
|
|
connectionListDialog.setVisible(true); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public void onCopyItem() { |
|
|
|
|
super.onCopyItem(); |
|
|
|
|
ListModelElement selectedValue = getSelectedValue(); |
|
|
|
|
// identity 需要重置
|
|
|
|
|
if (selectedValue != null && selectedValue.wrapper != null) { |
|
|
|
|
Object temp = ((NameObject) selectedValue.wrapper).getObject(); |
|
|
|
|
if (temp instanceof JDBCDatabaseConnection) { |
|
|
|
|
JDBCDatabaseConnection object = (JDBCDatabaseConnection) temp; |
|
|
|
|
object.setIdentity(UUID.randomUUID().toString()); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|