Bug 81505 Search Again throws NPE if a search query cannot be rerun
I200412162000 - new workspace, new Java Propject with CU p/A.java: package p; public class A {} - Find identifier occurrences for A - activate the search result view and don't open the context menu - press F5 -> the problem seems to be that the query is rerun although it answers false to canRerun() Error 2004-12-17 12:04:49.929 An internal error occurred during: "Search for Occurrences in File". java.lang.NullPointerException at org.eclipse.jdt.internal.ui.search.OccurrencesSearchQuery.run(OccurrencesSearchQuery.java:46) at org.eclipse.search2.internal.ui.InternalSearchUI$InternalSearchJob.run(InternalSearchUI.java:85) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:66)
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/OccurrencesSearchQuery.java
String getSingularLabel() {
		return fSingularLabel;
	}
	
	String getPluralLabelPattern() {
		return fPluralLabelPattern;
	}
	
	/*
	 * @see org.eclipse.search.ui.ISearchQuery#canRerun()
	 */
	public boolean canRerun() {
		return false; 
	}
	/*
	 * @see org.eclipse.search.ui.ISearchQuery#canRunInBackground()
	 */
	public boolean canRunInBackground() {
		return true;
	}
	/*
	 * @see org.eclipse.search.ui.ISearchQuery#getSearchResult()
	 */
	public ISearchResult getSearchResult() {
		if (fResult == null)
			fResult= new OccurrencesSearchResult(this);
		return fResult;
	}
}