diff --git a/features/org.jkiss.dbeaver.ext.generic.feature/feature.xml b/features/org.jkiss.dbeaver.ext.generic.feature/feature.xml
index c46597e1a91623e2915761def2afdd51660ad046..d6f7d74a9772807e0564d22371de9733d097a922 100644
--- a/features/org.jkiss.dbeaver.ext.generic.feature/feature.xml
+++ b/features/org.jkiss.dbeaver.ext.generic.feature/feature.xml
@@ -22,6 +22,9 @@
+
+
+
@@ -30,7 +33,6 @@
-
diff --git a/plugins/org.jkiss.dbeaver.ext.athena/META-INF/MANIFEST.MF b/plugins/org.jkiss.dbeaver.ext.athena/META-INF/MANIFEST.MF
index 49840fe0144c9a0b8d93e6ede26e15713fc6f79a..fbabe7ef148fd6ab735d93b3c6d1ff2f1c589fb7 100644
--- a/plugins/org.jkiss.dbeaver.ext.athena/META-INF/MANIFEST.MF
+++ b/plugins/org.jkiss.dbeaver.ext.athena/META-INF/MANIFEST.MF
@@ -7,6 +7,7 @@ Bundle-Release-Date: 20190408
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
org.jkiss.dbeaver.core,
+ org.jkiss.dbeaver.model,
org.jkiss.dbeaver.ext.generic
Bundle-Activator: org.jkiss.dbeaver.ext.athena.AthenaActivator
Bundle-ActivationPolicy: lazy
diff --git a/plugins/org.jkiss.dbeaver.ext.bigquery/META-INF/MANIFEST.MF b/plugins/org.jkiss.dbeaver.ext.bigquery/META-INF/MANIFEST.MF
index f70b8d46188eec5208837b359148dd8057b81dfb..3157f9f726c6ec0f58479865380680fcfa3e6628 100644
--- a/plugins/org.jkiss.dbeaver.ext.bigquery/META-INF/MANIFEST.MF
+++ b/plugins/org.jkiss.dbeaver.ext.bigquery/META-INF/MANIFEST.MF
@@ -7,6 +7,7 @@ Bundle-Release-Date: 20190408
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
org.jkiss.dbeaver.core,
+ org.jkiss.dbeaver.model,
org.jkiss.dbeaver.ext.generic
Bundle-Activator: org.jkiss.dbeaver.ext.bigquery.BigQueryActivator
Bundle-ActivationPolicy: lazy
diff --git a/plugins/org.jkiss.dbeaver.ext.clickhouse/META-INF/MANIFEST.MF b/plugins/org.jkiss.dbeaver.ext.clickhouse/META-INF/MANIFEST.MF
index 118c95b11f6782f8943574dc7e84e8b1c3b35ffc..9289ac3bbb87a7da130e9d15fe401dc9109a9c7d 100644
--- a/plugins/org.jkiss.dbeaver.ext.clickhouse/META-INF/MANIFEST.MF
+++ b/plugins/org.jkiss.dbeaver.ext.clickhouse/META-INF/MANIFEST.MF
@@ -7,7 +7,7 @@ Bundle-Release-Date: 20190408
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
org.eclipse.ui.views,
- org.jkiss.dbeaver.core,
+ org.jkiss.dbeaver.model,
org.jkiss.dbeaver.ext.generic
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
diff --git a/plugins/org.jkiss.dbeaver.ext.db2.zos/META-INF/MANIFEST.MF b/plugins/org.jkiss.dbeaver.ext.db2.zos/META-INF/MANIFEST.MF
index e5402d253625bb17530c7d7e62d05029e5101969..4b0724820ae76ff4ed0aeb6ec93de162afa8cf67 100644
--- a/plugins/org.jkiss.dbeaver.ext.db2.zos/META-INF/MANIFEST.MF
+++ b/plugins/org.jkiss.dbeaver.ext.db2.zos/META-INF/MANIFEST.MF
@@ -7,7 +7,7 @@ Bundle-Release-Date: 20190408
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
org.eclipse.ui.views,
- org.jkiss.dbeaver.core,
+ org.jkiss.dbeaver.model,
org.jkiss.dbeaver.ext.generic
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
diff --git a/plugins/org.jkiss.dbeaver.ext.derby/META-INF/MANIFEST.MF b/plugins/org.jkiss.dbeaver.ext.derby/META-INF/MANIFEST.MF
index 375958f092f8fb720721f41d6847a7e0c7686996..bb70f0c266267b43fcea56a2a346372533d471e0 100644
--- a/plugins/org.jkiss.dbeaver.ext.derby/META-INF/MANIFEST.MF
+++ b/plugins/org.jkiss.dbeaver.ext.derby/META-INF/MANIFEST.MF
@@ -8,6 +8,6 @@ Bundle-Release-Date: 20190408
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Bundle-ActivationPolicy: lazy
Require-Bundle: org.eclipse.core.runtime,
- org.jkiss.dbeaver.core,
+ org.jkiss.dbeaver.model,
org.jkiss.dbeaver.ext.generic
Bundle-ClassPath: .
diff --git a/plugins/org.jkiss.dbeaver.ext.es.ui/META-INF/MANIFEST.MF b/plugins/org.jkiss.dbeaver.ext.es.ui/META-INF/MANIFEST.MF
index b3d53956c7cd64512521262182a44102dddd3ebe..4363c3bca53b0125a9f9b28d592b0bee20b4fc1a 100644
--- a/plugins/org.jkiss.dbeaver.ext.es.ui/META-INF/MANIFEST.MF
+++ b/plugins/org.jkiss.dbeaver.ext.es.ui/META-INF/MANIFEST.MF
@@ -6,7 +6,7 @@ Bundle-Version: 1.0.17.qualifier
Bundle-Release-Date: 20190408
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
- org.jkiss.dbeaver.core,
+ org.jkiss.dbeaver.model,
org.jkiss.dbeaver.ext.generic
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
diff --git a/plugins/org.jkiss.dbeaver.ext.firebird/META-INF/MANIFEST.MF b/plugins/org.jkiss.dbeaver.ext.firebird/META-INF/MANIFEST.MF
index 1bfafd4c4058d540298ece73f313745b9cc16bb2..1de7c71e9db505d3c7b36f47c3ef47aa18e07fac 100644
--- a/plugins/org.jkiss.dbeaver.ext.firebird/META-INF/MANIFEST.MF
+++ b/plugins/org.jkiss.dbeaver.ext.firebird/META-INF/MANIFEST.MF
@@ -11,6 +11,7 @@ Require-Bundle: org.eclipse.ui,
org.eclipse.jface.text,
org.jkiss.dbeaver.core,
org.eclipse.ui.workbench.texteditor,
+ org.jkiss.dbeaver.model,
org.jkiss.dbeaver.ext.generic
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
diff --git a/plugins/org.jkiss.dbeaver.ext.firebird/src/org/jkiss/dbeaver/ext/firebird/model/FireBirdDataTypeCache.java b/plugins/org.jkiss.dbeaver.ext.firebird/src/org/jkiss/dbeaver/ext/firebird/model/FireBirdDataTypeCache.java
index 7659066bf765d78353d6205aadafe98e668c6ced..ec6c4b3ff08824953ec98126f4d808955502ba6a 100644
--- a/plugins/org.jkiss.dbeaver.ext.firebird/src/org/jkiss/dbeaver/ext/firebird/model/FireBirdDataTypeCache.java
+++ b/plugins/org.jkiss.dbeaver.ext.firebird/src/org/jkiss/dbeaver/ext/firebird/model/FireBirdDataTypeCache.java
@@ -34,7 +34,7 @@ import java.util.ArrayList;
import java.util.List;
/**
- * SQLiteDataTypeCache
+ * FireBirdDataTypeCache
*/
public class FireBirdDataTypeCache extends JDBCBasicDataTypeCache
{
diff --git a/plugins/org.jkiss.dbeaver.ext.generic.ui/META-INF/MANIFEST.MF b/plugins/org.jkiss.dbeaver.ext.generic.ui/META-INF/MANIFEST.MF
new file mode 100644
index 0000000000000000000000000000000000000000..55594d0943423dc5a7632681bdce70225154e067
--- /dev/null
+++ b/plugins/org.jkiss.dbeaver.ext.generic.ui/META-INF/MANIFEST.MF
@@ -0,0 +1,19 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: DBeaver Generic UI Plug-in
+Bundle-SymbolicName: org.jkiss.dbeaver.ext.generic.ui;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Bundle-Release-Date: 20190408
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.jface.text,
+ org.eclipse.ui.views,
+ org.eclipse.ui.workbench,
+ org.eclipse.ui.workbench.texteditor,
+ org.jkiss.dbeaver.core,
+ org.jkiss.dbeaver.model,
+ org.jkiss.dbeaver.ext.generic
+Bundle-ActivationPolicy: lazy
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-Vendor: JKISS
+Export-Package: org.jkiss.dbeaver.ext.generic.views
diff --git a/plugins/org.jkiss.dbeaver.ext.generic.ui/OSGI-INF/l10n/bundle.properties b/plugins/org.jkiss.dbeaver.ext.generic.ui/OSGI-INF/l10n/bundle.properties
new file mode 100644
index 0000000000000000000000000000000000000000..00abcd1a7eaf4bf2967406597aaf048e2fa9e1b4
--- /dev/null
+++ b/plugins/org.jkiss.dbeaver.ext.generic.ui/OSGI-INF/l10n/bundle.properties
@@ -0,0 +1,4 @@
+dialog.connection.header = Generic JDBC Connection Settings
+
+editor.source.name = Source
+
diff --git a/plugins/org.jkiss.dbeaver.ext.generic.ui/OSGI-INF/l10n/bundle_de.properties b/plugins/org.jkiss.dbeaver.ext.generic.ui/OSGI-INF/l10n/bundle_de.properties
new file mode 100644
index 0000000000000000000000000000000000000000..f5ab900ab2b762f7b3a14d86f9fcba6b87668c41
--- /dev/null
+++ b/plugins/org.jkiss.dbeaver.ext.generic.ui/OSGI-INF/l10n/bundle_de.properties
@@ -0,0 +1,5 @@
+#Generated by ResourceBundle Editor (http://essiembre.github.io/eclipse-rbe/)
+
+dialog.connection.header = Allgemeine JDBC Verbindungseinstellungen
+
+editor.source.name = Quelle
diff --git a/plugins/org.jkiss.dbeaver.ext.generic.ui/OSGI-INF/l10n/bundle_es.properties b/plugins/org.jkiss.dbeaver.ext.generic.ui/OSGI-INF/l10n/bundle_es.properties
new file mode 100644
index 0000000000000000000000000000000000000000..e69c201573ee96459e70f1451ccee2715184aafa
--- /dev/null
+++ b/plugins/org.jkiss.dbeaver.ext.generic.ui/OSGI-INF/l10n/bundle_es.properties
@@ -0,0 +1,3 @@
+# Copyright (C) 2012 Roberto Rossi (impiastro@gmail.com)
+
+dialog.connection.header = Conexión genérica JDBC
diff --git a/plugins/org.jkiss.dbeaver.ext.generic.ui/OSGI-INF/l10n/bundle_fr.properties b/plugins/org.jkiss.dbeaver.ext.generic.ui/OSGI-INF/l10n/bundle_fr.properties
new file mode 100644
index 0000000000000000000000000000000000000000..7130c9f4e9e2dd780634425155597a1a82eeccd4
--- /dev/null
+++ b/plugins/org.jkiss.dbeaver.ext.generic.ui/OSGI-INF/l10n/bundle_fr.properties
@@ -0,0 +1 @@
+dialog.connection.header = Param\u00E8tres de connexion JDBC g\u00E9n\u00E9riques
diff --git a/plugins/org.jkiss.dbeaver.ext.generic.ui/OSGI-INF/l10n/bundle_it.properties b/plugins/org.jkiss.dbeaver.ext.generic.ui/OSGI-INF/l10n/bundle_it.properties
new file mode 100644
index 0000000000000000000000000000000000000000..12b3037f1e78475bfe203637e6958a2c3c3bf7e1
--- /dev/null
+++ b/plugins/org.jkiss.dbeaver.ext.generic.ui/OSGI-INF/l10n/bundle_it.properties
@@ -0,0 +1,3 @@
+# Copyright (C) 2012 Roberto Rossi (impiastro@gmail.com)
+
+dialog.connection.header = Impostazioni Connessione Generica JDBC
diff --git a/plugins/org.jkiss.dbeaver.ext.generic.ui/OSGI-INF/l10n/bundle_ja.properties b/plugins/org.jkiss.dbeaver.ext.generic.ui/OSGI-INF/l10n/bundle_ja.properties
new file mode 100644
index 0000000000000000000000000000000000000000..5c2559c2a1958fc2607f8a42555444efb3e4e286
--- /dev/null
+++ b/plugins/org.jkiss.dbeaver.ext.generic.ui/OSGI-INF/l10n/bundle_ja.properties
@@ -0,0 +1,4 @@
+
+dialog.connection.header=\u4E00\u822C\u7684\u306AJDBC\u63A5\u7D9A\u8A2D\u5B9A
+
+editor.source.name=\u30BD\u30FC\u30B9
diff --git a/plugins/org.jkiss.dbeaver.ext.generic.ui/OSGI-INF/l10n/bundle_ru.properties b/plugins/org.jkiss.dbeaver.ext.generic.ui/OSGI-INF/l10n/bundle_ru.properties
new file mode 100644
index 0000000000000000000000000000000000000000..6358b94a340a3c856f8d456f9c8af064f95a65ec
--- /dev/null
+++ b/plugins/org.jkiss.dbeaver.ext.generic.ui/OSGI-INF/l10n/bundle_ru.properties
@@ -0,0 +1,2 @@
+
+dialog.connection.header=\u041D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0438 \u0431\u0430\u0437\u043E\u0432\u043E\u0433\u043E \u0441\u043E\u0435\u0434\u0438\u043D\u0435\u043D\u0438\u044F
diff --git a/plugins/org.jkiss.dbeaver.ext.generic.ui/OSGI-INF/l10n/bundle_zh.properties b/plugins/org.jkiss.dbeaver.ext.generic.ui/OSGI-INF/l10n/bundle_zh.properties
new file mode 100644
index 0000000000000000000000000000000000000000..7c680b23f0517dde36a8142a3486ab1f9f2dbff0
--- /dev/null
+++ b/plugins/org.jkiss.dbeaver.ext.generic.ui/OSGI-INF/l10n/bundle_zh.properties
@@ -0,0 +1,3 @@
+dialog.connection.header = \u901A\u7528 JDBC \u8FDE\u63A5\u8BBE\u7F6E
+
+editor.source.name = \u8D44\u6E90
diff --git a/plugins/org.jkiss.dbeaver.ext.generic.ui/build.properties b/plugins/org.jkiss.dbeaver.ext.generic.ui/build.properties
new file mode 100644
index 0000000000000000000000000000000000000000..3c833df018f8d70ced93e47092c72a9f05b1bc58
--- /dev/null
+++ b/plugins/org.jkiss.dbeaver.ext.generic.ui/build.properties
@@ -0,0 +1,6 @@
+source.. = src/
+output.. = target/classes/
+bin.includes = .,\
+ META-INF/,\
+ OSGI-INF/,\
+ plugin.xml
diff --git a/plugins/org.jkiss.dbeaver.ext.generic.ui/plugin.xml b/plugins/org.jkiss.dbeaver.ext.generic.ui/plugin.xml
new file mode 100644
index 0000000000000000000000000000000000000000..aa1b46feff2ec076312ebef44a49c9f2e1b3178e
--- /dev/null
+++ b/plugins/org.jkiss.dbeaver.ext.generic.ui/plugin.xml
@@ -0,0 +1,56 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/plugins/org.jkiss.dbeaver.ext.generic.ui/pom.xml b/plugins/org.jkiss.dbeaver.ext.generic.ui/pom.xml
new file mode 100644
index 0000000000000000000000000000000000000000..357065e116f0d0c5182a622d88121dbece57260c
--- /dev/null
+++ b/plugins/org.jkiss.dbeaver.ext.generic.ui/pom.xml
@@ -0,0 +1,14 @@
+
+
+ 4.0.0
+
+ org.jkiss.dbeaver
+ plugins
+ 1.0.0-SNAPSHOT
+ ../
+
+ org.jkiss.dbeaver.ext.generic.ui
+ 1.0.0-SNAPSHOT
+ eclipse-plugin
+
diff --git a/plugins/org.jkiss.dbeaver.ext.generic/src/org/jkiss/dbeaver/ext/generic/GenericMessages.java b/plugins/org.jkiss.dbeaver.ext.generic.ui/src/org/jkiss/dbeaver/ext/generic/internal/GenericMessages.java
similarity index 95%
rename from plugins/org.jkiss.dbeaver.ext.generic/src/org/jkiss/dbeaver/ext/generic/GenericMessages.java
rename to plugins/org.jkiss.dbeaver.ext.generic.ui/src/org/jkiss/dbeaver/ext/generic/internal/GenericMessages.java
index 52e4f92be92ec2e9d86a22d8f263fad6be7141b9..414bf80fa286879ad8f34ab34954e2275b335363 100644
--- a/plugins/org.jkiss.dbeaver.ext.generic/src/org/jkiss/dbeaver/ext/generic/GenericMessages.java
+++ b/plugins/org.jkiss.dbeaver.ext.generic.ui/src/org/jkiss/dbeaver/ext/generic/internal/GenericMessages.java
@@ -15,12 +15,12 @@
* limitations under the License.
*/
-package org.jkiss.dbeaver.ext.generic;
+package org.jkiss.dbeaver.ext.generic.internal;
import org.eclipse.osgi.util.NLS;
public class GenericMessages extends NLS {
- static final String BUNDLE_NAME = "org.jkiss.dbeaver.ext.generic.GenericResources"; //$NON-NLS-1$
+ static final String BUNDLE_NAME = "org.jkiss.dbeaver.ext.generic.internal.GenericResources"; //$NON-NLS-1$
public static String dialog_connection_advanced_tab;
public static String dialog_connection_advanced_tab_tooltip;
diff --git a/plugins/org.jkiss.dbeaver.ext.generic/src/org/jkiss/dbeaver/ext/generic/GenericResources.properties b/plugins/org.jkiss.dbeaver.ext.generic.ui/src/org/jkiss/dbeaver/ext/generic/internal/GenericResources.properties
similarity index 97%
rename from plugins/org.jkiss.dbeaver.ext.generic/src/org/jkiss/dbeaver/ext/generic/GenericResources.properties
rename to plugins/org.jkiss.dbeaver.ext.generic.ui/src/org/jkiss/dbeaver/ext/generic/internal/GenericResources.properties
index 9ec24e59e60d66647c6a4caee877c8ff7e42a1c6..392a45b9d9ef2e0a301e1bf57cf306c64e07040d 100644
--- a/plugins/org.jkiss.dbeaver.ext.generic/src/org/jkiss/dbeaver/ext/generic/GenericResources.properties
+++ b/plugins/org.jkiss.dbeaver.ext.generic.ui/src/org/jkiss/dbeaver/ext/generic/internal/GenericResources.properties
@@ -1,18 +1,18 @@
-
-dialog_connection_advanced_tab=Advanced
-dialog_connection_advanced_tab_tooltip=Advanced/custom driver properties
-dialog_connection_browse_button=Browse ...
-dialog_connection_database_schema_label=Database/Schema:
-dialog_connection_db_file_chooser_text=Choose database file
-dialog_connection_db_folder_chooser_message=Choose folder with database files
-dialog_connection_db_folder_chooser_text=Choose database folder
-dialog_connection_general_tab=General
-dialog_connection_general_tab_tooltip=General connection properties
-dialog_connection_host_label=Host:
-dialog_connection_jdbc_url_=JDBC URL:
-dialog_connection_password_label=Password:
-dialog_connection_path_label=Path:
-dialog_connection_port_label=Port:
-dialog_connection_server_label=Server:
-dialog_connection_test_connection_button=Test Connection ...
-dialog_connection_user_name_label=User name:
+
+dialog_connection_advanced_tab=Advanced
+dialog_connection_advanced_tab_tooltip=Advanced/custom driver properties
+dialog_connection_browse_button=Browse ...
+dialog_connection_database_schema_label=Database/Schema:
+dialog_connection_db_file_chooser_text=Choose database file
+dialog_connection_db_folder_chooser_message=Choose folder with database files
+dialog_connection_db_folder_chooser_text=Choose database folder
+dialog_connection_general_tab=General
+dialog_connection_general_tab_tooltip=General connection properties
+dialog_connection_host_label=Host:
+dialog_connection_jdbc_url_=JDBC URL:
+dialog_connection_password_label=Password:
+dialog_connection_path_label=Path:
+dialog_connection_port_label=Port:
+dialog_connection_server_label=Server:
+dialog_connection_test_connection_button=Test Connection ...
+dialog_connection_user_name_label=User name:
diff --git a/plugins/org.jkiss.dbeaver.ext.generic/src/org/jkiss/dbeaver/ext/generic/GenericResources_de.properties b/plugins/org.jkiss.dbeaver.ext.generic.ui/src/org/jkiss/dbeaver/ext/generic/internal/GenericResources_de.properties
similarity index 100%
rename from plugins/org.jkiss.dbeaver.ext.generic/src/org/jkiss/dbeaver/ext/generic/GenericResources_de.properties
rename to plugins/org.jkiss.dbeaver.ext.generic.ui/src/org/jkiss/dbeaver/ext/generic/internal/GenericResources_de.properties
diff --git a/plugins/org.jkiss.dbeaver.ext.generic/src/org/jkiss/dbeaver/ext/generic/GenericResources_it.properties b/plugins/org.jkiss.dbeaver.ext.generic.ui/src/org/jkiss/dbeaver/ext/generic/internal/GenericResources_it.properties
similarity index 100%
rename from plugins/org.jkiss.dbeaver.ext.generic/src/org/jkiss/dbeaver/ext/generic/GenericResources_it.properties
rename to plugins/org.jkiss.dbeaver.ext.generic.ui/src/org/jkiss/dbeaver/ext/generic/internal/GenericResources_it.properties
diff --git a/plugins/org.jkiss.dbeaver.ext.generic/src/org/jkiss/dbeaver/ext/generic/GenericResources_ja.properties b/plugins/org.jkiss.dbeaver.ext.generic.ui/src/org/jkiss/dbeaver/ext/generic/internal/GenericResources_ja.properties
similarity index 100%
rename from plugins/org.jkiss.dbeaver.ext.generic/src/org/jkiss/dbeaver/ext/generic/GenericResources_ja.properties
rename to plugins/org.jkiss.dbeaver.ext.generic.ui/src/org/jkiss/dbeaver/ext/generic/internal/GenericResources_ja.properties
diff --git a/plugins/org.jkiss.dbeaver.ext.generic/src/org/jkiss/dbeaver/ext/generic/GenericResources_ru.properties b/plugins/org.jkiss.dbeaver.ext.generic.ui/src/org/jkiss/dbeaver/ext/generic/internal/GenericResources_ru.properties
similarity index 100%
rename from plugins/org.jkiss.dbeaver.ext.generic/src/org/jkiss/dbeaver/ext/generic/GenericResources_ru.properties
rename to plugins/org.jkiss.dbeaver.ext.generic.ui/src/org/jkiss/dbeaver/ext/generic/internal/GenericResources_ru.properties
diff --git a/plugins/org.jkiss.dbeaver.ext.generic/src/org/jkiss/dbeaver/ext/generic/GenericResources_zh.properties b/plugins/org.jkiss.dbeaver.ext.generic.ui/src/org/jkiss/dbeaver/ext/generic/internal/GenericResources_zh.properties
similarity index 100%
rename from plugins/org.jkiss.dbeaver.ext.generic/src/org/jkiss/dbeaver/ext/generic/GenericResources_zh.properties
rename to plugins/org.jkiss.dbeaver.ext.generic.ui/src/org/jkiss/dbeaver/ext/generic/internal/GenericResources_zh.properties
diff --git a/plugins/org.jkiss.dbeaver.ext.generic/src/org/jkiss/dbeaver/ext/generic/views/GenericConnectionPage.java b/plugins/org.jkiss.dbeaver.ext.generic.ui/src/org/jkiss/dbeaver/ext/generic/views/GenericConnectionPage.java
similarity index 97%
rename from plugins/org.jkiss.dbeaver.ext.generic/src/org/jkiss/dbeaver/ext/generic/views/GenericConnectionPage.java
rename to plugins/org.jkiss.dbeaver.ext.generic.ui/src/org/jkiss/dbeaver/ext/generic/views/GenericConnectionPage.java
index e8e677c77f7c45c8851c6316e433e67e28cf5a87..6968e26bdd4e0bb55f17be558d40f1c7a9de74fe 100644
--- a/plugins/org.jkiss.dbeaver.ext.generic/src/org/jkiss/dbeaver/ext/generic/views/GenericConnectionPage.java
+++ b/plugins/org.jkiss.dbeaver.ext.generic.ui/src/org/jkiss/dbeaver/ext/generic/views/GenericConnectionPage.java
@@ -1,607 +1,607 @@
-/*
- * DBeaver - Universal Database Manager
- * Copyright (C) 2010-2019 Serge Rider (serge@jkiss.org)
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jkiss.dbeaver.ext.generic.views;
-
-import org.eclipse.jface.dialogs.IDialogPage;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.*;
-import org.jkiss.dbeaver.DBException;
-import org.jkiss.dbeaver.ext.generic.GenericConstants;
-import org.jkiss.dbeaver.ext.generic.GenericMessages;
-import org.jkiss.dbeaver.model.DBPDataSourceContainer;
-import org.jkiss.dbeaver.model.DBPImage;
-import org.jkiss.dbeaver.model.connection.DBPConnectionConfiguration;
-import org.jkiss.dbeaver.model.connection.DBPDriver;
-import org.jkiss.dbeaver.model.impl.jdbc.JDBCConstants;
-import org.jkiss.dbeaver.model.impl.jdbc.JDBCURL;
-import org.jkiss.dbeaver.model.runtime.DBRProgressMonitor;
-import org.jkiss.dbeaver.registry.DataSourceDescriptor;
-import org.jkiss.dbeaver.runtime.DBWorkbench;
-import org.jkiss.dbeaver.ui.DBeaverIcons;
-import org.jkiss.dbeaver.ui.ICompositeDialogPage;
-import org.jkiss.dbeaver.ui.UIUtils;
-import org.jkiss.dbeaver.ui.dialogs.connection.ConnectionPageAbstract;
-import org.jkiss.dbeaver.ui.dialogs.connection.DriverPropertiesDialogPage;
-import org.jkiss.utils.CommonUtils;
-
-import java.io.File;
-import java.lang.reflect.InvocationTargetException;
-import java.util.*;
-import java.util.List;
-
-/**
- * GenericConnectionPage
- */
-public class GenericConnectionPage extends ConnectionPageAbstract implements ICompositeDialogPage
-{
- // Host/port
- private Text hostText;
- private Text portText;
- // server/DB/path
- private Text serverText;
- private Text dbText;
- private Text pathText;
- // Login
- private Text userNameText;
- private Text passwordText;
- // URL
- private Text urlText;
-
- private boolean isCustom;
- private JDBCURL.MetaURL metaURL;
-
- private Composite settingsGroup;
-
- private Map> propGroupMap = new HashMap<>();
-
- private static final String GROUP_URL = "url"; //$NON-NLS-1$
- private static final String GROUP_HOST = "host"; //$NON-NLS-1$
- private static final String GROUP_SERVER = "server"; //$NON-NLS-1$
- private static final String GROUP_DB = "db"; //$NON-NLS-1$
- private static final String GROUP_PATH = "path"; //$NON-NLS-1$
- private static final String GROUP_LOGIN = "login"; //$NON-NLS-1$
- private boolean activated;
- private Button createButton;
-
- @Override
- public void createControl(Composite composite)
- {
- ModifyListener textListener = e -> {
- if (activated) {
- saveAndUpdate();
- }
- };
-
- settingsGroup = new Composite(composite, SWT.NONE);
- GridLayout gl = new GridLayout(4, false);
- gl.marginHeight = 10;
- gl.marginWidth = 10;
- settingsGroup.setLayout(gl);
- GridData gd = new GridData(GridData.FILL_BOTH);
- settingsGroup.setLayoutData(gd);
-
- {
- Label urlLabel = new Label(settingsGroup, SWT.NONE);
- urlLabel.setText(GenericMessages.dialog_connection_jdbc_url_);
- gd = new GridData(GridData.HORIZONTAL_ALIGN_END);
- urlLabel.setLayoutData(gd);
-
- urlText = new Text(settingsGroup, SWT.BORDER);
- gd = new GridData(GridData.FILL_HORIZONTAL);
- gd.horizontalSpan = 3;
- gd.grabExcessHorizontalSpace = true;
- gd.widthHint = 355;
- urlText.setLayoutData(gd);
- urlText.addModifyListener(e -> site.updateButtons());
-
- addControlToGroup(GROUP_URL, urlLabel);
- addControlToGroup(GROUP_URL, urlText);
- }
- {
- Label hostLabel = new Label(settingsGroup, SWT.NONE);
- hostLabel.setText(GenericMessages.dialog_connection_host_label);
- hostLabel.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
-
- hostText = new Text(settingsGroup, SWT.BORDER);
- gd = new GridData(GridData.FILL_HORIZONTAL);
- gd.grabExcessHorizontalSpace = true;
- hostText.setLayoutData(gd);
- hostText.addModifyListener(textListener);
-
- Label portLabel = new Label(settingsGroup, SWT.NONE);
- portLabel.setText(GenericMessages.dialog_connection_port_label);
- portLabel.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
-
- portText = new Text(settingsGroup, SWT.BORDER);
- gd = new GridData(GridData.CENTER);
- gd.widthHint = 60;
- portText.setLayoutData(gd);
- //portText.addVerifyListener(UIUtils.INTEGER_VERIFY_LISTENER);
- portText.addModifyListener(textListener);
-
- addControlToGroup(GROUP_HOST, hostLabel);
- addControlToGroup(GROUP_HOST, hostText);
- addControlToGroup(GROUP_HOST, portLabel);
- addControlToGroup(GROUP_HOST, portText);
- }
-
- {
- Label serverLabel = new Label(settingsGroup, SWT.NONE);
- serverLabel.setText(GenericMessages.dialog_connection_server_label);
- serverLabel.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
-
- serverText = new Text(settingsGroup, SWT.BORDER);
- gd = new GridData(GridData.FILL_HORIZONTAL);
- gd.grabExcessHorizontalSpace = true;
- //gd.widthHint = 270;
- serverText.setLayoutData(gd);
- serverText.addModifyListener(textListener);
-
- Control emptyLabel = UIUtils.createEmptyLabel(settingsGroup, 2, 1);
-
- addControlToGroup(GROUP_SERVER, serverLabel);
- addControlToGroup(GROUP_SERVER, serverText);
- addControlToGroup(GROUP_SERVER, emptyLabel);
- }
-
- {
- Label dbLabel = new Label(settingsGroup, SWT.NONE);
- dbLabel.setText(GenericMessages.dialog_connection_database_schema_label);
- dbLabel.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
-
- dbText = new Text(settingsGroup, SWT.BORDER);
- gd = new GridData(GridData.FILL_HORIZONTAL);
- gd.grabExcessHorizontalSpace = true;
- //gd.widthHint = 270;
- //gd.horizontalSpan = 3;
- dbText.setLayoutData(gd);
- dbText.addModifyListener(textListener);
-
- Control emptyLabel = UIUtils.createEmptyLabel(settingsGroup, 2, 1);
-
- addControlToGroup(GROUP_DB, dbLabel);
- addControlToGroup(GROUP_DB, dbText);
- addControlToGroup(GROUP_DB, emptyLabel);
- }
-
- // Path
- {
- Label pathLabel = new Label(settingsGroup, SWT.NONE);
- pathLabel.setText(GenericMessages.dialog_connection_path_label);
- pathLabel.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
-
- pathText = new Text(settingsGroup, SWT.BORDER);
- gd = new GridData(GridData.FILL_HORIZONTAL);
- gd.grabExcessHorizontalSpace = true;
- gd.widthHint = 200;
- gd.horizontalSpan = 2;
- pathText.setLayoutData(gd);
- pathText.addModifyListener(textListener);
- pathText.addModifyListener(e -> updateCreateButton(site.getDriver()));
-
- Composite buttonsPanel = new Composite(settingsGroup, SWT.NONE);
- gl = new GridLayout(2, true);
- gl.marginHeight = 0;
- gl.marginWidth = 0;
- buttonsPanel.setLayout(gl);
- gd = new GridData(GridData.HORIZONTAL_ALIGN_END);
- gd.widthHint = 150;
- buttonsPanel.setLayoutData(gd);
-
- Button browseButton = new Button(buttonsPanel, SWT.PUSH);
- browseButton.setText(GenericMessages.dialog_connection_browse_button);
- gd = new GridData(GridData.FILL_HORIZONTAL);
- browseButton.setLayoutData(gd);
- browseButton.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e)
- {
- if (metaURL.getAvailableProperties().contains(JDBCConstants.PROP_FILE)) {
- FileDialog dialog = new FileDialog(getShell(), SWT.OPEN | SWT.SINGLE);
- dialog.setFileName(pathText.getText());
- dialog.setText(GenericMessages.dialog_connection_db_file_chooser_text);
- String file = dialog.open();
- if (file != null) {
- pathText.setText(file);
- }
- } else {
- DirectoryDialog dialog = new DirectoryDialog(getShell(), SWT.NONE);
- final String curPath = pathText.getText();
- File curFolder = new File(curPath);
- if (curFolder.exists()) {
- if (curFolder.isDirectory()) {
- dialog.setFilterPath(curFolder.getAbsolutePath());
- } else {
- dialog.setFilterPath(curFolder.getParentFile().getAbsolutePath());
- }
- }
- dialog.setText(GenericMessages.dialog_connection_db_folder_chooser_text);
- dialog.setMessage(GenericMessages.dialog_connection_db_folder_chooser_message);
- String folder = dialog.open();
- if (folder != null) {
- pathText.setText(folder);
- }
- }
- }
- });
-
- createButton = new Button(buttonsPanel, SWT.PUSH);
- createButton.setText("Create");
- createButton.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- createButton.setEnabled(false);
- createButton.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- createEmbeddedDatabase();
- }
- });
-
- addControlToGroup(GROUP_PATH, pathLabel);
- addControlToGroup(GROUP_PATH, pathText);
- addControlToGroup(GROUP_PATH, buttonsPanel);
- }
-
- {
- Label userNameLabel = new Label(settingsGroup, SWT.NONE);
- userNameLabel.setText(GenericMessages.dialog_connection_user_name_label);
- userNameLabel.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
-
- userNameText = new Text(settingsGroup, SWT.BORDER);
- gd = new GridData(GridData.FILL_HORIZONTAL);
- gd.grabExcessHorizontalSpace = true;
- userNameText.setLayoutData(gd);
- userNameText.addModifyListener(textListener);
-
- Control emptyLabel = UIUtils.createEmptyLabel(settingsGroup, 2, 1);
-
- Label passwordLabel = new Label(settingsGroup, SWT.NONE);
- passwordLabel.setText(GenericMessages.dialog_connection_password_label);
- passwordLabel.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
-
- passwordText = new Text(settingsGroup, SWT.BORDER | SWT.PASSWORD);
- gd = new GridData(GridData.FILL_HORIZONTAL);
- gd.grabExcessHorizontalSpace = true;
- passwordText.setLayoutData(gd);
- passwordText.addModifyListener(textListener);
-
- createSavePasswordButton(settingsGroup, 2);
-
- addControlToGroup(GROUP_LOGIN, userNameLabel);
- addControlToGroup(GROUP_LOGIN, userNameText);
- addControlToGroup(GROUP_LOGIN, emptyLabel);
- addControlToGroup(GROUP_LOGIN, passwordLabel);
- addControlToGroup(GROUP_LOGIN, passwordText);
- addControlToGroup(GROUP_LOGIN, savePasswordCheck);
- }
-
- createDriverPanel(settingsGroup);
- setControl(settingsGroup);
- }
-
- @Override
- protected void updateDriverInfo(DBPDriver driver) {
- parseSampleURL(driver);
- saveAndUpdate();
- }
-
- @Override
- public boolean isComplete()
- {
- if (isCustom) {
- return !CommonUtils.isEmpty(urlText.getText());
- } else {
- if (metaURL == null) {
- return false;
- }
- for (String prop : metaURL.getRequiredProperties()) {
- if (
- (prop.equals(JDBCConstants.PROP_HOST) && CommonUtils.isEmptyTrimmed(hostText.getText())) ||
- (prop.equals(JDBCConstants.PROP_PORT) && CommonUtils.isEmptyTrimmed(portText.getText())) ||
- (prop.equals(JDBCConstants.PROP_DATABASE) && CommonUtils.isEmptyTrimmed(dbText.getText())) ||
- ((prop.equals(JDBCConstants.PROP_FILE) || prop.equals(JDBCConstants.PROP_FOLDER)) && CommonUtils.isEmptyTrimmed(pathText.getText())))
- {
- return false;
- }
- }
- return true;
- }
- }
-
- @Override
- protected boolean isCustomURL()
- {
- return isCustom;
- }
-
- @Override
- public void loadSettings()
- {
- super.loadSettings();
-
- {
- DBPDriver driver = getSite().getDriver();
- DBPImage iconBig = driver.getIconBig();
- if (iconBig != null) {
- ImageDescriptor imageDescriptor = DBeaverIcons.getImageDescriptor(iconBig);
- if (imageDescriptor.getImageData().width >= 64) {
- setImageDescriptor(imageDescriptor);
- } else {
- setImageDescriptor(null);
- }
- }
- }
-
- // Load values from new connection info
- DBPConnectionConfiguration connectionInfo = site.getActiveDataSource().getConnectionConfiguration();
- this.parseSampleURL(site.getDriver());
- if (!isCustom) {
- if (hostText != null) {
- if (!CommonUtils.isEmpty(connectionInfo.getHostName())) {
- hostText.setText(CommonUtils.notEmpty(connectionInfo.getHostName()));
- } else {
- hostText.setText("localhost"); //$NON-NLS-1$
- }
- }
- if (portText != null) {
- if (!CommonUtils.isEmpty(connectionInfo.getHostPort())) {
- portText.setText(String.valueOf(connectionInfo.getHostPort()));
- } else if (site.getDriver().getDefaultPort() != null) {
- portText.setText(site.getDriver().getDefaultPort());
- } else {
- portText.setText(""); //$NON-NLS-1$
- }
- }
- if (serverText != null) {
- serverText.setText(CommonUtils.notEmpty(connectionInfo.getServerName()));
- }
- if (dbText != null) {
- dbText.setText(CommonUtils.notEmpty(connectionInfo.getDatabaseName()));
- }
- if (pathText != null) {
- pathText.setText(CommonUtils.notEmpty(connectionInfo.getDatabaseName()));
- }
- } else {
- hostText.setText(""); //$NON-NLS-1$
- portText.setText(""); //$NON-NLS-1$
- serverText.setText(""); //$NON-NLS-1$
- dbText.setText(""); //$NON-NLS-1$
- pathText.setText(""); //$NON-NLS-1$
- }
- if (userNameText != null) {
- userNameText.setText(CommonUtils.notEmpty(connectionInfo.getUserName()));
- }
- if (passwordText != null) {
- passwordText.setText(CommonUtils.notEmpty(connectionInfo.getUserPassword()));
- }
-
- if (urlText != null) {
- if (CommonUtils.isEmpty(connectionInfo.getUrl())) {
- try {
- saveSettings(site.getActiveDataSource());
- } catch (Exception e) {
- setMessage(e.getMessage());
- }
- }
- if (connectionInfo.getUrl() != null) {
- urlText.setText(CommonUtils.notEmpty(connectionInfo.getUrl()));
- } else {
- urlText.setText(""); //$NON-NLS-1$
- }
- }
-
- activated = true;
-
- UIUtils.asyncExec(() -> {
- // Set first control
- if (CommonUtils.isEmpty(site.getDriver().getSampleURL())) {
- urlText.setFocus();
- } else if (hostText != null && hostText.isVisible()) {
- hostText.setFocus();
- } else if (serverText != null && serverText.isVisible()) {
- serverText.setFocus();
- } else if (dbText != null && dbText.isVisible()) {
- dbText.setFocus();
- } else if (pathText != null && pathText.isVisible()) {
- pathText.setFocus();
- } else if (userNameText != null && userNameText.isVisible()) {
- userNameText.setFocus();
- }
- });
-
- }
-
- @Override
- public void saveSettings(DBPDataSourceContainer dataSource)
- {
- DBPConnectionConfiguration connectionInfo = dataSource.getConnectionConfiguration();
- final Set properties = metaURL == null ? Collections.emptySet() : metaURL.getAvailableProperties();
-
- if (hostText != null && properties.contains(JDBCConstants.PROP_HOST)) {
- connectionInfo.setHostName(hostText.getText().trim());
- }
- if (portText != null && properties.contains(JDBCConstants.PROP_PORT)) {
- connectionInfo.setHostPort(portText.getText().trim());
- }
- if (serverText != null && properties.contains(JDBCConstants.PROP_SERVER)) {
- connectionInfo.setServerName(serverText.getText().trim());
- }
- if (dbText != null && properties.contains(JDBCConstants.PROP_DATABASE)) {
- connectionInfo.setDatabaseName(dbText.getText().trim());
- }
- if (pathText != null && (properties.contains(JDBCConstants.PROP_FOLDER) || properties.contains(JDBCConstants.PROP_FILE))) {
- connectionInfo.setDatabaseName(pathText.getText().trim());
- }
- if (userNameText != null) {
- connectionInfo.setUserName(userNameText.getText().trim());
- }
- if (passwordText != null) {
- connectionInfo.setUserPassword(passwordText.getText());
- }
- super.saveSettings(dataSource);
- if (isCustom) {
- if (urlText != null) {
- connectionInfo.setUrl(urlText.getText().trim());
- }
- } else {
- if (urlText != null && connectionInfo.getUrl() != null) {
- urlText.setText(connectionInfo.getUrl());
- }
- }
- }
-
- private void parseSampleURL(DBPDriver driver)
- {
- metaURL = null;
-
- if (!CommonUtils.isEmpty(driver.getSampleURL())) {
- isCustom = false;
- try {
- metaURL = JDBCURL.parseSampleURL(driver.getSampleURL());
- } catch (DBException e) {
- setErrorMessage(e.getMessage());
- }
- final Set properties = metaURL.getAvailableProperties();
- urlText.setEditable(false);
-
- showControlGroup(GROUP_HOST, properties.contains(JDBCConstants.PROP_HOST));
- showControlGroup(GROUP_SERVER, properties.contains(JDBCConstants.PROP_SERVER));
- showControlGroup(GROUP_DB, properties.contains(JDBCConstants.PROP_DATABASE));
- showControlGroup(GROUP_PATH, properties.contains(JDBCConstants.PROP_FOLDER) || properties.contains(JDBCConstants.PROP_FILE));
- } else {
- isCustom = true;
- showControlGroup(GROUP_HOST, false);
- showControlGroup(GROUP_SERVER, false);
- showControlGroup(GROUP_DB, false);
- showControlGroup(GROUP_PATH, false);
- urlText.setEditable(true);
- }
- UIUtils.fixReadonlyTextBackground(urlText);
- showControlGroup(GROUP_LOGIN, !driver.isAnonymousAccess());
- updateCreateButton(driver);
-
-
- settingsGroup.layout();
- }
-
- private void updateCreateButton(DBPDriver driver) {
- if (driver == null) {
- createButton.setEnabled(false);
- return;
- }
- // Enable ""Create" button
- String paramCreate = CommonUtils.toString(driver.getDriverParameter(GenericConstants.PARAM_CREATE_URL_PARAM));
- createButton.setEnabled(!CommonUtils.isEmpty(paramCreate) && !CommonUtils.isEmpty(pathText.getText()));
- }
-
- private void createEmbeddedDatabase() {
- String paramCreate = CommonUtils.toString(site.getDriver().getDriverParameter(GenericConstants.PARAM_CREATE_URL_PARAM));
-
- DataSourceDescriptor dataSource = (DataSourceDescriptor) site.getActiveDataSource();
- final DataSourceDescriptor testDataSource = new DataSourceDescriptor(
- site.getDataSourceRegistry(),
- dataSource.getId(),
- dataSource.getDriver(),
- new DBPConnectionConfiguration(dataSource.getConnectionConfiguration()));
-
- saveSettings(testDataSource);
- DBPConnectionConfiguration cfg = testDataSource.getConnectionConfiguration();
- cfg.setUrl(cfg.getUrl() + paramCreate);
- String databaseName = cfg.getDatabaseName();
- testDataSource.setName(databaseName);
-
- if (!UIUtils.confirmAction(getShell(), "Create Database", "Are you sure you want to create database '" + databaseName + "'?")) {
- testDataSource.dispose();
- return;
- }
-
- try {
- site.getRunnableContext().run(true, true, monitor -> {
- try {
- createEmbeddedDatabase(monitor, testDataSource);
- } catch (DBException e1) {
- throw new InvocationTargetException(e1);
- }
- });
- MessageDialog.openInformation(getShell(), "Database Create", "Database '" + databaseName + "' created!");
- } catch (InvocationTargetException e1) {
- DBWorkbench.getPlatformUI().showError("Create database", "Error creating database", e1.getTargetException());
- } catch (InterruptedException e1) {
- // Just ignore
- }
- }
-
- private void createEmbeddedDatabase(DBRProgressMonitor monitor, DataSourceDescriptor testDataSource) throws DBException {
- try {
- // Connect and disconnect immediately
- testDataSource.connect(monitor, true, true);
-
- testDataSource.disconnect(monitor);
- } finally {
- testDataSource.dispose();
- }
- }
-
- private void saveAndUpdate()
- {
- // Save settings to update URL
- saveSettings(site.getActiveDataSource());
- // Update buttons
- site.updateButtons();
- }
-
- private void showControlGroup(String group, boolean show)
- {
- List controlList = propGroupMap.get(group);
- if (controlList != null) {
- for (Control control : controlList) {
- GridData gd = (GridData)control.getLayoutData();
- if (gd == null) {
- gd = new GridData(GridData.BEGINNING);
- control.setLayoutData(gd);
- }
- gd.exclude = !show;
- control.setVisible(show);
- }
- }
- }
-
- private void addControlToGroup(String group, Control control)
- {
- List controlList = propGroupMap.get(group);
- if (controlList == null) {
- controlList = new ArrayList<>();
- propGroupMap.put(group, controlList);
- }
- controlList.add(control);
- }
-
- @Override
- public IDialogPage[] getSubPages()
- {
- return new IDialogPage[] {
- new DriverPropertiesDialogPage(this)
- };
- }
-
-}
+/*
+ * DBeaver - Universal Database Manager
+ * Copyright (C) 2010-2019 Serge Rider (serge@jkiss.org)
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jkiss.dbeaver.ext.generic.views;
+
+import org.eclipse.jface.dialogs.IDialogPage;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.*;
+import org.jkiss.dbeaver.DBException;
+import org.jkiss.dbeaver.ext.generic.GenericConstants;
+import org.jkiss.dbeaver.ext.generic.internal.GenericMessages;
+import org.jkiss.dbeaver.model.DBPDataSourceContainer;
+import org.jkiss.dbeaver.model.DBPImage;
+import org.jkiss.dbeaver.model.connection.DBPConnectionConfiguration;
+import org.jkiss.dbeaver.model.connection.DBPDriver;
+import org.jkiss.dbeaver.model.impl.jdbc.JDBCConstants;
+import org.jkiss.dbeaver.model.impl.jdbc.JDBCURL;
+import org.jkiss.dbeaver.model.runtime.DBRProgressMonitor;
+import org.jkiss.dbeaver.registry.DataSourceDescriptor;
+import org.jkiss.dbeaver.runtime.DBWorkbench;
+import org.jkiss.dbeaver.ui.DBeaverIcons;
+import org.jkiss.dbeaver.ui.ICompositeDialogPage;
+import org.jkiss.dbeaver.ui.UIUtils;
+import org.jkiss.dbeaver.ui.dialogs.connection.ConnectionPageAbstract;
+import org.jkiss.dbeaver.ui.dialogs.connection.DriverPropertiesDialogPage;
+import org.jkiss.utils.CommonUtils;
+
+import java.io.File;
+import java.lang.reflect.InvocationTargetException;
+import java.util.*;
+import java.util.List;
+
+/**
+ * GenericConnectionPage
+ */
+public class GenericConnectionPage extends ConnectionPageAbstract implements ICompositeDialogPage
+{
+ // Host/port
+ private Text hostText;
+ private Text portText;
+ // server/DB/path
+ private Text serverText;
+ private Text dbText;
+ private Text pathText;
+ // Login
+ private Text userNameText;
+ private Text passwordText;
+ // URL
+ private Text urlText;
+
+ private boolean isCustom;
+ private JDBCURL.MetaURL metaURL;
+
+ private Composite settingsGroup;
+
+ private Map> propGroupMap = new HashMap<>();
+
+ private static final String GROUP_URL = "url"; //$NON-NLS-1$
+ private static final String GROUP_HOST = "host"; //$NON-NLS-1$
+ private static final String GROUP_SERVER = "server"; //$NON-NLS-1$
+ private static final String GROUP_DB = "db"; //$NON-NLS-1$
+ private static final String GROUP_PATH = "path"; //$NON-NLS-1$
+ private static final String GROUP_LOGIN = "login"; //$NON-NLS-1$
+ private boolean activated;
+ private Button createButton;
+
+ @Override
+ public void createControl(Composite composite)
+ {
+ ModifyListener textListener = e -> {
+ if (activated) {
+ saveAndUpdate();
+ }
+ };
+
+ settingsGroup = new Composite(composite, SWT.NONE);
+ GridLayout gl = new GridLayout(4, false);
+ gl.marginHeight = 10;
+ gl.marginWidth = 10;
+ settingsGroup.setLayout(gl);
+ GridData gd = new GridData(GridData.FILL_BOTH);
+ settingsGroup.setLayoutData(gd);
+
+ {
+ Label urlLabel = new Label(settingsGroup, SWT.NONE);
+ urlLabel.setText(GenericMessages.dialog_connection_jdbc_url_);
+ gd = new GridData(GridData.HORIZONTAL_ALIGN_END);
+ urlLabel.setLayoutData(gd);
+
+ urlText = new Text(settingsGroup, SWT.BORDER);
+ gd = new GridData(GridData.FILL_HORIZONTAL);
+ gd.horizontalSpan = 3;
+ gd.grabExcessHorizontalSpace = true;
+ gd.widthHint = 355;
+ urlText.setLayoutData(gd);
+ urlText.addModifyListener(e -> site.updateButtons());
+
+ addControlToGroup(GROUP_URL, urlLabel);
+ addControlToGroup(GROUP_URL, urlText);
+ }
+ {
+ Label hostLabel = new Label(settingsGroup, SWT.NONE);
+ hostLabel.setText(GenericMessages.dialog_connection_host_label);
+ hostLabel.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
+
+ hostText = new Text(settingsGroup, SWT.BORDER);
+ gd = new GridData(GridData.FILL_HORIZONTAL);
+ gd.grabExcessHorizontalSpace = true;
+ hostText.setLayoutData(gd);
+ hostText.addModifyListener(textListener);
+
+ Label portLabel = new Label(settingsGroup, SWT.NONE);
+ portLabel.setText(GenericMessages.dialog_connection_port_label);
+ portLabel.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
+
+ portText = new Text(settingsGroup, SWT.BORDER);
+ gd = new GridData(GridData.CENTER);
+ gd.widthHint = 60;
+ portText.setLayoutData(gd);
+ //portText.addVerifyListener(UIUtils.INTEGER_VERIFY_LISTENER);
+ portText.addModifyListener(textListener);
+
+ addControlToGroup(GROUP_HOST, hostLabel);
+ addControlToGroup(GROUP_HOST, hostText);
+ addControlToGroup(GROUP_HOST, portLabel);
+ addControlToGroup(GROUP_HOST, portText);
+ }
+
+ {
+ Label serverLabel = new Label(settingsGroup, SWT.NONE);
+ serverLabel.setText(GenericMessages.dialog_connection_server_label);
+ serverLabel.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
+
+ serverText = new Text(settingsGroup, SWT.BORDER);
+ gd = new GridData(GridData.FILL_HORIZONTAL);
+ gd.grabExcessHorizontalSpace = true;
+ //gd.widthHint = 270;
+ serverText.setLayoutData(gd);
+ serverText.addModifyListener(textListener);
+
+ Control emptyLabel = UIUtils.createEmptyLabel(settingsGroup, 2, 1);
+
+ addControlToGroup(GROUP_SERVER, serverLabel);
+ addControlToGroup(GROUP_SERVER, serverText);
+ addControlToGroup(GROUP_SERVER, emptyLabel);
+ }
+
+ {
+ Label dbLabel = new Label(settingsGroup, SWT.NONE);
+ dbLabel.setText(GenericMessages.dialog_connection_database_schema_label);
+ dbLabel.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
+
+ dbText = new Text(settingsGroup, SWT.BORDER);
+ gd = new GridData(GridData.FILL_HORIZONTAL);
+ gd.grabExcessHorizontalSpace = true;
+ //gd.widthHint = 270;
+ //gd.horizontalSpan = 3;
+ dbText.setLayoutData(gd);
+ dbText.addModifyListener(textListener);
+
+ Control emptyLabel = UIUtils.createEmptyLabel(settingsGroup, 2, 1);
+
+ addControlToGroup(GROUP_DB, dbLabel);
+ addControlToGroup(GROUP_DB, dbText);
+ addControlToGroup(GROUP_DB, emptyLabel);
+ }
+
+ // Path
+ {
+ Label pathLabel = new Label(settingsGroup, SWT.NONE);
+ pathLabel.setText(GenericMessages.dialog_connection_path_label);
+ pathLabel.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
+
+ pathText = new Text(settingsGroup, SWT.BORDER);
+ gd = new GridData(GridData.FILL_HORIZONTAL);
+ gd.grabExcessHorizontalSpace = true;
+ gd.widthHint = 200;
+ gd.horizontalSpan = 2;
+ pathText.setLayoutData(gd);
+ pathText.addModifyListener(textListener);
+ pathText.addModifyListener(e -> updateCreateButton(site.getDriver()));
+
+ Composite buttonsPanel = new Composite(settingsGroup, SWT.NONE);
+ gl = new GridLayout(2, true);
+ gl.marginHeight = 0;
+ gl.marginWidth = 0;
+ buttonsPanel.setLayout(gl);
+ gd = new GridData(GridData.HORIZONTAL_ALIGN_END);
+ gd.widthHint = 150;
+ buttonsPanel.setLayoutData(gd);
+
+ Button browseButton = new Button(buttonsPanel, SWT.PUSH);
+ browseButton.setText(GenericMessages.dialog_connection_browse_button);
+ gd = new GridData(GridData.FILL_HORIZONTAL);
+ browseButton.setLayoutData(gd);
+ browseButton.addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetSelected(SelectionEvent e)
+ {
+ if (metaURL.getAvailableProperties().contains(JDBCConstants.PROP_FILE)) {
+ FileDialog dialog = new FileDialog(getShell(), SWT.OPEN | SWT.SINGLE);
+ dialog.setFileName(pathText.getText());
+ dialog.setText(GenericMessages.dialog_connection_db_file_chooser_text);
+ String file = dialog.open();
+ if (file != null) {
+ pathText.setText(file);
+ }
+ } else {
+ DirectoryDialog dialog = new DirectoryDialog(getShell(), SWT.NONE);
+ final String curPath = pathText.getText();
+ File curFolder = new File(curPath);
+ if (curFolder.exists()) {
+ if (curFolder.isDirectory()) {
+ dialog.setFilterPath(curFolder.getAbsolutePath());
+ } else {
+ dialog.setFilterPath(curFolder.getParentFile().getAbsolutePath());
+ }
+ }
+ dialog.setText(GenericMessages.dialog_connection_db_folder_chooser_text);
+ dialog.setMessage(GenericMessages.dialog_connection_db_folder_chooser_message);
+ String folder = dialog.open();
+ if (folder != null) {
+ pathText.setText(folder);
+ }
+ }
+ }
+ });
+
+ createButton = new Button(buttonsPanel, SWT.PUSH);
+ createButton.setText("Create");
+ createButton.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+ createButton.setEnabled(false);
+ createButton.addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ createEmbeddedDatabase();
+ }
+ });
+
+ addControlToGroup(GROUP_PATH, pathLabel);
+ addControlToGroup(GROUP_PATH, pathText);
+ addControlToGroup(GROUP_PATH, buttonsPanel);
+ }
+
+ {
+ Label userNameLabel = new Label(settingsGroup, SWT.NONE);
+ userNameLabel.setText(GenericMessages.dialog_connection_user_name_label);
+ userNameLabel.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
+
+ userNameText = new Text(settingsGroup, SWT.BORDER);
+ gd = new GridData(GridData.FILL_HORIZONTAL);
+ gd.grabExcessHorizontalSpace = true;
+ userNameText.setLayoutData(gd);
+ userNameText.addModifyListener(textListener);
+
+ Control emptyLabel = UIUtils.createEmptyLabel(settingsGroup, 2, 1);
+
+ Label passwordLabel = new Label(settingsGroup, SWT.NONE);
+ passwordLabel.setText(GenericMessages.dialog_connection_password_label);
+ passwordLabel.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
+
+ passwordText = new Text(settingsGroup, SWT.BORDER | SWT.PASSWORD);
+ gd = new GridData(GridData.FILL_HORIZONTAL);
+ gd.grabExcessHorizontalSpace = true;
+ passwordText.setLayoutData(gd);
+ passwordText.addModifyListener(textListener);
+
+ createSavePasswordButton(settingsGroup, 2);
+
+ addControlToGroup(GROUP_LOGIN, userNameLabel);
+ addControlToGroup(GROUP_LOGIN, userNameText);
+ addControlToGroup(GROUP_LOGIN, emptyLabel);
+ addControlToGroup(GROUP_LOGIN, passwordLabel);
+ addControlToGroup(GROUP_LOGIN, passwordText);
+ addControlToGroup(GROUP_LOGIN, savePasswordCheck);
+ }
+
+ createDriverPanel(settingsGroup);
+ setControl(settingsGroup);
+ }
+
+ @Override
+ protected void updateDriverInfo(DBPDriver driver) {
+ parseSampleURL(driver);
+ saveAndUpdate();
+ }
+
+ @Override
+ public boolean isComplete()
+ {
+ if (isCustom) {
+ return !CommonUtils.isEmpty(urlText.getText());
+ } else {
+ if (metaURL == null) {
+ return false;
+ }
+ for (String prop : metaURL.getRequiredProperties()) {
+ if (
+ (prop.equals(JDBCConstants.PROP_HOST) && CommonUtils.isEmptyTrimmed(hostText.getText())) ||
+ (prop.equals(JDBCConstants.PROP_PORT) && CommonUtils.isEmptyTrimmed(portText.getText())) ||
+ (prop.equals(JDBCConstants.PROP_DATABASE) && CommonUtils.isEmptyTrimmed(dbText.getText())) ||
+ ((prop.equals(JDBCConstants.PROP_FILE) || prop.equals(JDBCConstants.PROP_FOLDER)) && CommonUtils.isEmptyTrimmed(pathText.getText())))
+ {
+ return false;
+ }
+ }
+ return true;
+ }
+ }
+
+ @Override
+ protected boolean isCustomURL()
+ {
+ return isCustom;
+ }
+
+ @Override
+ public void loadSettings()
+ {
+ super.loadSettings();
+
+ {
+ DBPDriver driver = getSite().getDriver();
+ DBPImage iconBig = driver.getIconBig();
+ if (iconBig != null) {
+ ImageDescriptor imageDescriptor = DBeaverIcons.getImageDescriptor(iconBig);
+ if (imageDescriptor.getImageData().width >= 64) {
+ setImageDescriptor(imageDescriptor);
+ } else {
+ setImageDescriptor(null);
+ }
+ }
+ }
+
+ // Load values from new connection info
+ DBPConnectionConfiguration connectionInfo = site.getActiveDataSource().getConnectionConfiguration();
+ this.parseSampleURL(site.getDriver());
+ if (!isCustom) {
+ if (hostText != null) {
+ if (!CommonUtils.isEmpty(connectionInfo.getHostName())) {
+ hostText.setText(CommonUtils.notEmpty(connectionInfo.getHostName()));
+ } else {
+ hostText.setText("localhost"); //$NON-NLS-1$
+ }
+ }
+ if (portText != null) {
+ if (!CommonUtils.isEmpty(connectionInfo.getHostPort())) {
+ portText.setText(String.valueOf(connectionInfo.getHostPort()));
+ } else if (site.getDriver().getDefaultPort() != null) {
+ portText.setText(site.getDriver().getDefaultPort());
+ } else {
+ portText.setText(""); //$NON-NLS-1$
+ }
+ }
+ if (serverText != null) {
+ serverText.setText(CommonUtils.notEmpty(connectionInfo.getServerName()));
+ }
+ if (dbText != null) {
+ dbText.setText(CommonUtils.notEmpty(connectionInfo.getDatabaseName()));
+ }
+ if (pathText != null) {
+ pathText.setText(CommonUtils.notEmpty(connectionInfo.getDatabaseName()));
+ }
+ } else {
+ hostText.setText(""); //$NON-NLS-1$
+ portText.setText(""); //$NON-NLS-1$
+ serverText.setText(""); //$NON-NLS-1$
+ dbText.setText(""); //$NON-NLS-1$
+ pathText.setText(""); //$NON-NLS-1$
+ }
+ if (userNameText != null) {
+ userNameText.setText(CommonUtils.notEmpty(connectionInfo.getUserName()));
+ }
+ if (passwordText != null) {
+ passwordText.setText(CommonUtils.notEmpty(connectionInfo.getUserPassword()));
+ }
+
+ if (urlText != null) {
+ if (CommonUtils.isEmpty(connectionInfo.getUrl())) {
+ try {
+ saveSettings(site.getActiveDataSource());
+ } catch (Exception e) {
+ setMessage(e.getMessage());
+ }
+ }
+ if (connectionInfo.getUrl() != null) {
+ urlText.setText(CommonUtils.notEmpty(connectionInfo.getUrl()));
+ } else {
+ urlText.setText(""); //$NON-NLS-1$
+ }
+ }
+
+ activated = true;
+
+ UIUtils.asyncExec(() -> {
+ // Set first control
+ if (CommonUtils.isEmpty(site.getDriver().getSampleURL())) {
+ urlText.setFocus();
+ } else if (hostText != null && hostText.isVisible()) {
+ hostText.setFocus();
+ } else if (serverText != null && serverText.isVisible()) {
+ serverText.setFocus();
+ } else if (dbText != null && dbText.isVisible()) {
+ dbText.setFocus();
+ } else if (pathText != null && pathText.isVisible()) {
+ pathText.setFocus();
+ } else if (userNameText != null && userNameText.isVisible()) {
+ userNameText.setFocus();
+ }
+ });
+
+ }
+
+ @Override
+ public void saveSettings(DBPDataSourceContainer dataSource)
+ {
+ DBPConnectionConfiguration connectionInfo = dataSource.getConnectionConfiguration();
+ final Set properties = metaURL == null ? Collections.emptySet() : metaURL.getAvailableProperties();
+
+ if (hostText != null && properties.contains(JDBCConstants.PROP_HOST)) {
+ connectionInfo.setHostName(hostText.getText().trim());
+ }
+ if (portText != null && properties.contains(JDBCConstants.PROP_PORT)) {
+ connectionInfo.setHostPort(portText.getText().trim());
+ }
+ if (serverText != null && properties.contains(JDBCConstants.PROP_SERVER)) {
+ connectionInfo.setServerName(serverText.getText().trim());
+ }
+ if (dbText != null && properties.contains(JDBCConstants.PROP_DATABASE)) {
+ connectionInfo.setDatabaseName(dbText.getText().trim());
+ }
+ if (pathText != null && (properties.contains(JDBCConstants.PROP_FOLDER) || properties.contains(JDBCConstants.PROP_FILE))) {
+ connectionInfo.setDatabaseName(pathText.getText().trim());
+ }
+ if (userNameText != null) {
+ connectionInfo.setUserName(userNameText.getText().trim());
+ }
+ if (passwordText != null) {
+ connectionInfo.setUserPassword(passwordText.getText());
+ }
+ super.saveSettings(dataSource);
+ if (isCustom) {
+ if (urlText != null) {
+ connectionInfo.setUrl(urlText.getText().trim());
+ }
+ } else {
+ if (urlText != null && connectionInfo.getUrl() != null) {
+ urlText.setText(connectionInfo.getUrl());
+ }
+ }
+ }
+
+ private void parseSampleURL(DBPDriver driver)
+ {
+ metaURL = null;
+
+ if (!CommonUtils.isEmpty(driver.getSampleURL())) {
+ isCustom = false;
+ try {
+ metaURL = JDBCURL.parseSampleURL(driver.getSampleURL());
+ } catch (DBException e) {
+ setErrorMessage(e.getMessage());
+ }
+ final Set properties = metaURL.getAvailableProperties();
+ urlText.setEditable(false);
+
+ showControlGroup(GROUP_HOST, properties.contains(JDBCConstants.PROP_HOST));
+ showControlGroup(GROUP_SERVER, properties.contains(JDBCConstants.PROP_SERVER));
+ showControlGroup(GROUP_DB, properties.contains(JDBCConstants.PROP_DATABASE));
+ showControlGroup(GROUP_PATH, properties.contains(JDBCConstants.PROP_FOLDER) || properties.contains(JDBCConstants.PROP_FILE));
+ } else {
+ isCustom = true;
+ showControlGroup(GROUP_HOST, false);
+ showControlGroup(GROUP_SERVER, false);
+ showControlGroup(GROUP_DB, false);
+ showControlGroup(GROUP_PATH, false);
+ urlText.setEditable(true);
+ }
+ UIUtils.fixReadonlyTextBackground(urlText);
+ showControlGroup(GROUP_LOGIN, !driver.isAnonymousAccess());
+ updateCreateButton(driver);
+
+
+ settingsGroup.layout();
+ }
+
+ private void updateCreateButton(DBPDriver driver) {
+ if (driver == null) {
+ createButton.setEnabled(false);
+ return;
+ }
+ // Enable ""Create" button
+ String paramCreate = CommonUtils.toString(driver.getDriverParameter(GenericConstants.PARAM_CREATE_URL_PARAM));
+ createButton.setEnabled(!CommonUtils.isEmpty(paramCreate) && !CommonUtils.isEmpty(pathText.getText()));
+ }
+
+ private void createEmbeddedDatabase() {
+ String paramCreate = CommonUtils.toString(site.getDriver().getDriverParameter(GenericConstants.PARAM_CREATE_URL_PARAM));
+
+ DataSourceDescriptor dataSource = (DataSourceDescriptor) site.getActiveDataSource();
+ final DataSourceDescriptor testDataSource = new DataSourceDescriptor(
+ site.getDataSourceRegistry(),
+ dataSource.getId(),
+ dataSource.getDriver(),
+ new DBPConnectionConfiguration(dataSource.getConnectionConfiguration()));
+
+ saveSettings(testDataSource);
+ DBPConnectionConfiguration cfg = testDataSource.getConnectionConfiguration();
+ cfg.setUrl(cfg.getUrl() + paramCreate);
+ String databaseName = cfg.getDatabaseName();
+ testDataSource.setName(databaseName);
+
+ if (!UIUtils.confirmAction(getShell(), "Create Database", "Are you sure you want to create database '" + databaseName + "'?")) {
+ testDataSource.dispose();
+ return;
+ }
+
+ try {
+ site.getRunnableContext().run(true, true, monitor -> {
+ try {
+ createEmbeddedDatabase(monitor, testDataSource);
+ } catch (DBException e1) {
+ throw new InvocationTargetException(e1);
+ }
+ });
+ MessageDialog.openInformation(getShell(), "Database Create", "Database '" + databaseName + "' created!");
+ } catch (InvocationTargetException e1) {
+ DBWorkbench.getPlatformUI().showError("Create database", "Error creating database", e1.getTargetException());
+ } catch (InterruptedException e1) {
+ // Just ignore
+ }
+ }
+
+ private void createEmbeddedDatabase(DBRProgressMonitor monitor, DataSourceDescriptor testDataSource) throws DBException {
+ try {
+ // Connect and disconnect immediately
+ testDataSource.connect(monitor, true, true);
+
+ testDataSource.disconnect(monitor);
+ } finally {
+ testDataSource.dispose();
+ }
+ }
+
+ private void saveAndUpdate()
+ {
+ // Save settings to update URL
+ saveSettings(site.getActiveDataSource());
+ // Update buttons
+ site.updateButtons();
+ }
+
+ private void showControlGroup(String group, boolean show)
+ {
+ List controlList = propGroupMap.get(group);
+ if (controlList != null) {
+ for (Control control : controlList) {
+ GridData gd = (GridData)control.getLayoutData();
+ if (gd == null) {
+ gd = new GridData(GridData.BEGINNING);
+ control.setLayoutData(gd);
+ }
+ gd.exclude = !show;
+ control.setVisible(show);
+ }
+ }
+ }
+
+ private void addControlToGroup(String group, Control control)
+ {
+ List controlList = propGroupMap.get(group);
+ if (controlList == null) {
+ controlList = new ArrayList<>();
+ propGroupMap.put(group, controlList);
+ }
+ controlList.add(control);
+ }
+
+ @Override
+ public IDialogPage[] getSubPages()
+ {
+ return new IDialogPage[] {
+ new DriverPropertiesDialogPage(this)
+ };
+ }
+
+}
diff --git a/plugins/org.jkiss.dbeaver.ext.generic/META-INF/MANIFEST.MF b/plugins/org.jkiss.dbeaver.ext.generic/META-INF/MANIFEST.MF
index d4a877c8cae4c2b4af45c3c24f9d50b14d135ab5..c615c7f7f8ea9cd9c932495faac51a59bcde8a09 100644
--- a/plugins/org.jkiss.dbeaver.ext.generic/META-INF/MANIFEST.MF
+++ b/plugins/org.jkiss.dbeaver.ext.generic/META-INF/MANIFEST.MF
@@ -1,22 +1,21 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: DBeaver Generic Plug-in
-Bundle-SymbolicName: org.jkiss.dbeaver.ext.generic; singleton:=true
+Bundle-SymbolicName: org.jkiss.dbeaver.ext.generic;singleton:=true
Bundle-Version: 2.3.92.qualifier
Bundle-Release-Date: 20190408
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.jkiss.dbeaver.core,
+Require-Bundle: org.eclipse.core.runtime,
+ org.eclipse.ui,
org.eclipse.jface.text,
org.eclipse.ui.views,
org.eclipse.ui.workbench,
- org.eclipse.ui.workbench.texteditor,
- org.apache.commons.logging
+ org.jkiss.dbeaver.model,
+ org.jkiss.dbeaver.ui,
+ org.jkiss.dbeaver.ui.editors.base
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Bundle-Vendor: JKISS
Export-Package: org.jkiss.dbeaver.ext.generic,
org.jkiss.dbeaver.ext.generic.edit,
org.jkiss.dbeaver.ext.generic.model,
- org.jkiss.dbeaver.ext.generic.model.meta,
- org.jkiss.dbeaver.ext.generic.views
+ org.jkiss.dbeaver.ext.generic.model.meta
diff --git a/plugins/org.jkiss.dbeaver.ext.generic/plugin.xml b/plugins/org.jkiss.dbeaver.ext.generic/plugin.xml
index 8ee0ef661cca4ad9a5ab5b01f3e8783889a87421..ddd303854efb07c6cd0447704d3c432408196adc 100644
--- a/plugins/org.jkiss.dbeaver.ext.generic/plugin.xml
+++ b/plugins/org.jkiss.dbeaver.ext.generic/plugin.xml
@@ -20,7 +20,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-