Bug 67619 Java Search Read Filter filters too much
3.0 RC2 1. select first occurrence of fOffset in BufferedRuleBasedScanner. 2. search for references in workspace ==> all matches found [ok] 3. Search view > view menu > Filter Reads ==> only 3 matches remain The read filter filters out matches which have both read and write access. Flagging as major since this can lead to wrong conclusions when analyzing code.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/MatchFilter.java
public boolean filters(JavaElementMatch match) {
		return match.getElement() instanceof IImportDeclaration;
	}
	public String getName() {
		return SearchMessages.getString("MatchFilter.ImportFilter.name"); 
	}
	public String getActionLabel() {
		return SearchMessages.getString("MatchFilter.ImportFilter.actionLabel"); 
	}
	public String getDescription() {
		return SearchMessages.getString("MatchFilter.ImportFilter.description"); 
	}
	
	public boolean isApplicable(JavaSearchQuery query) {
		QuerySpecification spec= query.getSpecification();
		if (spec instanceof ElementQuerySpecification) {
			ElementQuerySpecification elementSpec= (ElementQuerySpecification) spec;
			return elementSpec.getElement() instanceof IType;
		} else if (spec instanceof PatternQuerySpecification) {
			PatternQuerySpecification patternSpec= (PatternQuerySpecification) spec;
			return patternSpec.getSearchFor() == IJavaSearchConstants.TYPE;
		}
		return false;
	}
	public String getID() {
		return "filter_imports"; 
	}
}
abstract class FieldFilter extends MatchFilter {