提交 6a0cfb13 编写于 作者: S serge-rider

Bundles lazy activation


Former-commit-id: 119495cd
上级 05055333
......@@ -6,5 +6,6 @@ Bundle-Version: 2.0.145.qualifier
Bundle-Release-Date: 20210301
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Bundle-Vendor: %Bundle-Vendor
Bundle-ActivationPolicy: lazy
Export-Package: org.jkiss.wmi.service
Automatic-Module-Name: org.jkiss.wmi
......@@ -6,6 +6,7 @@ Bundle-SymbolicName: org.jkiss.dbeaver.data.gis;singleton:=true
Bundle-Version: 1.0.76.qualifier
Bundle-Release-Date: 20210301
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Bundle-ActivationPolicy: lazy
Require-Bundle: org.jkiss.dbeaver.model,
org.eclipse.core.runtime,
org.jkiss.bundle.gis;visibility:=reexport
......
......@@ -6,6 +6,7 @@ Bundle-SymbolicName: org.jkiss.dbeaver.data.office;singleton:=true
Bundle-Version: 1.1.90.qualifier
Bundle-Release-Date: 20210301
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Bundle-ActivationPolicy: lazy
Require-Bundle: org.jkiss.dbeaver.model,
org.jkiss.dbeaver.data.transfer,
org.jkiss.bundle.apache.poi
......
......@@ -310,6 +310,7 @@
defaultPort="1521"
defaultDatabase="ORCL"
defaultUser="system"
customEndpoint="true"
webURL="https://www.oracle.com/technetwork/database/features/jdbc/"
icon="icons/oracle_icon.png"
iconBig="icons/oracle_icon_big.png"
......
......@@ -6,6 +6,7 @@ Bundle-Version: 1.0.81.qualifier
Bundle-Release-Date: 20210301
Bundle-Vendor: %Bundle-Vendor
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Bundle-ActivationPolicy: lazy
Require-Bundle: org.eclipse.core.runtime,
org.jkiss.dbeaver.ext.postgresql,
org.jkiss.dbeaver.core,
......
......@@ -6,6 +6,7 @@ Bundle-Version: 1.0.81.qualifier
Bundle-Release-Date: 20210301
Bundle-Vendor: %Bundle-Vendor
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Bundle-ActivationPolicy: lazy
Require-Bundle: org.eclipse.core.runtime,
org.jkiss.dbeaver.core,
org.jkiss.dbeaver.debug.core,
......
......@@ -6,6 +6,7 @@ Bundle-Version: 1.0.72.qualifier
Bundle-Release-Date: 20210301
Bundle-Vendor: %Bundle-Vendor
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Bundle-ActivationPolicy: lazy
Require-Bundle: org.jkiss.dbeaver.model;visibility:=reexport,
org.jkiss.dbeaver.model.sql;visibility:=reexport,
org.jkiss.dbeaver.ext.generic;visibility:=reexport
......
......@@ -6,5 +6,6 @@ Bundle-SymbolicName: org.jkiss.dbeaver.intro;singleton:=true
Bundle-Version: 1.0.0.qualifier
Bundle-Release-Date: 20170101
Bundle-Localization: plugin
Bundle-ActivationPolicy: lazy
Require-Bundle: org.eclipse.ui,
org.eclipse.ui.intro
......@@ -110,6 +110,8 @@ public interface DBPDriver extends DBPNamedObject
boolean isLicenseRequired();
boolean isCustomDriverLoader();
boolean isUseURL();
boolean isCustomEndpointInformation();
// Can be created
boolean isInstantiable();
// Driver shipped along with JDK/DBeaver, doesn't need any additional libraries. Basically it is ODBC driver.
......
......@@ -403,11 +403,13 @@ public class DataSourceUtils {
@NotNull
public static String getDataSourceAddressText(DBPDataSourceContainer dataSourceContainer) {
DBPDataSourceProvider dataSourceProvider = dataSourceContainer.getDriver().getDataSourceProvider();
if (dataSourceProvider instanceof DBPInformationProvider) {
String objectInformation = ((DBPInformationProvider) dataSourceProvider).getObjectInformation(dataSourceContainer, DBPInformationProvider.INFO_TARGET_ADDRESS);
if (!CommonUtils.isEmpty(objectInformation)) {
return objectInformation;
if (dataSourceContainer.getDriver().isCustomEndpointInformation()) {
DBPDataSourceProvider dataSourceProvider = dataSourceContainer.getDriver().getDataSourceProvider();
if (dataSourceProvider instanceof DBPInformationProvider) {
String objectInformation = ((DBPInformationProvider) dataSourceProvider).getObjectInformation(dataSourceContainer, DBPInformationProvider.INFO_TARGET_ADDRESS);
if (!CommonUtils.isEmpty(objectInformation)) {
return objectInformation;
}
}
}
DBPConnectionConfiguration cfg = dataSourceContainer.getConnectionConfiguration();
......
......@@ -90,6 +90,7 @@ public class RegistryConstants {
public static final String ATTR_EMBEDDED = "embedded"; //$NON-NLS-1$
public static final String ATTR_CUSTOM_DRIVER_LOADER = "customDriverLoader"; //$NON-NLS-1$
public static final String ATTR_USE_URL_TEMPLATE = "useURL"; //$NON-NLS-1$
public static final String ATTR_CUSTOM_ENDPOINT = "customEndpoint"; //$NON-NLS-1$
public static final String ATTR_INSTANTIABLE = "instantiable"; //$NON-NLS-1$
public static final String ATTR_PROMOTED = "promoted"; //$NON-NLS-1$
......
......@@ -141,6 +141,7 @@ public class DriverDescriptor extends AbstractDescriptor implements DBPDriver {
private boolean licenseRequired;
private boolean customDriverLoader;
private boolean useURLTemplate;
private boolean customEndpointInformation;
private boolean instantiable, origInstantiable;
private boolean custom;
private boolean modified;
......@@ -192,6 +193,7 @@ public class DriverDescriptor extends AbstractDescriptor implements DBPDriver {
this.id = id;
this.custom = true;
this.useURLTemplate = true;
this.customEndpointInformation = false;
this.instantiable = true;
this.promoted = 0;
......@@ -235,6 +237,7 @@ public class DriverDescriptor extends AbstractDescriptor implements DBPDriver {
this.licenseRequired = copyFrom.licenseRequired;
this.customDriverLoader = copyFrom.customDriverLoader;
this.useURLTemplate = copyFrom.useURLTemplate;
this.customEndpointInformation = copyFrom.customEndpointInformation;
this.instantiable = copyFrom.instantiable;
this.promoted = copyFrom.promoted;
this.nativeClientHomes.addAll(copyFrom.nativeClientHomes);
......@@ -281,6 +284,7 @@ public class DriverDescriptor extends AbstractDescriptor implements DBPDriver {
this.clientRequired = CommonUtils.getBoolean(config.getAttribute(RegistryConstants.ATTR_CLIENT_REQUIRED), false);
this.customDriverLoader = CommonUtils.getBoolean(config.getAttribute(RegistryConstants.ATTR_CUSTOM_DRIVER_LOADER), false);
this.useURLTemplate = CommonUtils.getBoolean(config.getAttribute(RegistryConstants.ATTR_USE_URL_TEMPLATE), true);
this.customEndpointInformation = CommonUtils.getBoolean(config.getAttribute(RegistryConstants.ATTR_CUSTOM_ENDPOINT), false);
this.promoted = CommonUtils.toInt(config.getAttribute(RegistryConstants.ATTR_PROMOTED), 0);
this.supportsDriverProperties = CommonUtils.getBoolean(config.getAttribute(RegistryConstants.ATTR_SUPPORTS_DRIVER_PROPERTIES), true);
this.origInstantiable = this.instantiable = CommonUtils.getBoolean(config.getAttribute(RegistryConstants.ATTR_INSTANTIABLE), true);
......@@ -747,7 +751,12 @@ public class DriverDescriptor extends AbstractDescriptor implements DBPDriver {
return useURLTemplate;
}
public void setUseURL(boolean useURLTemplate) {
@Override
public boolean isCustomEndpointInformation() {
return customEndpointInformation;
}
void setUseURL(boolean useURLTemplate) {
this.useURLTemplate = useURLTemplate;
}
......
......@@ -7,6 +7,7 @@ Bundle-Version: 1.0.40.qualifier
Bundle-Release-Date: 20210301
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Bundle-ClassPath: .
Bundle-ActivationPolicy: lazy
Require-Bundle: org.eclipse.core.runtime,
org.jkiss.dbeaver.model;visibility:=reexport,
org.jkiss.dbeaver.registry;visibility:=reexport,
......
......@@ -7,6 +7,7 @@ Bundle-Version: 1.0.40.qualifier
Bundle-Release-Date: 20210301
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Bundle-ClassPath: .
Bundle-ActivationPolicy: lazy
Require-Bundle: org.eclipse.core.runtime,
org.jkiss.dbeaver.model;visibility:=reexport,
org.jkiss.dbeaver.registry;visibility:=reexport,
......
......@@ -7,6 +7,7 @@ Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Bundle-Vendor: DBeaver Corp
Bundle-ClassPath: .
Fragment-Host: org.jkiss.dbeaver.ext.greenplum
Bundle-ActivationPolicy: lazy
Require-Bundle: org.junit,
org.mockito.mockito-all,
org.jkiss.dbeaver.headless,
......
......@@ -7,6 +7,7 @@ Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Bundle-Vendor: DBeaver Corp
Bundle-ClassPath: .
Fragment-Host: org.jkiss.dbeaver.ext.postgresql
Bundle-ActivationPolicy: lazy
Require-Bundle: org.eclipse.core.runtime,
org.eclipse.core.resources,
org.junit,
......
......@@ -5,6 +5,7 @@ Bundle-SymbolicName: org.jkiss.dbeaver.test.platform
Bundle-Version: 1.0.9.qualifier
Bundle-Vendor: %Bundle-Vendor
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Bundle-ActivationPolicy: lazy
Require-Bundle: org.eclipse.core.runtime,
org.eclipse.core.resources,
org.junit,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册