Bug 61366 Hierarchical (java) search results: Matches in parents not visible
I20040507 Steps: - Have a jdk with source - Search for java.util.Random -> There are matches in class files (in import statements) as well as matches in method bodies. In the hierarchical search results view mode, I cannot see whether there are search results in the class file or not. Two solutions come to mind: a) Render parent items witout matches "disabled" (grey-white icon, grey label) b) Show match count on parent labels also for count == 1
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/PostfixLabelProvider.java
private String getSingularLabel(Object element) {
		if (hasPotentialMatches(element))
			return SearchMessages.getString("PostfixLabelProvider.potential_singluar"); 
		return SearchMessages.getString("PostfixLabelProvider.exact_singular"); 
	}
	private String getPluralLabel(Object element) {
		if (hasPotentialMatches(element))
			return SearchMessages.getString("PostfixLabelProvider.potential_plural"); 
		return SearchMessages.getString("PostfixLabelProvider.exact_plural"); 
	}
	private String internalGetText(Object element) {
		String text= getLabelProvider().getText(element);
		if (text != null && !"".equals(text)) 
			return text;
		return getParticipantText(element);	}
	private boolean isSameInformation(Object realParent, Object lastElement) {
		if (lastElement instanceof IType) {
			IType type= (IType)lastElement;
			if (realParent instanceof IClassFile) {
				if (type.getClassFile().equals(realParent))
					return true;
			} else if (realParent instanceof ICompilationUnit) {
				if (type.getCompilationUnit().equals(realParent))
					return true;
			}
		}
		return false;
	}
}