没有合适的资源?快使用搜索试试~ 我知道了~
首页通过例子学习EclipseRCP开发
通过例子学习EclipseRCP开发

本文讲述如何利用Eclipse RCP架构来进行应用开发。本文涵盖了创建RCP应用的各个方面:使用命令、视图、编辑器、对话框及创建与部署Eclipse产品。
资源详情
资源评论
资源推荐

I
通过例子学习
Eclipse RCP 开发
编译:孙江湖
2009 年 10 月

II
通过例子学习 Eclipse RCP 开发
编译:孙江湖
2009 年 10 月

III
ECLIPSE RCP
This article describes how to develop applications using the Eclipse Rich Client Platform (RCP)
architecture.
本文讲述如何利用 Eclipse RCP 架构来进行应用开发。
The article covers among others the creating of RCP applications, using commands, views,
editors, dialogs and creating and deploying a Eclipse product.
本文涵盖了创建 RCP 应用的各个方面:使用命令、视图、编辑器、对话框及创建与部署 Eclipse
产品。
This article is based on Eclipse 3.5 (Eclipse Galileo).
本文基于 Eclipse 3.5 讲述(Eclipse Galileo)
简介
此文通过若干个例子介绍了使用 Eclipse 进行 RCP 应用开发的过程。
学习环境:
Eclipse 的不同版本中环境差异较大。本教程是利用 Eclipse SDK 3.5.0 编写的。为了保持一致,
请使用如下 Eclipse 的安装包(小版本也很重要):
Eclipse SDK:eclipse-SDK-3.5-win32.zip
Eclipse RCP:eclipse-rcp-galileo-win32.zip
代码说明:
本教程中的代码都经过译者的验证,但不保证百分之百正确。屏幕截图是实际运行时的效果。
注:
原文下载地址:http://www.vogella.de/articles/Eclipse/article.html。在翻译过程中译者对原
文中的有些部分进行了修改、纠正。
欢迎传播,敬请指正。

1
目 录
1. Eclipse RCP clipse 富客户端 ...................................................................................................................... 1
1.1. Overview 概览 ..................................................................................................................................... 1
1.2. Eclipse RCP Architecture - Plugins, Extensions and Extension-Points Eclipse RCP
架构-插件、扩展与扩展点 ......................................................................................................................... 1
1.3. Main components of an Eclipse RCP application Eclipse RCP 应用的主要组件 ... 2
1.4. Application versus Product 应用与产品 ................................................................................... 3
1.5. Important files 重要文件 ................................................................................................................. 3
2. Installation 安装 ................................................................................................................................................. 5
3. Create your first RCP application 创建你的第一个 RCP 应用 ....................................................... 7
3.1. Create a RCP application 创建 RCP 应用 .................................................................................. 7
3.2. Start your RCP application 启动你的 RCP 应用 .................................................................. 10
4. Startup process of an RCP application RCP 应用的启动过程 ..................................................... 12
5. Run configuration 运行配置 ..................................................................................................................... 13
5.1. Overview 概览 ..................................................................................................................................... 13
5.2. Check your runtime configuration 检查运行时配置 ........................................................ 14
5.3. Important Parameters 重要参数 ................................................................................................. 15
6. Commands 命令 ............................................................................................................................................... 17
6.1. Overview 概览 ..................................................................................................................................... 17
6.2. Defining commands 定义命令.................................................................................................... 17
6.3. Using commands in menus 在菜单中使用命令 .................................................................. 21
7. System Tray 系统托盘 ................................................................................................................................ 26
8. Views 视图 .......................................................................................................................................................... 31
8.1. Overview 概览 .................................................................................................................................. 31
8.2. Create a view 创建视图 ................................................................................................................... 31

2
8.3. Add the view to your perspective. 将视图添加到透视图 ............................................... 34
8.4. Result 结果 ............................................................................................................................................ 36
8.5. Add view to perspective via code 利用代码将视图添加到透视图中 ........................... 36
9. Working with Editors, View Interaction and Model Updates 使用编辑器、视图进行交
互及模型更新 .......................................................................................................................................................... 38
9.1. Overview 概览 .................................................................................................................................. 38
9.2. Create project 创建项目................................................................................................................ 38
9.3. Create and prepare the domain model 创建并准备域模型 ........................................... 39
9.4. Content and Label provider 内容与标签提供者 ................................................................. 43
9.5. Use the domain model in the view 在视图中使用域模型 ................................................. 46
9.6. Editor area 编辑区 .......................................................................................................................... 48
9.7. Editor Input 编辑器输入............................................................................................................... 49
9.8. Adding the editor 添加编辑器 .................................................................................................... 51
9.9. Creating a command for calling the editor 创建编辑器调用命令 ............................... 54
10. Dialog 对话框 ............................................................................................................................................... 59
10.1. Overview 概览 ................................................................................................................................ 59
10.2. Using standard dialogs 使用标准对话框............................................................................. 59
10.3. Selection 选择 ................................................................................................................................. 62
10.4. User defined dialogs 使用自定义对话框 ............................................................................. 64
11. Field Assist 字段助手 ................................................................................................................................ 69
12. Wizards 向导 ................................................................................................................................................ 71
12.1. Overview 概览 ................................................................................................................................ 71
12.2. Example 例子 .................................................................................................................................... 71
13. Adding a status line 添加状态行 .......................................................................................................... 79
13.1. Setup Status line 设置状态行 ..................................................................................................... 79
剩余111页未读,继续阅读














安全验证
文档复制为VIP权益,开通VIP直接复制

评论2