|
|
@ -1,10 +1,8 @@ |
|
|
|
package com.fr.design.data.datapane.connect; |
|
|
|
package com.fr.design.data.datapane.connect; |
|
|
|
|
|
|
|
|
|
|
|
import com.fanruan.config.impl.data.ConnectionConfigProviderFactory; |
|
|
|
import com.fine.theme.icon.LazyIcon; |
|
|
|
import com.fanruan.config.impl.data.ConnectionConfigWriterFactory; |
|
|
|
|
|
|
|
import com.fine.theme.utils.FineUIScale; |
|
|
|
import com.fine.theme.utils.FineUIScale; |
|
|
|
import com.fr.config.remote.RemoteConfigEvent; |
|
|
|
import com.fr.config.remote.RemoteConfigEvent; |
|
|
|
import com.fine.theme.icon.LazyIcon; |
|
|
|
|
|
|
|
import com.fr.data.impl.Connection; |
|
|
|
import com.fr.data.impl.Connection; |
|
|
|
import com.fr.data.impl.JDBCDatabaseConnection; |
|
|
|
import com.fr.data.impl.JDBCDatabaseConnection; |
|
|
|
import com.fr.data.impl.JNDIDatabaseConnection; |
|
|
|
import com.fr.data.impl.JNDIDatabaseConnection; |
|
|
@ -34,14 +32,12 @@ import com.fr.stable.Nameable; |
|
|
|
import com.fr.stable.StringUtils; |
|
|
|
import com.fr.stable.StringUtils; |
|
|
|
import com.fr.stable.core.PropertyChangeAdapter; |
|
|
|
import com.fr.stable.core.PropertyChangeAdapter; |
|
|
|
import com.fr.workspace.WorkContext; |
|
|
|
import com.fr.workspace.WorkContext; |
|
|
|
import com.fr.workspace.server.database.DataBaseTypeOperator; |
|
|
|
import com.fr.workspace.server.repository.WorkplaceConstants; |
|
|
|
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.*; |
|
|
|
import javax.swing.SwingWorker; |
|
|
|
import java.awt.*; |
|
|
|
import java.awt.Window; |
|
|
|
|
|
|
|
import java.util.ArrayList; |
|
|
|
import java.util.ArrayList; |
|
|
|
import java.util.Arrays; |
|
|
|
import java.util.Arrays; |
|
|
|
import java.util.HashMap; |
|
|
|
import java.util.HashMap; |
|
|
@ -86,7 +82,7 @@ public class ConnectionListPane extends JListControlPane implements ConnectionSh |
|
|
|
SwingWorker<List<String>, Void> getSupportedTypesWorker = new SwingWorker<List<String>, Void>() { |
|
|
|
SwingWorker<List<String>, Void> getSupportedTypesWorker = new SwingWorker<List<String>, Void>() { |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
protected List<String> doInBackground() { |
|
|
|
protected List<String> doInBackground() { |
|
|
|
return WorkContext.getCurrent().get(DataBaseTypeOperator.class).getSupportedDatabaseTypes(); |
|
|
|
return WorkplaceConstants.getSupportedDatabaseTypes(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
@ -181,7 +177,7 @@ public class ConnectionListPane extends JListControlPane implements ConnectionSh |
|
|
|
JNDIDatabaseConnection.class, DatabaseConnectionPane.JNDI.class |
|
|
|
JNDIDatabaseConnection.class, DatabaseConnectionPane.JNDI.class |
|
|
|
); |
|
|
|
); |
|
|
|
NameableCreator[] creators; |
|
|
|
NameableCreator[] creators; |
|
|
|
if (WorkContext.getCurrent().get(DataBaseTypeOperator.class).limitDatabaseType()) { |
|
|
|
if (WorkplaceConstants.isLimitDatabaseType()) { |
|
|
|
// 不支持JNDI,屏蔽接口
|
|
|
|
// 不支持JNDI,屏蔽接口
|
|
|
|
creators = new NameableCreator[]{jdbc}; |
|
|
|
creators = new NameableCreator[]{jdbc}; |
|
|
|
} else { |
|
|
|
} else { |
|
|
|