JPDA 架构研究21 - JDI的Debugger的UI部分

简介:

引入:

前面揭示了JDI的Debugger如何建立连接,发送和处理请求,这里我们专注于人机交互部分,Debugger的UI,它主要负责如何把人发出的操作转为请求,以及把请求操作反映在调试器的界面上。


分析:

这个插件主要都定义在org.eclipse.jdt.debug.ui_<Version>.jar中的plugin.xml中,它提供了各种人机交互的插件功能。打的比方,我们看编辑器功能:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
< extension
          point = "org.eclipse.ui.editorActions" >
       < editorContribution
             targetID = "org.eclipse.jdt.ui.CompilationUnitEditor"
             id = "org.eclipse.jdt.debug.CompilationUnitEditor.BreakpointRulerActions" >
          < action
                label = "%AddBreakpoint.label"
                class = "org.eclipse.debug.ui.actions.RulerToggleBreakpointActionDelegate"
                actionID = "RulerDoubleClick"
                id = "org.eclipse.jdt.debug.ui.actions.ManageBreakpointRulerAction" >
          </ action >
       </ editorContribution >
       < editorContribution
             targetID = "org.eclipse.jdt.ui.ClassFileEditor"
             id = "org.eclipse.jdt.debug.ClassFileEditor.BreakpointRulerActions" >
          < action
                label = "%AddBreakpoint.label"
                class = "org.eclipse.debug.ui.actions.RulerToggleBreakpointActionDelegate"
                actionID = "RulerDoubleClick"
                id = "org.eclipse.jdt.debug.ui.actions.ManageBreakpointRulerAction" >
          </ action >
       </ editorContribution >
       < editorContribution
             targetID = "org.eclipse.jdt.debug.ui.SnippetEditor"
             id = "org.eclipse.jdt.debug.ui.JavaSnippetToolbarActions" >
          < action
                toolbarPath = "evaluationGroup"
                id = "org.eclipse.jdt.debug.ui.SnippetExecute"
                hoverIcon = "$nl$/icons/full/etool16/run_sbook.gif"
                class = "org.eclipse.jdt.internal.debug.ui.actions.ExecuteAction"
                disabledIcon = "$nl$/icons/full/dtool16/run_sbook.gif"
                enablesFor = "+"
                icon = "$nl$/icons/full/etool16/run_sbook.gif"
                helpContextId = "execute_action_context"
                label = "%Execute.label"
                tooltip = "%Execute.tooltip" >
             < selection
                   class = "org.eclipse.jface.text.ITextSelection" >
             </ selection >
          </ action >
          < action
                toolbarPath = "evaluationGroup"
                id = "org.eclipse.jdt.debug.ui.SnippetDisplay"
                hoverIcon = "$nl$/icons/full/etool16/disp_sbook.gif"
                class = "org.eclipse.jdt.internal.debug.ui.actions.PopupDisplayAction"
                disabledIcon = "$nl$/icons/full/dtool16/disp_sbook.gif"
                enablesFor = "+"
                icon = "$nl$/icons/full/etool16/disp_sbook.gif"
                helpContextId = "display_action_context"
                label = "%Display.label"
                tooltip = "%Display.tooltip" >
             < selection
                   class = "org.eclipse.jface.text.ITextSelection" >
             </ selection >
          </ action >
          < action
                toolbarPath = "evaluationGroup"
                id = "org.eclipse.jdt.debug.ui.SnippetInspect"
                hoverIcon = "$nl$/icons/full/etool16/insp_sbook.gif"
                class = "org.eclipse.jdt.internal.debug.ui.actions.PopupInspectAction"
                disabledIcon = "$nl$/icons/full/dtool16/insp_sbook.gif"
                enablesFor = "+"
                icon = "$nl$/icons/full/etool16/insp_sbook.gif"
                helpContextId = "inspect_action_context"
                label = "%Inspect.label"
                tooltip = "%Inspect.tooltip" >
             < selection
                   class = "org.eclipse.jface.text.ITextSelection" >
             </ selection >
          </ action >
       </ editorContribution >
    </ extension >

从这里看出,它支持好几个操作:如CompilationUnitEditor的打断点 ,ClassFileEditor的打断点等。


每个操作都有用到的图标,用到的action响应类等,有兴趣的可以看下。





本文转自 charles_wang888 51CTO博客,原文链接:http://blog.51cto.com/supercharles888/1588681,如需转载请自行联系原作者
目录
相关文章
|
7月前
|
设计模式 架构师 Java
阿里P8架构师都要学习研究的java加强版23种设计模式神级PDF文档
说在前面的话 Java作为老牌纯正的编程语言,在规范性上有着天然优势。因此本版的设计模式讲解全部用Java语言来描述,并针对Java语言的特性对讲解内容做了相当大的改动。 不知道大家是否听过编程界的一段话:掌握设计模式相当于华山派的"气宗",是程序员的内功修为,虽然在同样的学习时间下,类似Python这种"剑宗"的开发模式见效更快,但是长远来看,"气宗"才是走向软件架构师以上级别的必由之路。 所以,掌握气宗就掌握了编程命脉,然而学习设计模式有四大境界: 接下来给大家分享的就是java溢彩加强版大话设计模式包含的内容知识点。 总目录 主要内容 本文是百万销量的经典畅销书《
131 0
|
7月前
|
缓存 自然语言处理 BI
CocosCreator3.8研究笔记(二十)CocosCreator UI组件(四)
CocosCreator3.8研究笔记(二十)CocosCreator UI组件(四)
137 0
|
7月前
|
前端开发 Android开发
CocosCreator3.8研究笔记(十九)CocosCreator UI组件(三)(3)
CocosCreator3.8研究笔记(十九)CocosCreator UI组件(三)
|
7月前
|
Android开发 iOS开发 容器
CocosCreator3.8研究笔记(十九)CocosCreator UI组件(三)(2)
CocosCreator3.8研究笔记(十九)CocosCreator UI组件(三)
195 0
|
7月前
|
JavaScript 数据安全/隐私保护 Android开发
CocosCreator3.8研究笔记(十九)CocosCreator UI组件(三)(1)
CocosCreator3.8研究笔记(十九)CocosCreator UI组件(三)
121 0
|
7月前
|
JavaScript 前端开发 C++
和chatgpt学架构03-引入UI框架(elment-plus)
和chatgpt学架构03-引入UI框架(elment-plus)
|
8月前
|
存储 缓存 API
SAP 电商云 UI 服务器端渲染的建议架构
SAP 电商云 UI 服务器端渲染的建议架构
48 0
|
9月前
|
存储 监控 关系型数据库
|
9月前
|
存储 人工智能 Cloud Native
云原生大数据架构实践与思考-DataFunTalk
导读: 作者:振策-阿里云计算平台-产品解决方案, 20230805 本文将分享当前云原生大数据架构的发展历程/架构定义/核心能力/应用场景及趋势思考。主要包括以下四个部分: - 从大数据上云看架构 - 云原生数据平台的核心能力 - Data+AI with Cloud-Native - 未来趋势与思考
1407 0
|
1天前
|
前端开发 搜索推荐 开发者
SAP UI5 sap.m.Column 控件的 minScreenWidth 属性介绍
SAP UI5 sap.m.Column 控件的 minScreenWidth 属性介绍
33 0