Java Element Filters Tutorial

To define your own filters, please follow these steps:

  1. Switch to a new installation of Eclipse in a new workspace
  2. Install AgileJ StructureViews from the update site
  3. Select New - Project - Plugin Project
  4. Give your new project a name such as MyJavaElementFilters and click Next
  5. Deselect This plug-in will make contributions to the UI and click Next
  6. Deselect Create a plug-in using one of the templates and click Finish
  7. The Overview editor is shown
  8. On the dependencies tab click Add...
  9. Select org.eclipse.jdt.core and click OK
  10. Repeat for com.agilej.filters.common, com.agilej.filters.api, com.agilej.model.impl and com.agilej.model.common

  11. Click the Extensions tab

  12. Click Add...
  13. Select com.agilej.filters.api and click OK
  14. Right click on com.agilej.filters.api and select New - client

  15. Select File - Save (this step is important for the next step to work correctly)
  16. Click on the link class*

  17. The New Class wizard will open
  18. Click Finish
  19. The Java source editor will open

Implementing filters

An example implementation of a filter is also shown on the example implementation page.

Testing your new filters

Finally, when you have implemented your filter provider and one or more new filters, you can test then by selecting Run - Debug Configurations. Right click on Eclipse Application and give the configuration a meaningful name such as Filter Test.



Press the File System...button and navigate to the root of your normal development workspace.

Press Debug to launch a new instance of Eclipse. The quickest way to check that your new filter is available is to open a class diagram and open the filter script view. Ctrl+Space will now show your new filter listed.


Exporting a custom Java Element Filter plugin

Copyright © AgileJ Ltd. All rights reserved.

AgileJ StructureViews is a plugin for Eclipse which generates UML class diagrams reverse engineered from Java source code.

Learn More

Stay Up To Date

Get In Touch

AgileJ Ltd
Trident Court, 1 Oakcroft Road
Chessington, Surrey
United Kingdom
+44 20 8123 2318