Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
suliangchun
dbeaver
提交
e15d561e
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,发现更多精彩内容 >>
提交
e15d561e
编写于
5月 26, 2015
作者:
J
jurgen
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
DataSource properties redesign
上级
4e71eb08
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
38 addition
and
7 deletion
+38
-7
plugins/org.jkiss.dbeaver.core/plugin.properties
plugins/org.jkiss.dbeaver.core/plugin.properties
+1
-0
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/registry/DataSourceDescriptor.java
.../src/org/jkiss/dbeaver/registry/DataSourceDescriptor.java
+37
-7
未找到文件。
plugins/org.jkiss.dbeaver.core/plugin.properties
浏览文件 @
e15d561e
...
...
@@ -279,6 +279,7 @@ meta.org.jkiss.dbeaver.registry.DataSourceDescriptor.propertyServerName.name=Ser
meta.org.jkiss.dbeaver.registry.DataSourceDescriptor.propertyDriver.name
=
Driver
meta.org.jkiss.dbeaver.registry.DataSourceDescriptor.propertyConnectTime.name
=
Connect Time
meta.org.jkiss.dbeaver.registry.DataSourceDescriptor.propertyConnectType.name
=
Connect Type
meta.org.jkiss.dbeaver.registry.DataSourceDescriptor$
ContextInfo.name.name
=
Context Name
meta.org.jkiss.dbeaver.registry.DriverDescriptor.category.name
=
Driver Category
meta.org.jkiss.dbeaver.registry.DriverDescriptor.name.name
=
Driver Name
meta.org.jkiss.dbeaver.registry.DriverDescriptor.description.name
=
Description
...
...
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/registry/DataSourceDescriptor.java
浏览文件 @
e15d561e
...
...
@@ -23,6 +23,7 @@ import org.eclipse.jface.dialogs.IDialogConstants;
import
org.eclipse.swt.graphics.Image
;
import
org.eclipse.ui.ISaveablePart
;
import
org.eclipse.ui.IWorkbenchWindow
;
import
org.eclipse.ui.views.properties.IPropertySource
;
import
org.jkiss.code.NotNull
;
import
org.jkiss.code.Nullable
;
import
org.jkiss.dbeaver.DBException
;
...
...
@@ -56,6 +57,7 @@ import org.jkiss.dbeaver.ui.actions.DataSourcePropertyTester;
import
org.jkiss.dbeaver.ui.dialogs.ConfirmationDialog
;
import
org.jkiss.dbeaver.ui.dialogs.connection.EditConnectionDialog
;
import
org.jkiss.dbeaver.ui.dialogs.connection.EditConnectionWizard
;
import
org.jkiss.dbeaver.ui.properties.PropertyCollector
;
import
org.jkiss.dbeaver.utils.AbstractPreferenceStore
;
import
org.jkiss.utils.CommonUtils
;
...
...
@@ -249,7 +251,6 @@ public class DataSourceDescriptor
@Nullable
@Override
@Property
(
order
=
100
)
public
String
getDescription
()
{
return
description
;
...
...
@@ -1011,6 +1012,17 @@ public class DataSourceDescriptor
{
if
(
DBSDataSourceContainer
.
class
.
isAssignableFrom
(
adapter
))
{
return
this
;
}
else
if
(
adapter
==
IPropertySource
.
class
)
{
PropertyCollector
coll
=
new
PropertyCollector
(
this
,
true
);
coll
.
collectProperties
();
if
(
dataSource
!=
null
)
{
int
conIndex
=
0
;
for
(
DBCExecutionContext
context
:
dataSource
.
getAllContexts
())
{
conIndex
++;
coll
.
addProperty
(
"Connections"
,
conIndex
,
String
.
valueOf
(
conIndex
),
new
ContextInfo
(
context
));
}
}
return
coll
;
}
return
null
;
}
...
...
@@ -1051,13 +1063,13 @@ public class DataSourceDescriptor
DataSourcePropertyTester
.
firePropertyChange
(
DataSourcePropertyTester
.
PROP_TRANSACTIONAL
);
}
@Property
(
viewable
=
true
,
order
=
2
)
@Property
(
viewable
=
true
,
order
=
2
,
category
=
"Driver"
)
public
String
getPropertyDriverType
()
{
return
driver
.
getName
();
}
@Property
(
order
=
3
)
@Property
(
order
=
3
,
category
=
"Server"
)
public
String
getPropertyAddress
()
{
StringBuilder
addr
=
new
StringBuilder
();
...
...
@@ -1070,20 +1082,20 @@ public class DataSourceDescriptor
return
addr
.
toString
();
}
@Property
(
order
=
4
)
@Property
(
order
=
4
,
category
=
"Server"
)
public
String
getPropertyDatabase
()
{
return
connectionInfo
.
getDatabaseName
();
}
@Property
(
order
=
5
)
@Property
(
order
=
5
,
category
=
"Server"
)
public
String
getPropertyURL
()
{
return
connectionInfo
.
getUrl
();
}
@Nullable
@Property
(
order
=
6
)
@Property
(
order
=
6
,
category
=
"Server"
)
public
String
getPropertyServerName
()
{
if
(
dataSource
!=
null
)
{
...
...
@@ -1097,7 +1109,7 @@ public class DataSourceDescriptor
}
@Nullable
@Property
(
order
=
7
)
@Property
(
order
=
7
,
category
=
"Driver"
)
public
String
getPropertyDriver
()
{
if
(
dataSource
!=
null
)
{
...
...
@@ -1204,4 +1216,22 @@ public class DataSourceDescriptor
}
}
public
static
class
ContextInfo
implements
DBPObject
{
private
final
DBCExecutionContext
context
;
public
ContextInfo
(
DBCExecutionContext
context
)
{
this
.
context
=
context
;
}
@Property
(
viewable
=
true
,
order
=
1
)
public
String
getName
()
{
return
context
.
getContextName
();
}
@Override
public
String
toString
()
{
return
getName
();
}
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录