资源说明:目录
1 富客户端平台 ......................................................................................................................................9
1.1 概述 ...............................................................................................................................................9
1.2 ECLIPSE RCP 建设风格——插件,扩展和扩展点 .....................................................................9
1.3 RCP与PLUGIN ................................................................................................................................9
2 创建第一个RCP程序 ........................................................................................................................11
2.1 创建一个RCP程序 ......................................................................................................................11
2.2 启动RCP程序 ..............................................................................................................................15
2.3 程序VS 产品 ..............................................................................................................................17
2.4 维护LAUNCH配置 .......................................................................................................................17
2.5 可能的APPLICATION ID 错误: ..................................................................................................20
2.6 应用程序的PLUGIN ID ................................................................................................................21
3 ACTIONS的用法(菜单栏和工具栏) ............................................................................................22
3.1 概述 .............................................................................................................................................22
3.2 通过编码添加 .............................................................................................................................22
3.3 “扩展”方式添加菜单和工具栏 ..................................................................................................25
3.4 添加全局快捷键 .........................................................................................................................31
3.4.1 Command+Handler+Binding 绑定 ......................................................................................31
3.4.2 Action+Command+Binding绑定 ..........................................................................................33
4 系统托盘 ............................................................................................................................................37
5 视图 ....................................................................................................................................................42
5.1 添加示例视图 .............................................................................................................................42
5.2 添加自定义视图 .........................................................................................................................47
5.3 向VIEW里添加ACTION ................................................................................................................52
RCP/Plug-in 开发自学教程 版权所有 转载请注明 salever@126.com
- 5 -
6 编辑器 ................................................................................................................................................58
6.1 概述 .............................................................................................................................................58
6.2 创建工程 .....................................................................................................................................58
6.3 添加编辑器 .................................................................................................................................59
6.4 调用编辑器 .................................................................................................................................67
6.5 实例:文本编辑器实现 .............................................................................................................68
6.5.1 新建工程 ..............................................................................................................................68
6.5.2 添加菜单栏和工具栏 ..........................................................................................................70
6.5.3 添加编辑器 ..........................................................................................................................75
7 对话框 ................................................................................................................................................86
7.1 概述 .............................................................................................................................................86
7.2 预定义的对话框 .........................................................................................................................87
7.2.1 概述 ......................................................................................................................................87
7.2.2 创建工程 ..............................................................................................................................87
7.2.3 添加菜单 ..............................................................................................................................87
7.2.4 调用对话框 ..........................................................................................................................87
7.3 用户自定义对话框 .....................................................................................................................89
7.3.1 概述 ......................................................................................................................................89
7.3.2 创建SWT/JFace工程 ...........................................................................................................89
7.3.3 自定义Dialog .......................................................................................................................91
7.3.4 说明 ......................................................................................................................................97
8 向导 ....................................................................................................................................................98
8.1 概述 .............................................................................................................................................98
8.2 示例 .............................................................................................................................................98
9 首选项 ..............................................................................................................................................106
RCP/Plug-in 开发自学教程 版权所有 转载请注明 salever@126.com
- 6 -
9.1 首选项 .......................................................................................................................................106
9.2 使用首选项 ...............................................................................................................................106
9.3 首选项页 ...................................................................................................................................112
10 添加状态栏 ....................................................................................................................................117
10.1 简介 .........................................................................................................................................117
10.2 安装状态栏 .............................................................................................................................117
10.3 初始化状态条 .........................................................................................................................118
10.4 控制状态栏 .............................................................................................................................120
11 透视图 ............................................................................................................................................123
11.1 简介 .........................................................................................................................................123
11.2 添加透视图 .............................................................................................................................123
11.3 显示透视图工具栏 .................................................................................................................128
11.4 显示透视图菜单 .....................................................................................................................130
12 进度条 ............................................................................................................................................133
12.1 简介 .........................................................................................................................................133
12.2 进度条对话框 .........................................................................................................................133
12.3 JOB进度条 ................................................................................................................................135
13 使用第三方JAR .............................................................................................................................140
13.1 概述 .........................................................................................................................................140
13.2 向构建路径中添加JAR ...........................................................................................................140
13.3 使JAR在你的运行路径里有效 ................................................................................................141
14 提示和策略 ....................................................................................................................................143
14.1 控制台日志 .............................................................................................................................143
14.2 保存用户的布局 .....................................................................................................................145
RCP/Plug-in 开发自学教程 版权所有 转载请注明 salever@126.com
- 7 -
14.3 获得DISPLAY ............................................................................................................................146
14.4 使用ECLIPSE的“保存”ACTION .................................................................................................146
14.5 向你的程序添加错误日志视图 .............................................................................................146
15 产品 ................................................................................................................................................149
15.1 概述 .........................................................................................................................................149
15.2 PRODUCT配置文件 ...................................................................................................................149
15.3 测试你的产品 .........................................................................................................................153
15.4 欢迎页面 .................................................................................................................................153
15.5 商标 .........................................................................................................................................154
15.6 风格化LAUNCHING ..................................................................................................................155
15.7 发布你的产品 .........................................................................................................................156
15.8 创建一个帮助插件工程 .........................................................................................................159
16 专题一 ECLIPSE的版本和发行包 ..............................................................................................164
16.1 版本 VERSION .........................................................................................................................164
16.1.1 版本的理解 ......................................................................................................................164
16.1.2 Eclipse的版本 ...................................................................................................................164
16.1.3 版本的选择和下载 ..........................................................................................................164
16.2 发行包 EDITION ......................................................................................................................166
16.2.1 发行包的理解 ..................................................................................................................166
16.2.2 Eclipse的发行包 ...............................................................................................................166
17 专题二 ECLIPSE的国际化与语言包 ..........................................................................................169
17.1 国际化 .....................................................................................................................................169
17.1.1 Externalize Strings ............................................................................................................169
17.1.2 中文属性文件 ..................................................................................................................175
17.1.3 国际化文件 ......................................................................................................................176
17.1.4 指定语言环境 ..................................................................................................................176
RCP/Plug-in 开发自学教程 版权所有 转载请注明 salever@126.com
- 8 -
17.1.5 Propedit工具 .....................................................................................................................177
17.2 语言包 .....................................................................................................................................177
17.2.1 Babel小组 .........................................................................................................................177
17.2.2 中文语言包的下载 ..........................................................................................................178
18 专题三 DECORATOR与MARKER的使用 .................................................................................180
18.1 简介 .........................................................................................................................................180
18.2 扩展DECORATOR ......................................................................................................................180
18.3 扩展MARKER ...........................................................................................................................184
19 专题四 RUN/DEBUG LAUNCHER实现 ....................................................................................190
19.1 ECLIPSE RUN/DEBUG 实现流程 ...............................................................................................190
19.2 扩展CONFIGURATIONTYPE .......................................................................................................192
19.3 扩展ILAUNCHSHORTCUT .........................................................................................................194
19.4 创建RUN/DEBUG CONFIGURATION界面 ..................................................................................197
19.5 指定RUN/DEBUG显示图片 .....................................................................................................204
19.6 说明 .........................................................................................................................................205
20 专题五 EQUINOX P2 方式实现RCP自动更新 .........................................................................207
20.1 概述 .........................................................................................................................................207
20.2 示例 .........................................................................................................................................207
20.2.1 Feature概念 .......................................................................................................................207
20.2.2 配置Product .....................................................................................................................210
20.2.3 配置Feature ......................................................................................................................211
20.2.4 product导出 ......................................................................................................................213
20.2.5 配置Equinox P2 ...............................................................................................................214
20.2.6 配置 Update Site .............................................................................................................215
21 专题六 COMMON NAVIGATOR FRAMEWORK初探 .............................................................216
本源码包内暂不包含可直接显示的源代码文件,请下载源码包。