Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
suliangchun
dbeaver
提交
49a7946e
D
dbeaver
项目概览
suliangchun
/
dbeaver
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
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,发现更多精彩内容 >>
提交
49a7946e
编写于
4月 01, 2018
作者:
S
serge-rider
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Connection folder edit UI fix
上级
4a08539e
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
16 addition
and
7 deletion
+16
-7
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/dialogs/connection/ConnectionPageGeneral.java
.../dbeaver/ui/dialogs/connection/ConnectionPageGeneral.java
+16
-7
未找到文件。
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/dialogs/connection/ConnectionPageGeneral.java
浏览文件 @
49a7946e
...
@@ -77,7 +77,7 @@ class ConnectionPageGeneral extends ActiveWizardPage<ConnectionWizard> {
...
@@ -77,7 +77,7 @@ class ConnectionPageGeneral extends ActiveWizardPage<ConnectionWizard> {
private
DataSourceDescriptor
dataSourceDescriptor
;
private
DataSourceDescriptor
dataSourceDescriptor
;
private
Text
connectionNameText
;
private
Text
connectionNameText
;
private
CSmartCombo
<
DBPConnectionType
>
connectionTypeCombo
;
private
CSmartCombo
<
DBPConnectionType
>
connectionTypeCombo
;
private
C
SmartCombo
<
DBPDataSourceFolder
>
connectionFolderCombo
;
private
C
ombo
connectionFolderCombo
;
private
Button
savePasswordCheck
;
private
Button
savePasswordCheck
;
private
Button
autocommit
;
private
Button
autocommit
;
private
Combo
isolationLevel
;
private
Combo
isolationLevel
;
...
@@ -99,6 +99,7 @@ class ConnectionPageGeneral extends ActiveWizardPage<ConnectionWizard> {
...
@@ -99,6 +99,7 @@ class ConnectionPageGeneral extends ActiveWizardPage<ConnectionWizard> {
private
boolean
ignoreBootstrapErrors
;
private
boolean
ignoreBootstrapErrors
;
private
Text
descriptionText
;
private
Text
descriptionText
;
private
DBPDataSourceFolder
dataSourceFolder
;
private
DBPDataSourceFolder
dataSourceFolder
;
private
List
<
DBPDataSourceFolder
>
connectionFolders
=
new
ArrayList
<>();
private
static
class
FilterInfo
{
private
static
class
FilterInfo
{
final
Class
<?>
type
;
final
Class
<?>
type
;
...
@@ -196,7 +197,7 @@ class ConnectionPageGeneral extends ActiveWizardPage<ConnectionWizard> {
...
@@ -196,7 +197,7 @@ class ConnectionPageGeneral extends ActiveWizardPage<ConnectionWizard> {
if
(
dataSourceDescriptor
.
getFolder
()
==
null
)
{
if
(
dataSourceDescriptor
.
getFolder
()
==
null
)
{
connectionFolderCombo
.
select
(
0
);
connectionFolderCombo
.
select
(
0
);
}
else
{
}
else
{
connectionFolderCombo
.
select
(
dataSourceFolder
);
connectionFolderCombo
.
select
(
connectionFolders
.
indexOf
(
dataSourceFolder
)
);
}
}
savePasswordCheck
.
setSelection
(
dataSourceDescriptor
.
isSavePassword
());
savePasswordCheck
.
setSelection
(
dataSourceDescriptor
.
isSavePassword
());
autocommit
.
setSelection
(
dataSourceDescriptor
.
isDefaultAutoCommit
());
autocommit
.
setSelection
(
dataSourceDescriptor
.
isDefaultAutoCommit
());
...
@@ -249,7 +250,7 @@ class ConnectionPageGeneral extends ActiveWizardPage<ConnectionWizard> {
...
@@ -249,7 +250,7 @@ class ConnectionPageGeneral extends ActiveWizardPage<ConnectionWizard> {
connectionTypeCombo
.
select
(
0
);
connectionTypeCombo
.
select
(
0
);
autocommit
.
setSelection
((
connectionTypeCombo
.
getItem
(
0
)).
isAutocommit
());
autocommit
.
setSelection
((
connectionTypeCombo
.
getItem
(
0
)).
isAutocommit
());
if
(
dataSourceFolder
!=
null
)
{
if
(
dataSourceFolder
!=
null
)
{
connectionFolderCombo
.
select
(
dataSourceFolder
);
connectionFolderCombo
.
select
(
connectionFolders
.
indexOf
(
dataSourceFolder
)
);
}
else
{
}
else
{
connectionFolderCombo
.
select
(
0
);
connectionFolderCombo
.
select
(
0
);
}
}
...
@@ -360,13 +361,13 @@ class ConnectionPageGeneral extends ActiveWizardPage<ConnectionWizard> {
...
@@ -360,13 +361,13 @@ class ConnectionPageGeneral extends ActiveWizardPage<ConnectionWizard> {
{
{
UIUtils
.
createControlLabel
(
group
,
CoreMessages
.
dialog_connection_wizard_final_label_connection_folder
);
UIUtils
.
createControlLabel
(
group
,
CoreMessages
.
dialog_connection_wizard_final_label_connection_folder
);
connectionFolderCombo
=
new
C
SmartCombo
<>(
group
,
SWT
.
BORDER
|
SWT
.
DROP_DOWN
|
SWT
.
READ_ONLY
,
new
ConnectionFolderLabelProvider
()
);
connectionFolderCombo
=
new
C
ombo
(
group
,
SWT
.
BORDER
|
SWT
.
DROP_DOWN
|
SWT
.
READ_ONLY
);
//connectionFolderCombo.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
//connectionFolderCombo.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
loadConnectionFolders
();
loadConnectionFolders
();
connectionFolderCombo
.
addSelectionListener
(
new
SelectionAdapter
()
{
connectionFolderCombo
.
addSelectionListener
(
new
SelectionAdapter
()
{
@Override
@Override
public
void
widgetSelected
(
SelectionEvent
e
)
{
public
void
widgetSelected
(
SelectionEvent
e
)
{
dataSourceFolder
=
connectionFolder
Combo
.
getItem
(
connectionFolderCombo
.
getSelectionIndex
());
dataSourceFolder
=
connectionFolder
s
.
get
(
connectionFolderCombo
.
getSelectionIndex
());
}
}
});
});
}
}
...
@@ -540,14 +541,22 @@ class ConnectionPageGeneral extends ActiveWizardPage<ConnectionWizard> {
...
@@ -540,14 +541,22 @@ class ConnectionPageGeneral extends ActiveWizardPage<ConnectionWizard> {
private
void
loadConnectionFolders
()
private
void
loadConnectionFolders
()
{
{
connectionFolderCombo
.
removeAll
();
connectionFolderCombo
.
removeAll
();
connectionFolderCombo
.
addItem
(
null
);
connectionFolderCombo
.
add
(
CoreMessages
.
toolbar_datasource_selector_empty
);
connectionFolders
.
clear
();
connectionFolders
.
add
(
null
);
for
(
DBPDataSourceFolder
folder
:
getWizard
().
getDataSourceRegistry
().
getRootFolders
())
{
for
(
DBPDataSourceFolder
folder
:
getWizard
().
getDataSourceRegistry
().
getRootFolders
())
{
loadConnectionFolder
(
0
,
folder
);
loadConnectionFolder
(
0
,
folder
);
}
}
}
}
private
void
loadConnectionFolder
(
int
level
,
DBPDataSourceFolder
folder
)
{
private
void
loadConnectionFolder
(
int
level
,
DBPDataSourceFolder
folder
)
{
connectionFolderCombo
.
addItem
(
folder
);
String
prefix
=
""
;
for
(
int
i
=
0
;
i
<
level
;
i
++)
{
prefix
+=
" "
;
}
connectionFolders
.
add
(
folder
);
connectionFolderCombo
.
add
(
prefix
+
folder
.
getName
());
for
(
DBPDataSourceFolder
child
:
folder
.
getChildren
())
{
for
(
DBPDataSourceFolder
child
:
folder
.
getChildren
())
{
loadConnectionFolder
(
level
+
1
,
child
);
loadConnectionFolder
(
level
+
1
,
child
);
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录