In the example that we used to illustrate how to declare and implement an extension point, we created a plugin that adds a button to the Eclipse toolbar. Now, let's take a more careful look at how this button was added there, as well as find out how we could add elements to other parts of the Eclipse interface.
The first thing we should know is that there are two different ways of contributing to menus in the Eclipse UI: actions and commands. The action way that we used in the previous example might look simpler at first, but simplicity has a price here; as you can see, logic and interface are closely tied, which might lead to code replication if you want to add, for example, a right-click menu entry that performs the same action as the toolbar button. As you know, code replication is a project's nightmare and should be avoided at all costs. For this reason, usage of actions is discouraged in detriment of commands.
The...