站内搜索: 请输入搜索关键词
当前页面: 图书首页 > Eclipse Rich Client Platform: Designing, Coding, and Packaging Java Applications

Chapter 17.  Actions - Eclipse Rich Client Platform: Designing, Coding, and Packaging Java Applications

Previous Page
Next Page

Chapter 17. Actions

There is much more to the notion of actions than we've covered in our examples so far. Chapter 6, "Adding Actions," ended with an explanation of why Hyperbola does not use declarative actions, a standard technique in Eclipse. To recap, the actions in Hyperbola are defined and placed programmatically by the ActionBarAdvisor. This technique is simple and ideal for small, closed applications. In Chapter 14, "Adding Update," we talked about updating deployed applications and adding new plug-ins. How do these new plug-ins add their actions? The answer lies in the Workbench's support for declarative actions.

This chapter is split into two parts: the first explains when and how to use declarative actions, while the second gives useful tips and tricks for writing product-quality actions. Specifically in this chapter, we show you how to:

  • Decide between using declarative versus programmatic actions.

  • Add declarative actions to Hyperbola.

  • Use retargetable actions to define pluggable behavior.

  • Write actions that correctly track selection.

  • Show progress for long-running actions.

  • Use actions in alternate ways, such as showing text, creating multi-row toolbars, and adding controls to toolbars.

  • Add contributions to the status line.


Previous Page
Next Page