Creating the plug-in
Write a plug-in that extends the extension point
This adds an entry to the Open With menu.
A plug-in project needs to be created to hold the demo analyzer
plug-in's code. Follow these steps to create and prepare an analyzer
Create a new plug-in project.
In the New Plug-in Project wizard, enter project name org.eclipse.hyades.demo.analyzerview.
Accept default settings. Click Next.
- Accept default settings. Click Finish.
plug-in project with a MANIFEST.MF file and a plug-in class that extends
AbstractUIPlugin has been created. Add the following required plug-ins to
the new plug-in's dependencies:
The demo analyzer plug-in will require the TPTP Trace Model
plug-in, the TPTP Trace Core UI plug-in and the Eclipse JFace
plug-in. To reference them in the demo analyzer plug-in, add the
following three lines into the plug-in manifest <require> markup.
The manifest should look like this:
Extend and contribute
your analyzer extension by adding the following to the plugin.xml file.
name="Demo Analyzer View"
The four required fields are:
- The analyzer's unique identification is specified in this tag.
- The analyzer's name is specified in this.
tag dictates the type of object to which this analyzer is applicable;
in this case it is trace objects. Other valid values for this tag
include other TPTP resources such as test suite and deployment.
tag specifies the name of the class when an action is invoked on the
Open With menu item. This class must implement
All the other fields are optional. Note the use of tag type, which associates the analyzer
with a particular type of object. Other valid values for this tag are Logging, Monitor and Host.
TPTP adds the option in Open With to invoke the analyzer on any given object according to the value in type.
For example, when the value is Host, the analyzer will only be available on host objects in the Profiling Monitor view.
Add a folder to the plug-in project named icons and add this icon (sample.gif) to it:
The next stage is to create the class that will perform the actions for the view.
Adding a view to the Profiling and Logging Perspective
Add a class for the action
Add a class for the view