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
/*******************************************************************************
 * Copyright (c) 2000, 2004 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials 
 * are made available under the terms of the Common Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/cpl-v10.html
 * 
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
package org.eclipse.jdt.internal.ui.search;
import java.text.MessageFormat;
import org.eclipse.jdt.core.IClassFile;
import org.eclipse.jdt.core.ICompilationUnit;
import org.eclipse.jdt.core.IJavaModel;
import org.eclipse.jdt.core.IType;
import org.eclipse.jdt.internal.ui.viewsupport.AppearanceAwareLabelProvider;
import org.eclipse.jdt.internal.ui.viewsupport.JavaElementLabels;
import org.eclipse.jface.viewers.ITreeContentProvider;
import org.eclipse.swt.graphics.Image;
public class PostfixLabelProvider extends SearchLabelProvider {
	private ITreeContentProvider fContentProvider;
	
	public PostfixLabelProvider(JavaSearchResultPage page) {
		super(page, new AppearanceAwareLabelProvider(AppearanceAwareLabelProvider.DEFAULT_TEXTFLAGS | JavaElementLabels.P_COMPRESSED, AppearanceAwareLabelProvider.DEFAULT_IMAGEFLAGS));
		fContentProvider= new LevelTreeContentProvider.FastJavaElementProvider();
	}