public interface INavigatorFilterService
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
INavigatorContentService.getFilterService()
). Each instance will
provide information specific to the content service associated with it.
The visibility of commonFilters is controlled through matching viewerContentBindings. That is, like content extensions, the id of a commonFilter must match an includes expression for at least one viewerContentBinding element for the corresponding INavigatorContentService.
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 persistFilterActivationState()
after each call to setActiveFilterIds(String[])
.
INavigatorContentService.getFilterService()
,
ViewerFilter
Modifier and Type | Method and Description |
---|---|
void |
activateFilterIdsAndUpdateViewer(String[] theFilterIds)
Cause the specified set of filters to be activated, and any filters not
specified to be deactivated.
|
ViewerFilter |
getViewerFilter(ICommonFilterDescriptor theDescriptor)
Return the viewer filter for the given descriptor
|
ICommonFilterDescriptor[] |
getVisibleFilterDescriptors()
Visible filters are filters whose ids match a
viewerContentBinding for the corresponding viewer.
|
ViewerFilter[] |
getVisibleFilters(boolean toReturnOnlyActiveFilters)
Determine the set of filters which are visible to the
content service associated with this filter service.
|
boolean |
isActive(String aFilterId) |
void |
persistFilterActivationState()
Persist the current activation state for visible filters.
|
void |
setActiveFilterIds(String[] theFilterIds)
Activate the set of given filters.
|
ViewerFilter[] getVisibleFilters(boolean toReturnOnlyActiveFilters)
toReturnOnlyActiveFilters
- True indicates that only active filters should be returned.ICommonFilterDescriptor[] getVisibleFilterDescriptors()
boolean isActive(String aFilterId)
aFilterId
- Check the activation of aFilterId for the content service
corresponding to this filter service.void activateFilterIdsAndUpdateViewer(String[] theFilterIds)
setActiveFilterIds(String[])
which does not set the viewer
filter state. This is probably the one you want if you are changing
filters.theFilterIds
- An array of filter ids to activate.void setActiveFilterIds(String[] theFilterIds)
getVisibleFilters(boolean)
. An inactive filter will
only be returned from getVisibleFilters(boolean)
when it is
called with false.theFilterIds
- An array of filter ids to activate.void persistFilterActivationState()
ViewerFilter getViewerFilter(ICommonFilterDescriptor theDescriptor)
theDescriptor
- A non-null filter descriptor.
Copyright (c) 2000, 2015 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.