use of org.eclipse.ui.internal.navigator.filters.CommonFilterDescriptorManager in project polymap4-core by Polymap4.
the class NavigatorFilterService method persistFilterActivationState.
/*
* (non-Javadoc)
*
* @see org.eclipse.ui.navigator.INavigatorFilterService#persistFilterActivationState()
*/
public void persistFilterActivationState() {
synchronized (activeFilters) {
CommonFilterDescriptorManager dm = CommonFilterDescriptorManager.getInstance();
/*
* by creating a StringBuffer with DELIM, we ensure the string is
* not empty when persisted.
*/
StringBuffer activatedFiltersPreferenceValue = new StringBuffer(DELIM);
for (Iterator activeItr = activeFilters.iterator(); activeItr.hasNext(); ) {
String id = activeItr.next().toString();
if (!dm.getFilterById(id).isVisibleInUi())
continue;
activatedFiltersPreferenceValue.append(id).append(DELIM);
}
IEclipsePreferences prefs = NavigatorContentService.getPreferencesRoot();
prefs.put(getFilterActivationPreferenceKey(), activatedFiltersPreferenceValue.toString());
NavigatorContentService.flushPreferences(prefs);
}
}
Aggregations