Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
suliangchun
dbeaver
提交
0ccad43e
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,发现更多精彩内容 >>
未验证
提交
0ccad43e
编写于
4月 07, 2018
作者:
A
Alexander Fedorov
提交者:
GitHub
4月 07, 2018
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #3282 from dbeaver/3281-support-double-click-for-breakpoints
3281 support double click for breakpoints
上级
f30f402e
69ee2811
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
38 addition
and
7 deletion
+38
-7
plugins/org.jkiss.dbeaver.debug.ui/src/org/jkiss/dbeaver/debug/ui/DatabaseDebugModelPresentation.java
...kiss/dbeaver/debug/ui/DatabaseDebugModelPresentation.java
+37
-7
plugins/org.jkiss.dbeaver.ui/META-INF/MANIFEST.MF
plugins/org.jkiss.dbeaver.ui/META-INF/MANIFEST.MF
+1
-0
未找到文件。
plugins/org.jkiss.dbeaver.debug.ui/src/org/jkiss/dbeaver/debug/ui/DatabaseDebugModelPresentation.java
浏览文件 @
0ccad43e
...
...
@@ -33,8 +33,11 @@ import org.eclipse.osgi.util.NLS;
import
org.eclipse.swt.graphics.Image
;
import
org.eclipse.ui.IEditorInput
;
import
org.eclipse.ui.model.WorkbenchLabelProvider
;
import
org.jkiss.dbeaver.Log
;
import
org.jkiss.dbeaver.core.DBeaverCore
;
import
org.jkiss.dbeaver.debug.core.DebugCore
;
import
org.jkiss.dbeaver.debug.core.breakpoints.DatabaseLineBreakpoint
;
import
org.jkiss.dbeaver.debug.core.breakpoints.IDatabaseBreakpoint
;
import
org.jkiss.dbeaver.debug.core.model.DatabaseProcess
;
import
org.jkiss.dbeaver.debug.core.model.DatabaseStackFrame
;
import
org.jkiss.dbeaver.debug.core.model.DatabaseThread
;
...
...
@@ -42,10 +45,16 @@ import org.jkiss.dbeaver.debug.core.model.DatabaseVariable;
import
org.jkiss.dbeaver.debug.core.model.IDatabaseDebugTarget
;
import
org.jkiss.dbeaver.model.DBPScriptObject
;
import
org.jkiss.dbeaver.model.navigator.DBNDatabaseNode
;
import
org.jkiss.dbeaver.model.navigator.DBNModel
;
import
org.jkiss.dbeaver.model.navigator.DBNNode
;
import
org.jkiss.dbeaver.model.navigator.DBNRoot
;
import
org.jkiss.dbeaver.model.runtime.VoidProgressMonitor
;
import
org.jkiss.dbeaver.ui.editors.entity.EntityEditorInput
;
public
class
DatabaseDebugModelPresentation
extends
LabelProvider
implements
IDebugModelPresentationExtension
{
private
static
Log
log
=
Log
.
getLog
(
DatabaseDebugModelPresentation
.
class
);
private
final
Map
<
String
,
Object
>
attributes
=
new
HashMap
<>();
private
final
ILabelProvider
labelProvider
;
...
...
@@ -134,16 +143,37 @@ public class DatabaseDebugModelPresentation extends LabelProvider implements IDe
@Override
public
IEditorInput
getEditorInput
(
Object
element
)
{
if
(
element
instanceof
DBNDatabaseNode
)
{
DBNDatabaseNode
dbnNode
=
(
DBNDatabaseNode
)
element
;
DBNDatabaseNode
databaseNode
=
(
DBNDatabaseNode
)
element
;
return
createEditorInput
(
databaseNode
);
}
if
(
element
instanceof
IDatabaseBreakpoint
)
{
IDatabaseBreakpoint
breakpoint
=
(
IDatabaseBreakpoint
)
element
;
try
{
String
nodePath
=
breakpoint
.
getNodePath
();
DBNModel
navigatorModel
=
DBeaverCore
.
getInstance
().
getNavigatorModel
();
DBNNode
node
=
navigatorModel
.
getNodeByPath
(
new
VoidProgressMonitor
(),
nodePath
);
if
(
node
instanceof
DBNDatabaseNode
)
{
DBNDatabaseNode
databaseNode
=
(
DBNDatabaseNode
)
node
;
return
createEditorInput
(
databaseNode
);
}
}
catch
(
Exception
e
)
{
String
message
=
NLS
.
bind
(
"Unable to resolve editor input for breakpoint {0}"
,
breakpoint
);
log
.
error
(
message
,
e
);
}
}
return
null
;
}
protected
IEditorInput
createEditorInput
(
DBNDatabaseNode
dbnNode
)
{
EntityEditorInput
editorInput
=
new
EntityEditorInput
(
dbnNode
);
editorInput
.
setAttribute
(
DBPScriptObject
.
OPTION_DEBUGGER_SOURCE
,
Boolean
.
TRUE
);
// FIXME:AF: how to retrieve it? probably org.jkiss.dbeaver.databaseor and EntityEditorsRegistry can help
// FIXME:AF: how to retrieve it? probably org.jkiss.dbeaver.databaseor and EntityEditorsRegistry can help
// String folderId = "postgresql.source.view";
// editorInput.setDefaultFolderId(folderId);
return
editorInput
;
}
return
null
;
}
@Override
public
String
getEditorId
(
IEditorInput
input
,
Object
element
)
{
...
...
plugins/org.jkiss.dbeaver.ui/META-INF/MANIFEST.MF
浏览文件 @
0ccad43e
...
...
@@ -16,6 +16,7 @@ Require-Bundle: org.eclipse.core.runtime,
org.eclipse.ui.views,
org.eclipse.ui.workbench.texteditor,
org.eclipse.mylyn.commons.ui,
org.eclipse.mylyn.commons.workbench,
org.eclipse.mylyn.commons.notifications.core,
org.eclipse.mylyn.commons.notifications.ui,
org.jkiss.dbeaver.model
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录