ConnectionSettings connectionSettings = (ConnectionSettings) listModel.getElementAt(i);
connectionSettings.apply();
ConnectionHandler connectionHandler = connectionBundle.getConnection(connectionSettings.getDatabaseSettings().getId());
if (connectionHandler == null) {
connectionHandler = new ConnectionHandlerImpl(connectionBundle, connectionSettings);
connectionSettings.getDatabaseSettings().setNew(false);
} else {
oldConnections.remove(connectionHandler);
((ConnectionHandlerImpl)connectionHandler).setConnectionConfig(connectionSettings);
}