Subelement counter details

The plug-in that this sample generates is fully preconfigured with a name, version, provider, and other options. You can also generate this sample from the New Plug-in Project wizard. If you use the wizard, you can generate a template for a customized Unified Modeling Language (UML) model plug-in.

The generated project is a Plug-in Development Environment (PDE) project that contains the code for a plug-in that contributes a menu named Sample on the menu bar. The menu contains a single menu item: Count Sub-Elements. When you click the menu item, it counts the number of elements that the selected element owns.

To build the sample manually

Procedure

  1. Click File > New > Project.
  2. Expand Plug-in Development, click Plug-in Project, and click Next.
  3. Complete the pages in the wizard until you reach the Templates page.
  4. On the Templates page, select the Create a plug-in using one of the templates check box.
  5. From the list of available templates, select Plug-in with a sub-element counter.
  6. Click Next.
  7. Define the parameters for the sample plug-in.
  8. Click Finish.

Feedback