Bug 73975 Search View displays potential match instead of accurate one [search]
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/SearchLabelProvider.java
import org.eclipse.search.internal.ui.SearchPlugin;
import org.eclipse.search.internal.ui.SearchPreferencePage;
import org.eclipse.search.ui.text.AbstractTextSearchResult;
import org.eclipse.search.ui.text.Match;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.graphics.Image;
public abstract class SearchLabelProvider extends LabelProvider implements IColorProvider, IPropertyChangeListener {
	public static final String PROPERTY_MATCH_COUNT= "org.eclipse.jdt.search.matchCount"; 
	private Color fPotentialMatchFgColor;
	private Map fLabelProviderMap;
	
	protected JavaSearchResultPage fPage;
	private AppearanceAwareLabelProvider fLabelProvider;
	public SearchLabelProvider(JavaSearchResultPage page, AppearanceAwareLabelProvider inner) {
		fPage= page;
		fLabelProvider= inner;
		fLabelProviderMap= new HashMap(5);
		fLabelProvider.addLabelDecorator(new ProblemsLabelDecorator());
		SearchPlugin.getDefault().getPreferenceStore().addPropertyChangeListener(this);
	}
	
	public void propertyChange(PropertyChangeEvent event) {
		if (fPotentialMatchFgColor == null)
			return;
		if (SearchPreferencePage.POTENTIAL_MATCH_FG_COLOR.equals(event.getProperty()) || SearchPreferencePage.EMPHASIZE_POTENTIAL_MATCHES.equals(event.getProperty())) {
			fPotentialMatchFgColor.dispose();
			fPotentialMatchFgColor= null;
			LabelProviderChangedEvent lpEvent= new LabelProviderChangedEvent(SearchLabelProvider.this, null); 
			fireLabelProviderChanged(lpEvent);
		}