Bug 44411 NPE in JavaSearchResultCollector [search]
Build 20030930 JavaSearchResultCollector.fView is null: Thread [ModalContext] (Suspended (exception NullPointerException)) JavaSearchResultCollector.accept(IResource, int, int, IJavaElement, int) line: 130 MatchLocator.report(IResource, int, int, IJavaElement, int) line: 923 MatchLocator.report(int, int, IJavaElement, int) line: 916 MatchLocator.reportAccurateReference(int, int, char[][], IJavaElement, int) line: 984 TypeReferenceLocator.matchReportReference(ArrayTypeReference, IJavaElement, int, MatchLocator) line: 162 TypeReferenceLocator.matchReportReference(AstNode, IJavaElement, int, MatchLocator) line: 176 MatchLocator.reportMatching(AbstractMethodDeclaration, IJavaElement, int, boolean, MatchingNodeSet) line: 1155 MatchLocator.reportMatching(TypeDeclaration, IJavaElement, int, MatchingNodeSet) line: 1330 MatchLocator.reportMatching(CompilationUnitDeclaration, boolean) line: 1216 MatchLocator.process(PossibleMatch, boolean) line: 857 MatchLocator.locateMatches(JavaProject, PossibleMatch[], int, int) line: 590 MatchLocator.locateMatches(JavaProject, PossibleMatchSet) line: 627 MatchLocator.locateMatches(String[], IWorkspace, ICompilationUnit[]) line: 714 SearchEngine.search(IWorkspace, ISearchPattern, IJavaSearchScope, IJavaSearchResultCollector) line: 568 SearchEngine.search(IWorkspace, IJavaElement, int, IJavaSearchScope, IJavaSearchResultCollector) line: 495 JavaSearchOperation.execute(IProgressMonitor) line: 96 WorkspaceModifyOperation$1.run(IProgressMonitor) line: 71 Workspace.run(IWorkspaceRunnable, ISchedulingRule, IProgressMonitor) line: 1555 Workspace.run(IWorkspaceRunnable, IProgressMonitor) line: 1572 JavaSearchOperation(WorkspaceModifyOperation).run(IProgressMonitor) line: 85 ModalContext$ModalContextThread.run() line: 101
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/JavaSearchResultCollector.java
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.actions.ActionGroup;
import org.eclipse.search.ui.IActionGroupFactory;
import org.eclipse.search.ui.ISearchResultView;
import org.eclipse.search.ui.SearchUI;
import org.eclipse.jdt.core.ICompilationUnit;
import org.eclipse.jdt.core.IJavaElement;
import org.eclipse.jdt.core.IMember;
import org.eclipse.jdt.core.JavaCore;
import org.eclipse.jdt.core.search.IJavaSearchResultCollector;
import org.eclipse.jdt.ui.JavaUI;
import org.eclipse.jdt.internal.ui.JavaPlugin;
import org.eclipse.jdt.internal.ui.dialogs.OptionalMessageDialog;
public class JavaSearchResultCollector implements IJavaSearchResultCollector {
	private static final String MATCH= SearchMessages.getString("SearchResultCollector.match"); 
	private static final String MATCHES= SearchMessages.getString("SearchResultCollector.matches"); 
	private static final String DONE= SearchMessages.getString("SearchResultCollector.done"); 
	private static final String SEARCHING= SearchMessages.getString("SearchResultCollector.searching"); 
	private static final Boolean POTENTIAL_MATCH_VALUE= new Boolean(true);
	private static final String POTENTIAL_MATCH_DIALOG_ID= "Search.PotentialMatchDialog"; 
	
	private IProgressMonitor fMonitor;
	private ISearchResultView fView;
	private JavaSearchOperation fOperation;
	private int fMatchCount= 0;
	private int fPotentialMatchCount= 0;
	private long fLastUpdateTime;
	private Integer[] fMessageFormatArgs= new Integer[1];
	
	private class ActionGroupFactory implements IActionGroupFactory {