Bug 60257 SearchPattern API: R_CASE_SENSITIVE vs. boolean isCaseSensitive
The SearchPattern API for stringPattern searches to java elements is somewhat odd: There's a public constant R_CASE_SENSITIVE, which is not mentioned in the javadoc of createPattern(String stringPattern, int searchFor, int limitTo, int matchMode, boolean isCaseSensitive) , and there's also an extra boolean parameter isCaseSensitive. I don't see why R_CASE_SENSITIVE is made public if it should not be used by clients. On the other hand, it could also be turned into an official bit-flag and the boolean isCaseSensitive removed. To have both options seems strange to me.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/JavaSearchQuery.java
protected SearchRequestor(IQueryParticipant participant, JavaSearchResult result) {
			super();
			fParticipant= participant;
			fSearchResult= result;
		}
	}
	
	private IQueryParticipant[] getSearchParticipants(IProject[] concernedProjects) throws CoreException {
		Map participantMap= new HashMap();
		collectParticipants(participantMap, concernedProjects);
		IQueryParticipant[] participants= new IQueryParticipant[participantMap.size()];
		return (IQueryParticipant[]) participantMap.values().toArray(participants);
	}	
	
	private void collectParticipants(Map participants, IProject[] projects) throws CoreException {
		Iterator activeParticipants= SearchParticipantsPreferencePage.readActiveParticipants().values().iterator();
		while (activeParticipants.hasNext()) {
			IConfigurationElement participant= (IConfigurationElement) activeParticipants.next();
			String id= participant.getAttribute("id"); 
			for (int i= 0; i < projects.length; i++) {
				if (participants.containsKey(id))
					break;
				if (projects[i].hasNature(participant.getAttribute("nature"))) 
					participants.put(id, participant.createExecutableExtension("class")); 
			}
		}
	}
	public IStatus run(IProgressMonitor monitor) {
		final JavaSearchResult textResult= (JavaSearchResult) getSearchResult();
		textResult.removeAll();