Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
一剑流云
dbeaver
提交
55dc55fc
D
dbeaver
项目概览
一剑流云
/
dbeaver
与 Fork 源项目一致
从无法访问的项目Fork
通知
6
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,发现更多精彩内容 >>
提交
55dc55fc
编写于
3月 22, 2021
作者:
S
Serge Rider
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Search page UI fix
上级
beabee36
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
14 addition
and
35 deletion
+14
-35
plugins/org.jkiss.dbeaver.ui.search/src/org/jkiss/dbeaver/ui/search/data/SearchDataPage.java
.../src/org/jkiss/dbeaver/ui/search/data/SearchDataPage.java
+5
-12
plugins/org.jkiss.dbeaver.ui.search/src/org/jkiss/dbeaver/ui/search/metadata/SearchMetadataPage.java
.../jkiss/dbeaver/ui/search/metadata/SearchMetadataPage.java
+6
-20
plugins/org.jkiss.dbeaver.ui/src/org/jkiss/dbeaver/ui/UIUtils.java
...rg.jkiss.dbeaver.ui/src/org/jkiss/dbeaver/ui/UIUtils.java
+3
-3
未找到文件。
plugins/org.jkiss.dbeaver.ui.search/src/org/jkiss/dbeaver/ui/search/data/SearchDataPage.java
浏览文件 @
55dc55fc
...
...
@@ -23,7 +23,6 @@ import org.eclipse.swt.custom.SashForm;
import
org.eclipse.swt.events.SelectionAdapter
;
import
org.eclipse.swt.events.SelectionEvent
;
import
org.eclipse.swt.layout.GridData
;
import
org.eclipse.swt.layout.GridLayout
;
import
org.eclipse.swt.widgets.*
;
import
org.jkiss.dbeaver.DBException
;
import
org.jkiss.dbeaver.model.navigator.DBNDatabaseNode
;
...
...
@@ -75,13 +74,13 @@ public class SearchDataPage extends AbstractSearchPage {
super
.
createControl
(
parent
);
initializeDialogUnits
(
parent
);
Composite
searchGroup
=
new
Composite
(
parent
,
SWT
.
NONE
);
Composite
searchGroup
=
UIUtils
.
createComposite
(
parent
,
1
);
searchGroup
.
setLayoutData
(
new
GridData
(
GridData
.
FILL_BOTH
));
searchGroup
.
setLayout
(
new
GridLayout
(
3
,
false
));
setControl
(
searchGroup
);
UIUtils
.
createControlLabel
(
searchGroup
,
"String"
);
searchText
=
new
Combo
(
searchGroup
,
SWT
.
DROP_DOWN
);
searchText
.
setLayoutData
(
new
GridData
(
GridData
.
FILL_HORIZONTAL
));
UIUtils
.
addEmptyTextHint
(
searchText
,
combo
->
"String to search"
);
if
(
params
.
searchString
!=
null
)
{
searchText
.
setText
(
params
.
searchString
);
}
...
...
@@ -93,14 +92,8 @@ public class SearchDataPage extends AbstractSearchPage {
updateEnablement
();
});
Composite
optionsGroup
=
new
SashForm
(
searchGroup
,
SWT
.
NONE
);
GridLayout
layout
=
new
GridLayout
(
2
,
true
);
layout
.
marginHeight
=
0
;
layout
.
marginWidth
=
0
;
optionsGroup
.
setLayout
(
layout
);
GridData
gd
=
new
GridData
(
GridData
.
FILL_BOTH
);
gd
.
horizontalSpan
=
3
;
optionsGroup
.
setLayoutData
(
gd
);
SashForm
optionsGroup
=
new
SashForm
(
searchGroup
,
SWT
.
NONE
);
optionsGroup
.
setLayoutData
(
new
GridData
(
GridData
.
FILL_BOTH
));
{
Group
databasesGroup
=
UIUtils
.
createControlGroup
(
optionsGroup
,
"Databases"
,
1
,
GridData
.
FILL_BOTH
,
0
);
...
...
plugins/org.jkiss.dbeaver.ui.search/src/org/jkiss/dbeaver/ui/search/metadata/SearchMetadataPage.java
浏览文件 @
55dc55fc
...
...
@@ -27,7 +27,6 @@ import org.eclipse.swt.events.MouseEvent;
import
org.eclipse.swt.events.SelectionAdapter
;
import
org.eclipse.swt.events.SelectionEvent
;
import
org.eclipse.swt.layout.GridData
;
import
org.eclipse.swt.layout.GridLayout
;
import
org.eclipse.swt.widgets.*
;
import
org.jkiss.dbeaver.DBException
;
import
org.jkiss.dbeaver.model.DBPDataSource
;
...
...
@@ -87,13 +86,13 @@ public class SearchMetadataPage extends AbstractSearchPage {
initializeDialogUnits
(
parent
);
Composite
searchGroup
=
new
Composite
(
parent
,
SWT
.
NONE
);
Composite
searchGroup
=
UIUtils
.
createComposite
(
parent
,
1
);
searchGroup
.
setLayoutData
(
new
GridData
(
GridData
.
FILL_BOTH
));
searchGroup
.
setLayout
(
new
GridLayout
(
3
,
false
));
setControl
(
searchGroup
);
UIUtils
.
createControlLabel
(
searchGroup
,
UISearchMessages
.
dialog_search_objects_label_object_name
);
searchText
=
new
Combo
(
searchGroup
,
SWT
.
DROP_DOWN
);
searchText
.
setLayoutData
(
new
GridData
(
GridData
.
FILL_HORIZONTAL
));
UIUtils
.
addEmptyTextHint
(
searchText
,
combo
->
UISearchMessages
.
dialog_search_objects_label_object_name
);
if
(
nameMask
!=
null
)
{
searchText
.
setText
(
nameMask
);
}
...
...
@@ -105,25 +104,16 @@ public class SearchMetadataPage extends AbstractSearchPage {
updateEnablement
();
});
Composite
optionsGroup
=
new
SashForm
(
searchGroup
,
SWT
.
NONE
);
GridLayout
layout
=
new
GridLayout
(
2
,
true
);
layout
.
marginHeight
=
0
;
layout
.
marginWidth
=
0
;
optionsGroup
.
setLayout
(
layout
);
GridData
gd
=
new
GridData
(
GridData
.
FILL_BOTH
);
gd
.
horizontalSpan
=
3
;
optionsGroup
.
setLayoutData
(
gd
);
Composite
optionsGroup
=
new
SashForm
(
searchGroup
,
2
);
optionsGroup
.
setLayoutData
(
new
GridData
(
GridData
.
FILL_BOTH
));
{
Group
sourceGroup
=
UIUtils
.
createControlGroup
(
optionsGroup
,
UISearchMessages
.
dialog_search_objects_group_objects_source
,
1
,
GridData
.
FILL_BOTH
,
0
);
gd
=
new
GridData
(
GridData
.
FILL_BOTH
);
//gd.heightHint = 300;
sourceGroup
.
setLayoutData
(
gd
);
DBPPlatform
platform
=
DBWorkbench
.
getPlatform
();
final
DBNProject
projectNode
=
platform
.
getNavigatorModel
().
getRoot
().
getProjectNode
(
currentProject
);
DBNNode
rootNode
=
projectNode
==
null
?
platform
.
getNavigatorModel
().
getRoot
()
:
projectNode
.
getDatabases
();
dataSourceTree
=
new
DatabaseNavigatorTree
(
sourceGroup
,
rootNode
,
SWT
.
SINGLE
);
gd
=
new
GridData
(
GridData
.
FILL_BOTH
);
GridData
gd
=
new
GridData
(
GridData
.
FILL_BOTH
);
gd
.
heightHint
=
300
;
dataSourceTree
.
setLayoutData
(
gd
);
...
...
@@ -185,10 +175,6 @@ public class SearchMetadataPage extends AbstractSearchPage {
{
Group
settingsGroup
=
UIUtils
.
createControlGroup
(
optionsGroup
,
"Settings"
,
2
,
GridData
.
FILL_BOTH
,
0
);
gd
=
new
GridData
(
GridData
.
FILL_BOTH
);
gd
.
heightHint
=
300
;
settingsGroup
.
setLayoutData
(
gd
);
{
//new Label(searchGroup, SWT.NONE);
...
...
plugins/org.jkiss.dbeaver.ui/src/org/jkiss/dbeaver/ui/UIUtils.java
浏览文件 @
55dc55fc
...
...
@@ -2009,9 +2009,9 @@ public class UIUtils {
}
private
static
boolean
isEmptyTextControl
(
Control
control
)
{
return
control
instanceof
Text
?
(
(
Text
)
control
).
getCharCount
()
==
0
:
control
instanceof
StyledText
&&
((
StyledText
)
control
).
getCharCount
()
==
0
;
return
(
control
instanceof
Text
&&
((
Text
)
control
).
getCharCount
()
==
0
)
||
(
control
instanceof
StyledText
&&
((
StyledText
)
control
).
getCharCount
()
==
0
)
||
(
control
instanceof
Combo
&&
((
Combo
)
control
).
getText
().
isEmpty
())
;
}
public
static
void
expandAll
(
AbstractTreeViewer
treeViewer
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录