Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
suliangchun
dbeaver
提交
cab0f979
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,发现更多精彩内容 >>
提交
cab0f979
编写于
3月 14, 2018
作者:
S
serge-rider
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Driver management fix
上级
0f71a680
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
21 addition
and
27 deletion
+21
-27
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/dialogs/driver/DriverEditDialog.java
...org/jkiss/dbeaver/ui/dialogs/driver/DriverEditDialog.java
+14
-9
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/dialogs/driver/DriverTreeControl.java
...rg/jkiss/dbeaver/ui/dialogs/driver/DriverTreeControl.java
+3
-1
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/dialogs/driver/DriverTreeViewer.java
...org/jkiss/dbeaver/ui/dialogs/driver/DriverTreeViewer.java
+4
-17
未找到文件。
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/dialogs/driver/DriverEditDialog.java
浏览文件 @
cab0f979
...
...
@@ -186,13 +186,6 @@ public class DriverEditDialog extends HelpEnabledDialog {
Group
propsGroup
=
UIUtils
.
createControlGroup
(
group
,
CoreMessages
.
dialog_edit_driver_setting
,
4
,
-
1
,
-
1
);
propsGroup
.
setLayoutData
(
new
GridData
(
GridData
.
FILL_HORIZONTAL
));
if
(!
newDriver
)
{
gd
=
new
GridData
(
GridData
.
HORIZONTAL_ALIGN_BEGINNING
);
gd
.
horizontalSpan
=
3
;
Text
idText
=
UIUtils
.
createLabelText
(
propsGroup
,
"ID"
,
driver
.
getId
(),
SWT
.
BORDER
|
SWT
.
READ_ONLY
,
gd
);
idText
.
setToolTipText
(
"Internal driver ID.\nCan be used in connections configurations and CLI commands."
);
}
gd
=
new
GridData
(
GridData
.
FILL_HORIZONTAL
);
driverNameText
=
UIUtils
.
createLabelText
(
propsGroup
,
CoreMessages
.
dialog_edit_driver_label_driver_name
+
"*"
,
driver
.
getName
(),
SWT
.
BORDER
|
advStyle
,
gd
);
driverNameText
.
addModifyListener
(
new
ModifyListener
()
{
...
...
@@ -269,7 +262,7 @@ public class DriverEditDialog extends HelpEnabledDialog {
}
{
Group
infoGroup
=
UIUtils
.
createControlGroup
(
group
,
CoreMessages
.
dialog_edit_driver_description
,
2
,
-
1
,
-
1
);
Group
infoGroup
=
UIUtils
.
createControlGroup
(
group
,
CoreMessages
.
dialog_edit_driver_description
,
4
,
-
1
,
-
1
);
infoGroup
.
setLayoutData
(
new
GridData
(
GridData
.
FILL_HORIZONTAL
));
driverCategoryCombo
=
UIUtils
.
createLabelCombo
(
infoGroup
,
CoreMessages
.
dialog_edit_driver_label_category
,
SWT
.
BORDER
|
SWT
.
DROP_DOWN
|
advStyle
);
...
...
@@ -295,7 +288,16 @@ public class DriverEditDialog extends HelpEnabledDialog {
driverCategoryCombo
.
setText
(
defaultCategory
);
}
{
gd
=
new
GridData
(
GridData
.
FILL_HORIZONTAL
|
GridData
.
HORIZONTAL_ALIGN_BEGINNING
);
Text
idText
=
UIUtils
.
createLabelText
(
infoGroup
,
"ID"
,
driver
.
getId
(),
SWT
.
BORDER
|
SWT
.
READ_ONLY
,
gd
);
idText
.
setToolTipText
(
"Internal driver ID.\nCan be used in connections configurations and CLI commands."
);
}
driverDescText
=
UIUtils
.
createLabelText
(
infoGroup
,
CoreMessages
.
dialog_edit_driver_label_description
,
CommonUtils
.
notEmpty
(
driver
.
getDescription
()),
SWT
.
BORDER
|
advStyle
);
gd
=
new
GridData
(
GridData
.
FILL_HORIZONTAL
);
gd
.
horizontalSpan
=
3
;
driverDescText
.
setLayoutData
(
gd
);
if
(!
CommonUtils
.
isEmpty
(
driver
.
getWebURL
()))
{
UIUtils
.
createControlLabel
(
infoGroup
,
CoreMessages
.
dialog_edit_driver_label_website
);
...
...
@@ -305,7 +307,10 @@ public class DriverEditDialog extends HelpEnabledDialog {
UIUtils
.
launchProgram
(
driver
.
getWebURL
());
}
});
urlLabel
.
setLayoutData
(
new
GridData
(
GridData
.
FILL_HORIZONTAL
));
gd
=
new
GridData
(
GridData
.
FILL_HORIZONTAL
);
gd
.
horizontalSpan
=
3
;
driverDescText
.
setLayoutData
(
gd
);
urlLabel
.
setLayoutData
(
gd
);
}
}
...
...
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/dialogs/driver/DriverTreeControl.java
浏览文件 @
cab0f979
...
...
@@ -24,6 +24,7 @@ import org.eclipse.swt.SWT;
import
org.eclipse.swt.widgets.Composite
;
import
org.eclipse.ui.dialogs.FilteredTree
;
import
org.eclipse.ui.dialogs.PatternFilter
;
import
org.jkiss.dbeaver.core.DBeaverUI
;
import
org.jkiss.dbeaver.registry.DataSourceProviderDescriptor
;
import
java.util.List
;
...
...
@@ -56,7 +57,8 @@ public class DriverTreeControl extends FilteredTree {
Object
[]
initData
=
(
Object
[])
getParent
().
getData
(
DRIVER_INIT_DATA
);
parent
.
setData
(
DRIVER_INIT_DATA
,
null
);
DriverTreeViewer
viewer
=
new
DriverTreeViewer
(
parent
,
style
);
viewer
.
initDrivers
(
initData
[
0
],
(
List
<
DataSourceProviderDescriptor
>)
initData
[
1
],
(
Boolean
)
initData
[
2
]);
DBeaverUI
.
asyncExec
(()
->
viewer
.
initDrivers
(
initData
[
0
],
(
List
<
DataSourceProviderDescriptor
>)
initData
[
1
],
(
Boolean
)
initData
[
2
]));
return
viewer
;
}
...
...
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/dialogs/driver/DriverTreeViewer.java
浏览文件 @
cab0f979
...
...
@@ -154,22 +154,7 @@ public class DriverTreeViewer extends TreeViewer implements ISelectionChangedLis
Collection
<
Object
>
drivers
=
collectDrivers
();
this
.
setInput
(
drivers
);
this
.
expandAll
();
getTree
().
addListener
(
SWT
.
Resize
,
new
Listener
()
{
volatile
boolean
resizing
=
false
;
@Override
public
void
handleEvent
(
Event
event
)
{
if
(
resizing
)
{
return
;
}
resizing
=
true
;
try
{
UIUtils
.
packColumns
(
getTree
(),
true
,
new
float
[]
{
0.9f
,
0.1f
});
}
finally
{
resizing
=
false
;
}
}
});
UIUtils
.
packColumns
(
getTree
(),
true
,
new
float
[]
{
0.9f
,
0.1f
});
if
(
expandRecent
)
{
// Expand used driver categories
...
...
@@ -188,7 +173,9 @@ public class DriverTreeViewer extends TreeViewer implements ISelectionChangedLis
@Override
public
void
refresh
()
{
collectDrivers
();
if
(
providers
!=
null
)
{
collectDrivers
();
}
super
.
refresh
();
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录