Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
suliangchun
dbeaver
提交
b6d090c0
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,发现更多精彩内容 >>
提交
b6d090c0
编写于
4月 29, 2013
作者:
J
jurgen
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Find/replace fix (DDE action handler)
Former-commit-id:
b4984e93
上级
4f25dc5e
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
22 addition
and
19 deletion
+22
-19
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/controls/resultset/ResultSetFindReplaceTarget.java
...ver/ui/controls/resultset/ResultSetFindReplaceTarget.java
+6
-0
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/controls/resultset/ResultSetViewer.java
.../jkiss/dbeaver/ui/controls/resultset/ResultSetViewer.java
+6
-12
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/editors/data/DatabaseDataEditor.java
...org/jkiss/dbeaver/ui/editors/data/DatabaseDataEditor.java
+10
-7
未找到文件。
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/controls/resultset/ResultSetFindReplaceTarget.java
浏览文件 @
b6d090c0
...
...
@@ -226,4 +226,10 @@ class ResultSetFindReplaceTarget implements IFindReplaceTarget, IFindReplaceTarg
{
}
@Override
public
String
toString
()
{
return
"Target: "
+
resultSet
.
getDataContainer
().
getName
();
}
}
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/controls/resultset/ResultSetViewer.java
浏览文件 @
b6d090c0
...
...
@@ -53,8 +53,6 @@ import org.eclipse.ui.IWorkbenchPartSite;
import
org.eclipse.ui.commands.ICommandService
;
import
org.eclipse.ui.menus.CommandContributionItem
;
import
org.eclipse.ui.progress.UIJob
;
import
org.eclipse.ui.texteditor.FindReplaceAction
;
import
org.eclipse.ui.texteditor.ITextEditorActionConstants
;
import
org.eclipse.ui.themes.ITheme
;
import
org.eclipse.ui.themes.IThemeManager
;
import
org.eclipse.ui.views.properties.IPropertySheetPage
;
...
...
@@ -62,7 +60,6 @@ import org.eclipse.ui.views.properties.IPropertySource;
import
org.eclipse.ui.views.properties.IPropertySourceProvider
;
import
org.jkiss.dbeaver.DBException
;
import
org.jkiss.dbeaver.core.CoreMessages
;
import
org.jkiss.dbeaver.core.DBeaverActivator
;
import
org.jkiss.dbeaver.core.DBeaverCore
;
import
org.jkiss.dbeaver.core.DBeaverUI
;
import
org.jkiss.dbeaver.ext.IDataSourceProvider
;
...
...
@@ -640,7 +637,8 @@ public class ResultSetViewer extends Viewer implements IDataSourceProvider, ISpr
*/
toolBarManager
=
new
ToolBarManager
(
SWT
.
FLAT
|
SWT
.
HORIZONTAL
);
//toolBarManager.add(viewMessageAction);
// handle own commands
toolBarManager
.
add
(
ActionUtils
.
makeCommandContribution
(
site
,
ResultSetCommandHandler
.
CMD_APPLY_CHANGES
));
toolBarManager
.
add
(
ActionUtils
.
makeCommandContribution
(
site
,
ResultSetCommandHandler
.
CMD_REJECT_CHANGES
));
toolBarManager
.
add
(
new
Separator
());
...
...
@@ -654,15 +652,11 @@ public class ResultSetViewer extends Viewer implements IDataSourceProvider, ISpr
toolBarManager
.
add
(
ActionUtils
.
makeCommandContribution
(
site
,
ResultSetCommandHandler
.
CMD_ROW_NEXT
));
toolBarManager
.
add
(
ActionUtils
.
makeCommandContribution
(
site
,
ResultSetCommandHandler
.
CMD_ROW_LAST
));
toolBarManager
.
add
(
new
Separator
());
//toolBarManager.add(ActionUtils.makeCommandContribution(site, IWorkbenchCommandConstants.FILE_REFRESH, "Refresh result set", DBIcon.RS_REFRESH.getImageDescriptor()));
// Use simple action for refresh to avoid ambiguous behaviour of F5 shortcut
//toolBarManager.add(ActionUtils.makeCommandContribution(site, IWorkbenchCommandConstants.EDIT_FIND_AND_REPLACE, CommandContributionItem.STYLE_PUSH, DBIcon.FIND_TEXT.getImageDescriptor()));
FindReplaceAction
findReplaceAction
=
new
FindReplaceAction
(
DBeaverActivator
.
getResourceBundle
(),
"Editor.FindReplace."
,
site
.
getPart
());
//$NON-NLS-1$
findReplaceAction
.
setActionDefinitionId
(
IWorkbenchCommandConstants
.
EDIT_FIND_AND_REPLACE
);
findReplaceAction
.
setImageDescriptor
(
DBIcon
.
FIND_TEXT
.
getImageDescriptor
());
toolBarManager
.
add
(
findReplaceAction
);
// Link to standard Find/Replace action - it has to be handled by owner site
toolBarManager
.
add
(
ActionUtils
.
makeCommandContribution
(
site
,
IWorkbenchCommandConstants
.
EDIT_FIND_AND_REPLACE
,
CommandContributionItem
.
STYLE_PUSH
,
DBIcon
.
FIND_TEXT
.
getImageDescriptor
()));
// Use simple action for refresh to avoid ambiguous behaviour of F5 shortcut
//toolBarManager.add(ActionUtils.makeCommandContribution(site, IWorkbenchCommandConstants.FILE_REFRESH, "Refresh result set", DBIcon.RS_REFRESH.getImageDescriptor()));
Action
refreshAction
=
new
Action
(
CoreMessages
.
controls_resultset_viewer_action_refresh
,
DBIcon
.
RS_REFRESH
.
getImageDescriptor
())
{
@Override
public
void
run
()
...
...
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/editors/data/DatabaseDataEditor.java
浏览文件 @
b6d090c0
...
...
@@ -61,13 +61,6 @@ public class DatabaseDataEditor extends AbstractDatabaseObjectEditor<DBSDataCont
// Set selection provider from resultset
getSite
().
setSelectionProvider
(
resultSetView
);
// FindReplaceAction findReplaceAction = new FindReplaceAction(DBeaverActivator.getResourceBundle(), "Editor.FindReplace.", this); //$NON-NLS-1$
// findReplaceAction.setActionDefinitionId(IWorkbenchCommandConstants.EDIT_FIND_AND_REPLACE);
//
// IActionBars actionBars = getEditorSite().getActionBars();
// actionBars.setGlobalActionHandler(ActionFactory.FIND.getId(), findReplaceAction);
// actionBars.updateActionBars();
}
// FindReplaceAction action = (FindReplaceAction)getEditorSite().getActionBars().getGlobalActionHandler(ActionFactory.FIND.getId());
...
...
@@ -123,6 +116,16 @@ public class DatabaseDataEditor extends AbstractDatabaseObjectEditor<DBSDataCont
if
(
resultSetView
!=
null
)
{
resultSetView
.
getSpreadsheet
().
setFocus
();
}
// Register find/replace action
// We do it in setFocus because each entity editor registers it's own action - and they
// share a single action bars instance. To avoid mess just update handler every time editor activated
FindReplaceAction
findReplaceAction
=
new
FindReplaceAction
(
DBeaverActivator
.
getResourceBundle
(),
"Editor.FindReplace."
,
this
);
//$NON-NLS-1$
findReplaceAction
.
setActionDefinitionId
(
IWorkbenchCommandConstants
.
EDIT_FIND_AND_REPLACE
);
IActionBars
actionBars
=
getEditorSite
().
getActionBars
();
actionBars
.
setGlobalActionHandler
(
"dde_findReplace"
,
findReplaceAction
);
actionBars
.
updateActionBars
();
}
@Override
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录