Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
suliangchun
dbeaver
提交
c1e90bab
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,发现更多精彩内容 >>
提交
c1e90bab
编写于
5月 06, 2018
作者:
S
serge-rider
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
#178 QM view refresh
上级
1ce39b77
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
54 addition
and
16 deletion
+54
-16
plugins/org.jkiss.dbeaver.core/OSGI-INF/l10n/bundle.properties
...ns/org.jkiss.dbeaver.core/OSGI-INF/l10n/bundle.properties
+2
-0
plugins/org.jkiss.dbeaver.core/plugin.xml
plugins/org.jkiss.dbeaver.core/plugin.xml
+18
-6
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/controls/querylog/QueryLogCommandHandler.java
.../dbeaver/ui/controls/querylog/QueryLogCommandHandler.java
+13
-10
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/controls/querylog/QueryLogViewer.java
...rg/jkiss/dbeaver/ui/controls/querylog/QueryLogViewer.java
+21
-0
未找到文件。
plugins/org.jkiss.dbeaver.core/OSGI-INF/l10n/bundle.properties
浏览文件 @
c1e90bab
...
...
@@ -301,6 +301,8 @@ command.org.jkiss.dbeaver.core.qm.filter.name=Filters ...
command.org.jkiss.dbeaver.core.qm.filter.description
=
Set query manager filter
command.org.jkiss.dbeaver.core.qm.clear.name
=
Clear log
command.org.jkiss.dbeaver.core.qm.clear.description
=
Clear query manager log
command.org.jkiss.dbeaver.core.qm.refresh.name
=
Refresh query history
command.org.jkiss.dbeaver.core.qm.refresh.description
=
Refresh query history
command.org.jkiss.dbeaver.core.process.stop.name
=
Terminate process
command.org.jkiss.dbeaver.core.process.stop.description
=
Terminates running process
...
...
plugins/org.jkiss.dbeaver.core/plugin.xml
浏览文件 @
c1e90bab
...
...
@@ -544,6 +544,7 @@
</with>
</activeWhen>
</handler>
<handler
commandId=
"org.jkiss.dbeaver.core.export.data"
class=
"org.jkiss.dbeaver.tools.transfer.handlers.DataExportHandler"
>
<enabledWhen>
<with
variable=
"selection"
>
...
...
@@ -1678,6 +1679,9 @@
<!-- Query log control handlers -->
<handler
commandId=
"org.eclipse.ui.file.refresh"
class=
"org.jkiss.dbeaver.ui.controls.querylog.QueryLogCommandHandler"
>
<activeWhen><reference
definitionId=
"org.jkiss.dbeaver.core.ui.querylog.control"
/></activeWhen>
</handler>
<handler
commandId=
"org.eclipse.ui.edit.selectAll"
class=
"org.jkiss.dbeaver.ui.controls.querylog.QueryLogCommandHandler"
>
<activeWhen><reference
definitionId=
"org.jkiss.dbeaver.core.ui.querylog.control"
/></activeWhen>
</handler>
...
...
@@ -2416,13 +2420,17 @@
<menuContribution
allPopups=
"false"
locationURI=
"menu:org.jkiss.dbeaver.core.queryManager"
>
<command
commandId=
"org.jkiss.dbeaver.core.qm.filter"
label=
"%command.org.jkiss.dbeaver.core.qm.filter.name"
tooltip=
"%command.org.jkiss.dbeaver.core.qm.filter.description"
/>
commandId=
"org.jkiss.dbeaver.core.qm.filter"
label=
"%command.org.jkiss.dbeaver.core.qm.filter.name"
tooltip=
"%command.org.jkiss.dbeaver.core.qm.filter.description"
/>
<command
commandId=
"org.jkiss.dbeaver.core.qm.clear"
label=
"%command.org.jkiss.dbeaver.core.qm.clear.name"
tooltip=
"%command.org.jkiss.dbeaver.core.qm.clear.description"
/>
commandId=
"org.jkiss.dbeaver.core.qm.clear"
label=
"%command.org.jkiss.dbeaver.core.qm.clear.name"
tooltip=
"%command.org.jkiss.dbeaver.core.qm.clear.description"
/>
<command
commandId=
"org.eclipse.ui.file.refresh"
label=
"%command.org.jkiss.dbeaver.core.qm.refresh.name"
tooltip=
"%command.org.jkiss.dbeaver.core.qm.refresh.description"
/>
<separator
name=
"additions"
visible=
"true"
/>
</menuContribution>
...
...
@@ -2435,6 +2443,10 @@
commandId=
"org.jkiss.dbeaver.core.qm.clear"
label=
"%command.org.jkiss.dbeaver.core.qm.clear.name"
tooltip=
"%command.org.jkiss.dbeaver.core.qm.clear.description"
/>
<command
commandId=
"org.eclipse.ui.file.refresh"
label=
"%command.org.jkiss.dbeaver.core.qm.refresh.name"
tooltip=
"%command.org.jkiss.dbeaver.core.qm.refresh.description"
/>
<separator
name=
"additions"
visible=
"true"
/>
</menuContribution>
...
...
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/controls/querylog/QueryLogCommandHandler.java
浏览文件 @
c1e90bab
...
...
@@ -51,16 +51,19 @@ public class QueryLogCommandHandler extends AbstractHandler {
}
String
actionId
=
event
.
getCommand
().
getId
();
if
(
actionId
.
equals
(
IWorkbenchCommandConstants
.
EDIT_SELECT_ALL
))
{
logViewer
.
selectAll
();
return
null
;
}
if
(
actionId
.
equals
(
IWorkbenchCommandConstants
.
EDIT_COPY
))
{
logViewer
.
copySelectionToClipboard
(
false
);
return
null
;
}
else
if
(
actionId
.
equals
(
CoreCommands
.
CMD_COPY_SPECIAL
))
{
logViewer
.
copySelectionToClipboard
(
true
);
return
null
;
switch
(
actionId
)
{
case
IWorkbenchCommandConstants
.
EDIT_SELECT_ALL
:
logViewer
.
selectAll
();
return
null
;
case
IWorkbenchCommandConstants
.
EDIT_COPY
:
logViewer
.
copySelectionToClipboard
(
false
);
return
null
;
case
CoreCommands
.
CMD_COPY_SPECIAL
:
logViewer
.
copySelectionToClipboard
(
true
);
return
null
;
case
IWorkbenchCommandConstants
.
FILE_REFRESH
:
logViewer
.
refresh
();
return
null
;
}
return
null
;
}
...
...
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/controls/querylog/QueryLogViewer.java
浏览文件 @
c1e90bab
...
...
@@ -90,6 +90,7 @@ public class QueryLogViewer extends Viewer implements QMMetaListener, DBPPrefere
public
static
final
String
COLOR_COMMITTED
=
"org.jkiss.dbeaver.txn.color.committed.background"
;
//= new RGB(0xBD, 0xFE, 0xBF);
public
static
final
String
COLOR_REVERTED
=
"org.jkiss.dbeaver.txn.color.reverted.background"
;
// = new RGB(0xFF, 0x63, 0x47);
public
static
final
String
COLOR_TRANSACTION
=
"org.jkiss.dbeaver.txn.color.transaction.background"
;
// = new RGB(0xFF, 0xE4, 0xB5);
private
final
Text
searchText
;
private
static
abstract
class
LogColumn
{
private
final
String
id
;
...
...
@@ -317,7 +318,9 @@ public class QueryLogViewer extends Viewer implements QMMetaListener, DBPPrefere
private
final
Color
colorLightGreen
;
private
final
Color
colorLightRed
;
private
final
Color
colorLightYellow
;
private
final
Color
shadowColor
;
private
final
Font
boldFont
;
private
final
Font
hintFont
;
private
DragSource
dndSource
;
...
...
@@ -336,9 +339,25 @@ public class QueryLogViewer extends Viewer implements QMMetaListener, DBPPrefere
colorLightGreen
=
colorRegistry
.
get
(
COLOR_COMMITTED
);
colorLightRed
=
colorRegistry
.
get
(
COLOR_REVERTED
);
colorLightYellow
=
colorRegistry
.
get
(
COLOR_TRANSACTION
);
shadowColor
=
parent
.
getDisplay
().
getSystemColor
(
SWT
.
COLOR_WIDGET_NORMAL_SHADOW
);
boldFont
=
UIUtils
.
makeBoldFont
(
parent
.
getFont
());
hintFont
=
UIUtils
.
modifyFont
(
parent
.
getFont
(),
SWT
.
ITALIC
);
boolean
inDialog
=
UIUtils
.
isInDialog
(
parent
);
// Search field
this
.
searchText
=
new
Text
(
parent
,
SWT
.
BORDER
);
this
.
searchText
.
setLayoutData
(
new
GridData
(
GridData
.
FILL_HORIZONTAL
));
this
.
searchText
.
addPaintListener
(
e
->
{
if
(
searchText
.
isEnabled
()
&&
searchText
.
getCharCount
()
==
0
)
{
e
.
gc
.
setForeground
(
shadowColor
);
e
.
gc
.
setFont
(
hintFont
);
e
.
gc
.
drawText
(
"Type query part to search in query history"
,
2
,
0
,
true
);
e
.
gc
.
setFont
(
null
);
}
});
// Create log table
logTable
=
new
Table
(
parent
,
...
...
@@ -452,6 +471,7 @@ public class QueryLogViewer extends Viewer implements QMMetaListener, DBPPrefere
UIUtils
.
dispose
(
dndSource
);
UIUtils
.
dispose
(
logTable
);
UIUtils
.
dispose
(
boldFont
);
UIUtils
.
dispose
(
hintFont
);
}
@Override
...
...
@@ -759,6 +779,7 @@ public class QueryLogViewer extends Viewer implements QMMetaListener, DBPPrefere
manager
.
add
(
copyAllAction
);
manager
.
add
(
selectAllAction
);
manager
.
add
(
clearLogAction
);
manager
.
add
(
ActionUtils
.
makeCommandContribution
(
site
,
IWorkbenchCommandConstants
.
FILE_REFRESH
));
//manager.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS));
});
menuMgr
.
setRemoveAllWhenShown
(
true
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录