Bug 292813 [CommonNavigator] Please provide an API for enabling and disabling common navigator filters programmatically
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/532.0 (KHTML, like Gecko) Chrome/3.0.195.27 Safari/532.0 Build Identifier: M20090917-0800 Recently I had a case where I wanted to enable/disable a common navigator filter from code and found it very difficult. I basically ended up using the code in org.eclipse.ui.internal.navigator.filters.UpdateActiveFiltersOperation as a reference and ended up manually creating or pruning an array, as well as adding/removing a corresponding ViewerFilter to/from and refreshing the underlying viewer. This seems quite complicated and I think others could benefit from it being API similar to how API was recently added to enable and disable content contributions (via INavigatorContentService#activateExtensions and INavigatorContentService#deactivateExtensions). Reproducible: Always
bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/navigator/INavigatorFilterService.java
* An INavigatorFilterService manages the available common filters and their
 * current activation state for a particular INavigatorContentService. An
 * INavigatorFilterService cannot be acquired without an
 * INavigatorContentService (through
 * {@link INavigatorContentService#getFilterService}). Each instance will
 * provide information specific to the content service associated with it.
 * </p>
 * <p>
 * The visibility of commonFilters is controlled through matching
 * <b>viewerContentBinding</b>s. That is, like content extensions, the id of a
 * commonFilter must match an includes expression for at least one
 * <b>viewerContentBinding</b> element for the corresponding
 * INavigatorContentService.
 * </p>
 * <p>
 * The activation of each filter should be persisted from session to session.
 * Clients of this interface have control over when the persistence occurs. In
 * particular, clients should call {@link  #persistFilterActivationState()}
 * after each call to {@link #setActiveFilterIds(String[])}.
 * </p> 
 * 
 * @see INavigatorContentService#getFilterService()
 * @see ViewerFilter
 * 
 * @noimplement This interface is not intended to be implemented by clients.
 * @noextend This interface is not intended to be extended by clients.
 * @since 3.2
 * 
 */
public interface INavigatorFilterService {