A pluglet source file is no different from any other Java source file. Pluglet writers can specify what Eclipse plug-ins their pluglets require, and this controls the pluglet classpath, both at compile and at runtime.
The Fan-In and Model Enumeration pluglet samples provide simple examples of pluglets that highlight a specific utility or API. The Fan-In pluglet sample calculates the fan-in metric for a class. The Model Enumeration pluglet sample lists the contents of a selected class in a model. For a brief demonstration of these pluglets capabilities, click Help > Samples Gallery, and expand the Pluglets folder. The folder contains the Fan-In and Model Enumeration pluglet samples.
Represents the basic template for pluglets. You have to add the pluglet elements, depending on what you want the pluglet to do.
Creates a Hello World pluglet.
Lists the contents of a selected class in a model. It demonstrates basic model examination.
Enables the text editor pluglet.
You can create pluglets to handle routine tasks, and the pluglet functionality offers you an easy way to explore and learn the API offered by the workbench platform and other product extensions. From a workbench perspective your can write the statement Platform.getWorkbench() and gain complete access to the entire workbench and its parts. From a modeling perspective, the UMLModeler class allows you access to a model and its contents.
<pluglets> <require> <import plugin="com.ibm.xtools.pluglets"/> </require> </pluglets>
Related tasks
Extending your Java environment with pluglets
Creating pluglet projects
Creating pluglets
Running pluglets
Implementing pluglets
Related reference
Pluglets API
Related information
Tutorial and samples for pluglets