In the previous chapter, we looked at some of the basic JFace viewers, which provide a representation of data. However, we need to interact with the user and we can do this in multiple ways, from responding to mouse clicks to processing data-intensive operations in the background.
In this chapter we will cover:
The first few releases of the Eclipse framework provided Action
as a means of contributing to menu items. These were defined declaratively via actionSets
in the plugin.xml
file, and many tutorials still reference those today. At the programming level, when creating views, Actions
are still used to provide context menus programmatically.
They were replaced with commands in Eclipse 3, as a more abstract way of decoupling the operation of a command with its representation of the menu. To connect these two together, a handler is used.