Bug 55628 Ctrl+o Filters not persistent when set via view menu
I20040322
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/CustomFiltersActionGroup.java
Set newFilters= new HashSet();
	    for (int i= 0; i < enabledFilters.length; i++) {
            String filterName= enabledFilters[i];
            ViewerFilter filter= (ViewerFilter) fInstalledBuiltInFilters.get(filterName);
            if (filter == null)
                newFilters.add(filterName);
           else if (isSelected(parent, element, contentProvider, filter)) 
                newFilters.add(filterName);
        }
	    if (newFilters.size() == enabledFilters.length)
	        return new String[0];
	    return (String[])newFilters.toArray(new String[newFilters.size()]);
	}
	
	public void setFilters(String[] newFilters) {
	    setEnabledFilterIds(newFilters);
	    updateViewerFilters(true);
	}
	
	private boolean isSelected(Object parent, Object element, IContentProvider contentProvider, ViewerFilter filter) {
	    if (contentProvider instanceof ITreeContentProvider) {
	        
	        ITreeContentProvider provider = (ITreeContentProvider) contentProvider;
	        while (element != null && !(element instanceof IJavaModel)) {
	            if (!filter.select(fViewer, parent, element)) 
	                return false;
	            element= provider.getParent( element);
	        }
	        return true;
	    }