Bug 66794 Out of sync filter message [search]
I200406111238 - search for references to Refactoring - limit number of matches to 10 - switch group mode to CU observe: filters matched 21 - switch to flat mode observe: filters matched 84 <== seems already wrong - switch back observe: filters matched 0 <== is definitelly wrong
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/JavaSearchResultPage.java
}
		
		return filteredMatches;
	}
	
	private boolean isFiltered(Match match) {
		MatchFilter[] filters= getMatchFilters();
		for (int j= 0; j < filters.length; j++) {
			if ((match instanceof JavaElementMatch) && filters[j].filters((JavaElementMatch) match))
				return true;
		}
		return false;
	}
	public void setInput(ISearchResult search, Object viewState) {
		updateFilterEnablement((JavaSearchResult)search);
		super.setInput(search, viewState);
	}
	private void updateFilterEnablement(JavaSearchResult result) {
		IActionBars bars= getSite().getActionBars();
		IMenuManager menu= bars.getMenuManager();
		for (int i= 0; i < fFilterActions.length; i++) {
			menu.remove(fFilterActions[i].getId());
		}
		for (int i= fFilterActions.length-1; i >= 0 ; i--) {
			if (shouldEnable(result, fFilterActions[i]))
				menu.prependToGroup(GROUP_FILTERING, fFilterActions[i]);
		}
		
		menu.updateAll(true);
		bars.updateActionBars();