Filtering out WID generated projects

If you’ve ever used WebSphere Integration Developer (WID) and also do Java development, like me you’ll probably find having all the generated projects cluttering up your workspace quite annoying.

All the generated projects follow a naming convention where the source assembly project is suffixed with App, EJB, EJBClient and Web. Eclipse has the ability to filter resources by name as standard. Through the Java element Filters dialog you can specify the pattern “*App,*EJB,*EJBClient,*Web“. Click to see sample screenshot.

Whilst this does filter out the generated projects, it also filters out any other resource matching the name pattern; including non generated projects, Java classes, etc.

To implement this properly I created a plugin which extended the org.eclipse.jdt.ui.javaElementFilters extension point. The essence of the logic is to only filter projects which have been generated by looking for one of the suffixes, removing it and trying to find a project with that name and checking whether this other project is a WID assembly project.

Most of this is really quite simple, the hardest part is how to determine if the other project is a WID project - which is also quite easy. WID Assembly projects have an additional nature that can be used to identify them. So, by checking whether the project has the nature com.ibm.wbit.project.generalmodulenature, you can determine whether the original project meets the filter criteria.

N.B.At present this code isn’t open sourced - it’s on my todo list to release it to the community ;-)

Leave a Reply

You must be logged in to post a comment.