Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
suliangchun
dbeaver
提交
779aa4e8
D
dbeaver
项目概览
suliangchun
/
dbeaver
与 Fork 源项目一致
从无法访问的项目Fork
通知
3
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
dbeaver
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
779aa4e8
编写于
6月 25, 2015
作者:
J
jurgen
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Misc model refactorings
上级
81629fb6
变更
16
显示空白变更内容
内联
并排
Showing
16 changed file
with
61 addition
and
50 deletion
+61
-50
plugins/org.jkiss.dbeaver.core/META-INF/MANIFEST.MF
plugins/org.jkiss.dbeaver.core/META-INF/MANIFEST.MF
+1
-0
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/core/DBeaverCore.java
....dbeaver.core/src/org/jkiss/dbeaver/core/DBeaverCore.java
+2
-3
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/model/DBIcon.java
...kiss.dbeaver.core/src/org/jkiss/dbeaver/model/DBIcon.java
+15
-6
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/model/impl/jdbc/JDBCDataSourceProvider.java
...jkiss/dbeaver/model/impl/jdbc/JDBCDataSourceProvider.java
+2
-2
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/registry/DataFormatterDescriptor.java
...c/org/jkiss/dbeaver/registry/DataFormatterDescriptor.java
+5
-5
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/registry/DataFormatterProfile.java
.../src/org/jkiss/dbeaver/registry/DataFormatterProfile.java
+6
-6
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/registry/DataSourceProviderDescriptor.java
.../jkiss/dbeaver/registry/DataSourceProviderDescriptor.java
+3
-3
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/registry/DriverDescriptor.java
...core/src/org/jkiss/dbeaver/registry/DriverDescriptor.java
+3
-3
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/registry/transfer/DataTransferProcessorDescriptor.java
...er/registry/transfer/DataTransferProcessorDescriptor.java
+3
-3
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/runtime/net/GlobalProxyAuthenticator.java
...g/jkiss/dbeaver/runtime/net/GlobalProxyAuthenticator.java
+2
-1
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/runtime/net/GlobalProxySelector.java
...rc/org/jkiss/dbeaver/runtime/net/GlobalProxySelector.java
+2
-1
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/runtime/properties/PropertyDescriptor.java
.../jkiss/dbeaver/runtime/properties/PropertyDescriptor.java
+9
-9
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/runtime/properties/PropertySourceAbstract.java
...ss/dbeaver/runtime/properties/PropertySourceAbstract.java
+1
-1
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/controls/ConnectionPropertiesControl.java
...kiss/dbeaver/ui/controls/ConnectionPropertiesControl.java
+3
-3
plugins/org.jkiss.dbeaver.postgresql/src/org/jkiss/dbeaver/ext/postgresql/model/plan/PostgrePlanNode.java
...ss/dbeaver/ext/postgresql/model/plan/PostgrePlanNode.java
+2
-2
plugins/org.jkiss.dbeaver.wmi/src/org/jkiss/dbeaver/ext/wmi/model/WMIPropertySource.java
...rc/org/jkiss/dbeaver/ext/wmi/model/WMIPropertySource.java
+2
-2
未找到文件。
plugins/org.jkiss.dbeaver.core/META-INF/MANIFEST.MF
浏览文件 @
779aa4e8
...
...
@@ -37,6 +37,7 @@ Export-Package: org.jkiss.dbeaver,
org.jkiss.dbeaver.model.navigator,
org.jkiss.dbeaver.model.net,
org.jkiss.dbeaver.model.project,
org.jkiss.dbeaver.model.properties,
org.jkiss.dbeaver.model.qm,
org.jkiss.dbeaver.model.qm.meta,
org.jkiss.dbeaver.model.runtime,
...
...
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/core/DBeaverCore.java
浏览文件 @
779aa4e8
...
...
@@ -24,14 +24,13 @@ import org.jkiss.code.NotNull;
import
org.jkiss.dbeaver.DBException
;
import
org.jkiss.dbeaver.model.DBPApplication
;
import
org.jkiss.dbeaver.model.DBPPreferenceStore
;
import
org.jkiss.dbeaver.
model.impl
.net.GlobalProxyAuthenticator
;
import
org.jkiss.dbeaver.
model.impl
.net.GlobalProxySelector
;
import
org.jkiss.dbeaver.
runtime
.net.GlobalProxyAuthenticator
;
import
org.jkiss.dbeaver.
runtime
.net.GlobalProxySelector
;
import
org.jkiss.dbeaver.model.navigator.DBNModel
;
import
org.jkiss.dbeaver.model.qm.QMController
;
import
org.jkiss.dbeaver.registry.DataSourceProviderRegistry
;
import
org.jkiss.dbeaver.registry.OSDescriptor
;
import
org.jkiss.dbeaver.registry.ProjectRegistry
;
import
org.jkiss.dbeaver.runtime.preferences.BundlePreferenceStore
;
import
org.jkiss.dbeaver.runtime.qm.QMControllerImpl
;
import
org.jkiss.dbeaver.runtime.qm.QMLogFileWriter
;
import
org.osgi.framework.Bundle
;
...
...
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/model/DBIcon.java
浏览文件 @
779aa4e8
...
...
@@ -18,13 +18,17 @@
package
org.jkiss.dbeaver.model
;
import
org.eclipse.core.runtime.FileLocator
;
import
org.jkiss.dbeaver.DBeaverConstants
;
import
org.jkiss.dbeaver.core.Log
;
import
org.jkiss.dbeaver.runtime.RuntimeUtils
;
import
java.io.File
;
import
java.io.IOException
;
import
java.lang.reflect.Field
;
import
java.lang.reflect.Modifier
;
import
java.net.URI
;
import
java.net.URISyntaxException
;
import
java.net.URL
;
import
java.util.HashMap
;
import
java.util.Map
;
...
...
@@ -262,12 +266,17 @@ public class DBIcon implements DBPImage
}
try
{
DBIcon
icon
=
(
DBIcon
)
field
.
get
(
null
);
File
file
=
RuntimeUtils
.
getPlatformFile
(
icon
.
getLocation
());
URL
fileURL
=
FileLocator
.
toFileURL
(
new
URL
(
icon
.
getLocation
()));
try
{
File
file
=
new
File
(
new
URI
(
fileURL
.
toString
()));
if
(!
file
.
exists
())
{
log
.
warn
(
"Bad image '"
+
icon
.
getToken
()
+
"' location: "
+
icon
.
getLocation
());
continue
;
}
DBIcon
.
iconMap
.
put
(
icon
.
getToken
(),
icon
);
}
catch
(
URISyntaxException
e
)
{
throw
new
IOException
(
"Bad local file path: "
+
fileURL
,
e
);
}
}
catch
(
Exception
e
)
{
log
.
error
(
e
);
}
...
...
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/model/impl/jdbc/JDBCDataSourceProvider.java
浏览文件 @
779aa4e8
...
...
@@ -23,7 +23,7 @@ import org.jkiss.dbeaver.core.CoreMessages;
import
org.jkiss.dbeaver.core.Log
;
import
org.jkiss.dbeaver.model.*
;
import
org.jkiss.dbeaver.model.runtime.DBRRunnableContext
;
import
org.jkiss.dbeaver.runtime.properties.PropertyDescriptor
Ex
;
import
org.jkiss.dbeaver.runtime.properties.PropertyDescriptor
;
import
java.sql.Driver
;
import
java.sql.DriverPropertyInfo
;
...
...
@@ -89,7 +89,7 @@ public abstract class JDBCDataSourceProvider implements DBPDataSourceProvider {
continue
;
}
desc
.
value
=
getConnectionPropertyDefaultValue
(
desc
.
name
,
desc
.
value
);
properties
.
add
(
new
PropertyDescriptor
Ex
(
properties
.
add
(
new
PropertyDescriptor
(
CoreMessages
.
model_jdbc_driver_properties
,
desc
.
name
,
desc
.
name
,
...
...
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/registry/DataFormatterDescriptor.java
浏览文件 @
779aa4e8
...
...
@@ -21,7 +21,7 @@ package org.jkiss.dbeaver.registry;
import
org.eclipse.core.runtime.IConfigurationElement
;
import
org.jkiss.dbeaver.model.data.DBDDataFormatter
;
import
org.jkiss.dbeaver.model.data.DBDDataFormatterSample
;
import
org.jkiss.dbeaver.runtime.properties.PropertyDescriptor
Ex
;
import
org.jkiss.dbeaver.runtime.properties.PropertyDescriptor
;
import
java.util.ArrayList
;
import
java.util.List
;
...
...
@@ -36,7 +36,7 @@ public class DataFormatterDescriptor extends AbstractDescriptor
private
String
id
;
private
String
name
;
private
String
description
;
private
List
<
PropertyDescriptor
Ex
>
properties
=
new
ArrayList
<
PropertyDescriptorEx
>();
private
List
<
PropertyDescriptor
>
properties
=
new
ArrayList
<
PropertyDescriptor
>();
private
DBDDataFormatterSample
sample
;
private
ObjectType
formatterType
;
...
...
@@ -49,9 +49,9 @@ public class DataFormatterDescriptor extends AbstractDescriptor
this
.
name
=
config
.
getAttribute
(
RegistryConstants
.
ATTR_LABEL
);
this
.
description
=
config
.
getAttribute
(
RegistryConstants
.
ATTR_DESCRIPTION
);
IConfigurationElement
[]
propElements
=
config
.
getChildren
(
PropertyDescriptor
Ex
.
TAG_PROPERTY_GROUP
);
IConfigurationElement
[]
propElements
=
config
.
getChildren
(
PropertyDescriptor
.
TAG_PROPERTY_GROUP
);
for
(
IConfigurationElement
prop
:
propElements
)
{
properties
.
addAll
(
PropertyDescriptor
Ex
.
extractProperties
(
prop
));
properties
.
addAll
(
PropertyDescriptor
.
extractProperties
(
prop
));
}
Class
<?>
objectClass
=
getObjectClass
(
config
.
getAttribute
(
RegistryConstants
.
ATTR_SAMPLE_CLASS
));
try
{
...
...
@@ -81,7 +81,7 @@ public class DataFormatterDescriptor extends AbstractDescriptor
return
sample
;
}
public
List
<
PropertyDescriptor
Ex
>
getProperties
()
{
public
List
<
PropertyDescriptor
>
getProperties
()
{
return
properties
;
}
...
...
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/registry/DataFormatterProfile.java
浏览文件 @
779aa4e8
...
...
@@ -18,11 +18,11 @@
package
org.jkiss.dbeaver.registry
;
import
org.jkiss.dbeaver.model.DBPPreferenceStore
;
import
org.jkiss.dbeaver.model.DBPPropertyDescriptor
;
import
org.jkiss.dbeaver.model.data.DBDDataFormatter
;
import
org.jkiss.dbeaver.model.data.DBDDataFormatterProfile
;
import
org.jkiss.dbeaver.runtime.RuntimeUtils
;
import
org.jkiss.dbeaver.runtime.preferences.SimplePreferenceStore
;
import
org.jkiss.dbeaver.runtime.properties.PropertyDescriptorEx
;
import
org.jkiss.utils.CommonUtils
;
import
java.io.IOException
;
...
...
@@ -73,7 +73,7 @@ public class DataFormatterProfile implements DBDDataFormatterProfile {
for
(
DataFormatterDescriptor
formatter
:
DataFormatterRegistry
.
getInstance
().
getDataFormatters
())
{
Map
<
Object
,
Object
>
defaultProperties
=
formatter
.
getSample
().
getDefaultProperties
(
locale
);
Map
<
Object
,
Object
>
formatterProps
=
new
HashMap
<
Object
,
Object
>();
for
(
PropertyDescriptorEx
prop
:
formatter
.
getProperties
())
{
for
(
DBPPropertyDescriptor
prop
:
formatter
.
getProperties
())
{
Object
defaultValue
=
defaultProperties
.
get
(
prop
.
getId
());
Object
propValue
=
RuntimeUtils
.
getPreferenceValue
(
store
,
...
...
@@ -95,7 +95,7 @@ public class DataFormatterProfile implements DBDDataFormatterProfile {
for
(
DataFormatterDescriptor
formatter
:
DataFormatterRegistry
.
getInstance
().
getDataFormatters
())
{
Map
<
Object
,
Object
>
formatterProps
=
properties
.
get
(
formatter
.
getId
());
for
(
PropertyDescriptorEx
prop
:
formatter
.
getProperties
())
{
for
(
DBPPropertyDescriptor
prop
:
formatter
.
getProperties
())
{
Object
propValue
=
formatterProps
==
null
?
null
:
formatterProps
.
get
(
prop
.
getId
());
if
(
propValue
!=
null
)
{
RuntimeUtils
.
setPreferenceValue
(
store
,
DATAFORMAT_TYPE_PREFIX
+
formatter
.
getId
()
+
"."
+
prop
.
getId
(),
propValue
);
...
...
@@ -160,7 +160,7 @@ public class DataFormatterProfile implements DBDDataFormatterProfile {
}
for
(
DataFormatterDescriptor
formatter
:
DataFormatterRegistry
.
getInstance
().
getDataFormatters
())
{
for
(
PropertyDescriptorEx
prop
:
formatter
.
getProperties
())
{
for
(
DBPPropertyDescriptor
prop
:
formatter
.
getProperties
())
{
if
(
prefStore
.
isSet
(
DATAFORMAT_TYPE_PREFIX
+
formatter
.
getId
()
+
"."
+
prop
.
getId
()))
{
return
true
;
}
...
...
@@ -182,7 +182,7 @@ public class DataFormatterProfile implements DBDDataFormatterProfile {
store
.
setToDefault
(
PROP_VARIANT
);
for
(
DataFormatterDescriptor
formatter
:
DataFormatterRegistry
.
getInstance
().
getDataFormatters
())
{
for
(
PropertyDescriptorEx
prop
:
formatter
.
getProperties
())
{
for
(
DBPPropertyDescriptor
prop
:
formatter
.
getProperties
())
{
store
.
setToDefault
(
DATAFORMAT_TYPE_PREFIX
+
formatter
.
getId
()
+
"."
+
prop
.
getId
());
}
}
...
...
@@ -218,7 +218,7 @@ public class DataFormatterProfile implements DBDDataFormatterProfile {
for
(
DataFormatterDescriptor
formatter
:
DataFormatterRegistry
.
getInstance
().
getDataFormatters
())
{
Map
<
Object
,
Object
>
defaultProperties
=
formatter
.
getSample
().
getDefaultProperties
(
locale
);
Map
<
Object
,
Object
>
formatterProps
=
new
HashMap
<
Object
,
Object
>();
for
(
PropertyDescriptorEx
prop
:
formatter
.
getProperties
())
{
for
(
DBPPropertyDescriptor
prop
:
formatter
.
getProperties
())
{
Object
defaultValue
=
defaultProperties
.
get
(
prop
.
getId
());
if
(
defaultValue
!=
null
)
{
RuntimeUtils
.
setPreferenceDefaultValue
(
store
,
DATAFORMAT_TYPE_PREFIX
+
formatter
.
getId
()
+
"."
+
prop
.
getId
(),
defaultValue
);
...
...
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/registry/DataSourceProviderDescriptor.java
浏览文件 @
779aa4e8
...
...
@@ -32,7 +32,7 @@ import org.jkiss.dbeaver.model.struct.DBSObject;
import
org.jkiss.dbeaver.registry.tree.*
;
import
org.jkiss.dbeaver.model.DBIcon
;
import
org.jkiss.dbeaver.ui.NavigatorUtils
;
import
org.jkiss.dbeaver.runtime.properties.PropertyDescriptor
Ex
;
import
org.jkiss.dbeaver.runtime.properties.PropertyDescriptor
;
import
org.jkiss.utils.ArrayUtils
;
import
org.jkiss.utils.CommonUtils
;
import
org.jkiss.utils.SecurityUtils
;
...
...
@@ -87,8 +87,8 @@ public class DataSourceProviderDescriptor extends AbstractDescriptor
// Load driver properties
{
for
(
IConfigurationElement
propsElement
:
config
.
getChildren
(
RegistryConstants
.
TAG_DRIVER_PROPERTIES
))
{
for
(
IConfigurationElement
prop
:
propsElement
.
getChildren
(
PropertyDescriptor
Ex
.
TAG_PROPERTY_GROUP
))
{
driverProperties
.
addAll
(
PropertyDescriptor
Ex
.
extractProperties
(
prop
));
for
(
IConfigurationElement
prop
:
propsElement
.
getChildren
(
PropertyDescriptor
.
TAG_PROPERTY_GROUP
))
{
driverProperties
.
addAll
(
PropertyDescriptor
.
extractProperties
(
prop
));
}
}
}
...
...
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/registry/DriverDescriptor.java
浏览文件 @
779aa4e8
...
...
@@ -38,10 +38,10 @@ import org.jkiss.dbeaver.model.runtime.DBRProgressMonitor;
import
org.jkiss.dbeaver.model.runtime.DBRRunnableContext
;
import
org.jkiss.dbeaver.model.runtime.DBRRunnableWithProgress
;
import
org.jkiss.dbeaver.runtime.RuntimeUtils
;
import
org.jkiss.dbeaver.runtime.properties.PropertyDescriptor
;
import
org.jkiss.dbeaver.ui.UIUtils
;
import
org.jkiss.dbeaver.ui.dialogs.AcceptLicenseDialog
;
import
org.jkiss.dbeaver.ui.dialogs.ConfirmationDialog
;
import
org.jkiss.dbeaver.runtime.properties.PropertyDescriptorEx
;
import
org.jkiss.dbeaver.utils.ContentUtils
;
import
org.jkiss.utils.CommonUtils
;
import
org.jkiss.utils.xml.SAXListener
;
...
...
@@ -189,9 +189,9 @@ public class DriverDescriptor extends AbstractDescriptor implements DBPDriver
{
// Connection property groups
IConfigurationElement
[]
propElements
=
config
.
getChildren
(
PropertyDescriptor
Ex
.
TAG_PROPERTY_GROUP
);
IConfigurationElement
[]
propElements
=
config
.
getChildren
(
PropertyDescriptor
.
TAG_PROPERTY_GROUP
);
for
(
IConfigurationElement
prop
:
propElements
)
{
connectionPropertyDescriptors
.
addAll
(
PropertyDescriptor
Ex
.
extractProperties
(
prop
));
connectionPropertyDescriptors
.
addAll
(
PropertyDescriptor
.
extractProperties
(
prop
));
}
}
...
...
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/registry/transfer/DataTransferProcessorDescriptor.java
浏览文件 @
779aa4e8
...
...
@@ -24,8 +24,8 @@ import org.jkiss.dbeaver.model.DBPImage;
import
org.jkiss.dbeaver.model.DBPPropertyDescriptor
;
import
org.jkiss.dbeaver.registry.AbstractDescriptor
;
import
org.jkiss.dbeaver.registry.RegistryConstants
;
import
org.jkiss.dbeaver.runtime.properties.PropertyDescriptor
;
import
org.jkiss.dbeaver.tools.transfer.IDataTransferProcessor
;
import
org.jkiss.dbeaver.runtime.properties.PropertyDescriptorEx
;
import
org.jkiss.utils.ArrayUtils
;
import
java.util.ArrayList
;
...
...
@@ -59,8 +59,8 @@ public class DataTransferProcessorDescriptor extends AbstractDescriptor
sourceTypes
.
add
(
new
ObjectType
(
typeCfg
.
getAttribute
(
RegistryConstants
.
ATTR_TYPE
)));
}
for
(
IConfigurationElement
prop
:
ArrayUtils
.
safeArray
(
config
.
getChildren
(
PropertyDescriptor
Ex
.
TAG_PROPERTY_GROUP
)))
{
properties
.
addAll
(
PropertyDescriptor
Ex
.
extractProperties
(
prop
));
for
(
IConfigurationElement
prop
:
ArrayUtils
.
safeArray
(
config
.
getChildren
(
PropertyDescriptor
.
TAG_PROPERTY_GROUP
)))
{
properties
.
addAll
(
PropertyDescriptor
.
extractProperties
(
prop
));
}
}
...
...
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/
model/impl
/net/GlobalProxyAuthenticator.java
→
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/
runtime
/net/GlobalProxyAuthenticator.java
浏览文件 @
779aa4e8
...
...
@@ -15,7 +15,7 @@
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
package
org.jkiss.dbeaver.
model.impl
.net
;
package
org.jkiss.dbeaver.
runtime
.net
;
import
org.jkiss.code.Nullable
;
import
org.jkiss.dbeaver.DBeaverPreferences
;
...
...
@@ -23,6 +23,7 @@ import org.jkiss.dbeaver.core.DBeaverCore;
import
org.jkiss.dbeaver.model.DBPPreferenceStore
;
import
org.jkiss.dbeaver.model.access.DBAAuthInfo
;
import
org.jkiss.dbeaver.model.exec.DBCExecutionContext
;
import
org.jkiss.dbeaver.model.impl.net.SocksConstants
;
import
org.jkiss.dbeaver.model.net.DBWHandlerConfiguration
;
import
org.jkiss.dbeaver.model.net.DBWHandlerType
;
import
org.jkiss.dbeaver.model.struct.DBSDataSourceContainer
;
...
...
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/
model/impl
/net/GlobalProxySelector.java
→
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/
runtime
/net/GlobalProxySelector.java
浏览文件 @
779aa4e8
...
...
@@ -15,10 +15,11 @@
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
package
org.jkiss.dbeaver.
model.impl
.net
;
package
org.jkiss.dbeaver.
runtime
.net
;
import
org.jkiss.dbeaver.core.Log
;
import
org.jkiss.dbeaver.model.exec.DBCExecutionContext
;
import
org.jkiss.dbeaver.model.impl.net.SocksConstants
;
import
org.jkiss.dbeaver.model.net.DBWHandlerConfiguration
;
import
org.jkiss.dbeaver.model.net.DBWHandlerType
;
import
org.jkiss.dbeaver.model.struct.DBSDataSourceContainer
;
...
...
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/runtime/properties/PropertyDescriptor
Ex
.java
→
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/runtime/properties/PropertyDescriptor.java
浏览文件 @
779aa4e8
...
...
@@ -31,12 +31,12 @@ import java.util.ArrayList;
import
java.util.List
;
/**
* PropertyDescriptor
Ex
* PropertyDescriptor
*/
public
class
PropertyDescriptor
Ex
implements
DBPPropertyDescriptor
,
IPropertyValueListProvider
<
Object
>
public
class
PropertyDescriptor
implements
DBPPropertyDescriptor
,
IPropertyValueListProvider
<
Object
>
{
static
final
Log
log
=
Log
.
getLog
(
PropertyDescriptor
Ex
.
class
);
static
final
Log
log
=
Log
.
getLog
(
PropertyDescriptor
.
class
);
public
static
final
String
TAG_PROPERTY_GROUP
=
"propertyGroup"
;
//NON-NLS-1
public
static
final
String
NAME_UNDEFINED
=
"<undefined>"
;
//NON-NLS-1
...
...
@@ -60,21 +60,21 @@ public class PropertyDescriptorEx implements DBPPropertyDescriptor, IPropertyVal
private
Object
[]
validValues
;
private
boolean
editable
;
public
static
List
<
PropertyDescriptor
Ex
>
extractProperties
(
IConfigurationElement
config
)
public
static
List
<
PropertyDescriptor
>
extractProperties
(
IConfigurationElement
config
)
{
String
category
=
config
.
getAttribute
(
ATTR_LABEL
);
if
(
CommonUtils
.
isEmpty
(
category
))
{
category
=
NAME_UNDEFINED
;
}
List
<
PropertyDescriptor
Ex
>
properties
=
new
ArrayList
<
PropertyDescriptorEx
>();
IConfigurationElement
[]
propElements
=
config
.
getChildren
(
PropertyDescriptor
Ex
.
TAG_PROPERTY
);
List
<
PropertyDescriptor
>
properties
=
new
ArrayList
<
PropertyDescriptor
>();
IConfigurationElement
[]
propElements
=
config
.
getChildren
(
PropertyDescriptor
.
TAG_PROPERTY
);
for
(
IConfigurationElement
prop
:
propElements
)
{
properties
.
add
(
new
PropertyDescriptor
Ex
(
category
,
prop
));
properties
.
add
(
new
PropertyDescriptor
(
category
,
prop
));
}
return
properties
;
}
public
PropertyDescriptor
Ex
(
String
category
,
IConfigurationElement
config
)
public
PropertyDescriptor
(
String
category
,
IConfigurationElement
config
)
{
this
.
category
=
category
;
this
.
id
=
config
.
getAttribute
(
ATTR_ID
);
...
...
@@ -105,7 +105,7 @@ public class PropertyDescriptorEx implements DBPPropertyDescriptor, IPropertyVal
this
.
editable
=
true
;
}
public
PropertyDescriptor
Ex
(
String
category
,
Object
id
,
String
name
,
String
description
,
Class
<?>
type
,
boolean
required
,
String
defaultValue
,
String
[]
validValues
,
boolean
editable
)
{
public
PropertyDescriptor
(
String
category
,
Object
id
,
String
name
,
String
description
,
Class
<?>
type
,
boolean
required
,
String
defaultValue
,
String
[]
validValues
,
boolean
editable
)
{
this
.
category
=
category
;
this
.
id
=
id
;
this
.
name
=
name
;
...
...
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/runtime/properties/PropertySourceAbstract.java
浏览文件 @
779aa4e8
...
...
@@ -76,7 +76,7 @@ public abstract class PropertySourceAbstract implements DBPPropertyManager, IPro
public
void
addProperty
(
@Nullable
String
category
,
Object
id
,
String
name
,
Object
value
)
{
props
.
add
(
new
PropertyDescriptor
Ex
(
category
,
id
,
name
,
null
,
value
==
null
?
null
:
value
.
getClass
(),
false
,
null
,
null
,
false
));
props
.
add
(
new
PropertyDescriptor
(
category
,
id
,
name
,
null
,
value
==
null
?
null
:
value
.
getClass
(),
false
,
null
,
null
,
false
));
propValues
.
put
(
id
,
value
);
}
...
...
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/controls/ConnectionPropertiesControl.java
浏览文件 @
779aa4e8
...
...
@@ -30,7 +30,7 @@ import org.jkiss.dbeaver.model.DBPDriver;
import
org.jkiss.dbeaver.model.DBPPropertyDescriptor
;
import
org.jkiss.dbeaver.model.runtime.DBRRunnableContext
;
import
org.jkiss.dbeaver.ui.dialogs.EnterNameDialog
;
import
org.jkiss.dbeaver.runtime.properties.PropertyDescriptor
Ex
;
import
org.jkiss.dbeaver.runtime.properties.PropertyDescriptor
;
import
org.jkiss.dbeaver.runtime.properties.PropertySourceCustom
;
import
org.jkiss.dbeaver.ui.properties.PropertyTreeViewer
;
import
org.jkiss.utils.CommonUtils
;
...
...
@@ -116,7 +116,7 @@ public class ConnectionPropertiesControl extends PropertyTreeViewer {
String
propName
=
EnterNameDialog
.
chooseName
(
getControl
().
getShell
(),
CoreMessages
.
controls_connection_properties_dialog_new_property_title
);
if
(
propName
!=
null
)
{
// Check property name (must be unique
addProperty
(
node
,
new
PropertyDescriptor
Ex
(
category
,
propName
,
propName
,
null
,
null
,
false
,
null
,
null
,
true
));
addProperty
(
node
,
new
PropertyDescriptor
(
category
,
propName
,
propName
,
null
,
null
,
false
,
null
,
null
,
true
));
}
}
...
...
@@ -163,7 +163,7 @@ public class ConnectionPropertiesControl extends PropertyTreeViewer {
continue
;
}
if
(!
propNames
.
contains
(
propName
))
{
customProperties
.
add
(
new
PropertyDescriptor
Ex
(
customProperties
.
add
(
new
PropertyDescriptor
(
USER_PROPERTIES_CATEGORY
,
propName
,
propName
,
...
...
plugins/org.jkiss.dbeaver.postgresql/src/org/jkiss/dbeaver/ext/postgresql/model/plan/PostgrePlanNode.java
浏览文件 @
779aa4e8
...
...
@@ -21,7 +21,7 @@ import org.jkiss.dbeaver.model.DBPPropertyDescriptor;
import
org.jkiss.dbeaver.model.DBPPropertySource
;
import
org.jkiss.dbeaver.model.exec.plan.DBCPlanNode
;
import
org.jkiss.dbeaver.model.meta.Property
;
import
org.jkiss.dbeaver.runtime.properties.PropertyDescriptor
Ex
;
import
org.jkiss.dbeaver.runtime.properties.PropertyDescriptor
;
import
org.jkiss.utils.CommonUtils
;
import
org.jkiss.utils.xml.XMLUtils
;
import
org.w3c.dom.Element
;
...
...
@@ -122,7 +122,7 @@ public class PostgrePlanNode implements DBCPlanNode, DBPPropertySource {
DBPPropertyDescriptor
[]
props
=
new
DBPPropertyDescriptor
[
attributes
.
size
()];
int
index
=
0
;
for
(
Map
.
Entry
<
String
,
String
>
attr
:
attributes
.
entrySet
())
{
props
[
index
++]
=
new
PropertyDescriptor
Ex
(
"Source"
,
attr
.
getKey
(),
attr
.
getKey
(),
null
,
String
.
class
,
false
,
null
,
null
,
false
);
props
[
index
++]
=
new
PropertyDescriptor
(
"Source"
,
attr
.
getKey
(),
attr
.
getKey
(),
null
,
String
.
class
,
false
,
null
,
null
,
false
);
}
return
props
;
}
...
...
plugins/org.jkiss.dbeaver.wmi/src/org/jkiss/dbeaver/ext/wmi/model/WMIPropertySource.java
浏览文件 @
779aa4e8
...
...
@@ -21,7 +21,7 @@ import org.jkiss.dbeaver.DBException;
import
org.jkiss.dbeaver.core.Log
;
import
org.jkiss.dbeaver.model.DBPPropertyDescriptor
;
import
org.jkiss.dbeaver.model.DBPPropertySource
;
import
org.jkiss.dbeaver.runtime.properties.PropertyDescriptor
Ex
;
import
org.jkiss.dbeaver.runtime.properties.PropertyDescriptor
;
import
org.jkiss.wmi.service.WMIException
;
import
org.jkiss.wmi.service.WMIQualifiedObject
;
import
org.jkiss.wmi.service.WMIQualifier
;
...
...
@@ -68,7 +68,7 @@ public abstract class WMIPropertySource implements DBPPropertySource
int
index
=
0
;
for
(
WMIQualifier
qualifier
:
qualifiers
)
{
String
name
=
qualifier
.
getName
();
PropertyDescriptor
Ex
prop
=
new
PropertyDescriptorEx
(
"WMI"
,
name
,
name
,
null
,
null
,
false
,
null
,
null
,
false
);
PropertyDescriptor
prop
=
new
PropertyDescriptor
(
"WMI"
,
name
,
name
,
null
,
null
,
false
,
null
,
null
,
false
);
result
[
index
++]
=
prop
;
}
return
result
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录