Basic workbench extension points using commands

Commands and handlers have been provided by the workbench in one form or another since 3.0. In 3.2 the commands, handlers, and keybindings portion of the Command Framework became mature. In 3.3 the menu contributions portion of the Command Framework became available.

The workbench defines extension points that allow plug-ins to contribute behaviors to existing views and editors or to provide implementations for new views and editors. We'll use the Info example from the contributions plugin. It provides a view that lists people and an editor for updating their names.

We are going to take a look at how commands, handlers, menu contributions, and keybindings can be used to contribute behaviour to the workbench, to views, and to editors.

Picture of the workbench, showing the contributions

You can show any view in the workbench by choosing command link Window > Show View > Other... and selecting the view from the Show View list. Use this to select the Info View from the View Contributions category.

The Info example is located in the org.eclipse.ui.examples.contributions package. To follow along, you will need to make sure that you have installed the platform examples. (See the Examples Guide for more information.)