Analyze Your Eclipse Plugins with T4Eclipse
Join the DZone community and get the full member experience.Join For Free
T4Eclipse, a tool for Eclipse plug-in developers to run analysis on their pluging has just been released under version 1.1. This article outlines how the tool works.
Currently,T4Eclipse provides the following functions:
- Lists all wizard/preference/view/editor/perspective/menu/toolbar in a table
- Provides a method to find the Java class for the above Eclipse components
- Provides a method to view all SWT controls in the currently focused Eclipse view or editor
- Analyze the above SWT control by checking its field value or invoking its methods
- Lists the Java classes for each opened Dialog in Eclipse
- Lists all path ids in the Eclipse main menu,so you can add your menu item in the right place
- Includes an Eclipse runtime error blocker
Analyze all wizards in current Eclipse workbench.
1. Open "T4Eclipse" view by click main menu item "T4Eclipse-->Open/UpdateT4Eclipse View"
2. Click the "Wizard" tab to see Wizard informations.
The following picture shows all wizards in the current eclipse.
For each wizard, Group ID, Wizard ID and the Class to implement this wizard is show.
Open a wizard's java class is very easy. Select a wizard item in the above table and click the pop up menu item Open Class. The Open Type dialog will be shown.
How to analyze a view/editor in current Eclipse workbench
1. Make sure the T4Eclipse view is opened in current Eclipse workbench page.
2. Make the view/editor to be analyzed to be the active part in current page by click at it.
3. Click main menu item T4Eclipse-->Show Active PartThe following picture shows all the SWT controls under an empty Outline view.
How to analyze a special control
1. Select one control in the ActivePart tab after you analyzed a view or editor.
2. Click on the popup menu item Analysis after you right click the selected item.
3. Add a description for this control.
4.In the Control tab, you can see the field value of this control and run any method (currently, no parameter) of this control.
The following picture analyzes a label in an empty outline view .
How to do other things
T4Eclipse provides quite a lot of functions for you to analyze existing plug-ins in your Eclipse workspace. Go to the T4Eclipse project page at http://t4eclipse.googlecode.com/ for more details. There is also a flash demo user guide at the homepage.
Opinions expressed by DZone contributors are their own.