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 are going to take a look at the contributions to these extension points from one of the workbench sample applications, the readme tool.
The readme tool is a plug-in that provides custom editing and navigation for a specific resource , a .readme file. The example shows many typical (but simplified) ways that extensions can be used to provide specialized tools.
The readme tool contributes to the menus of the navigator view, adds editor related actions to the workbench menus and tool bar, defines a custom view and content outliner, and defines markers and marker resolutions. The figure below shows some of the customized features added to the workbench by the readme tool.
The readme tool also contributes preference and properties pages to the workbench. Later we'll also look at some wizard contributions in Dialogs and wizards.
The readme tool is located in the org.eclipse.ui.examples.readmetool package. The readmetool.jar and plugin.xml can be found in the org.eclipse.ui.examples.readmetool directory underneath the plugins directory. To follow along, you will need to make sure that you have installed the platform examples. (See the Examples Guide for more information.)
The readme tool implements many different workbench extensions. We will start with one of the simplest workbench extension points, a view. We'll continue by looking at additional readme tool extensions.