Users often find it necessary to filter views such as the navigator view in order to reduce clutter. Plug-ins can assist in filtering using different techniques.
If your plug-in implements a view that shows resources (or objects that are adaptable to IResource), you should support working sets. IWorkingSetManager provides API for manipulating working sets. You can obtain an IWorkingSetManager using IWorkbench API.
IWorkingSetManager manager = workbench.getWorkingSetManager();
IWorkingSetManager allows you to manipulate and create working sets:
IWorkingSetManager also provides property change notification as working sets are added, removed, or as they change. If your view or editor needs to respond to changes in the selected working set, it can add a listener for CHANGE_WORKING_SET_CONTENT_CHANGE.
For many plug-ins, using IWorkingSetManager to provide resource filtering is sufficient. If your plug-in needs to define working sets differently, it can register a new type of working set using org.eclipse.ui.workingSets. The Java tooling uses this feature to define a Java working set type. Working set types are shown when the user decides to add a working set.
See the org.eclipse.ui.workingSets extension point documentation for more detail.