Bug 61198 References in Project: Title shows wrong project
I200405060200 1. in the Java editor select a type from project A which comes not from the same project as the opened file (project B). 2. search for refs in project ==> title says project A, matches are from B
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/JavaSearchScopeFactory.java
}
	private IEditorInput getActiveEditorInput() {
		IWorkbenchPage page= JavaPlugin.getActivePage();
		if (page != null) {
			IEditorPart editor= page.getActiveEditor();
			if (editor != null && editor.equals(page.getActivePart())) {
				return editor.getEditorInput();
			}
		}
		return null;
	}
	private IJavaSearchScope internalCreateProjectScope(IEditorInput editorInput, boolean includeJRE) {
		IAdaptable inputElement = getEditorInputElement(editorInput);
		StructuredSelection selection;
		if (inputElement != null) {
			selection= new StructuredSelection(inputElement);
		} else {
			selection= StructuredSelection.EMPTY;
		}
		return internalCreateProjectScope(selection, includeJRE);
	}
	
	private IAdaptable getEditorInputElement(IEditorInput editorInput) {
		IAdaptable inputElement= null;
		if (editorInput instanceof IClassFileEditorInput) {
			inputElement= ((IClassFileEditorInput)editorInput).getClassFile();
		} else if (editorInput instanceof IFileEditorInput) {
			inputElement= ((IFileEditorInput)editorInput).getFile();
		}
		return inputElement;