Bug 50911 New search: can't search for a search result
I20040128 (5pm) -> New search view turned on The "search" context menu doesn't appear on selections in the search results view. I use this frequently for back-tracing when browsing code. Search for references to a method, and then search for references to the referencing method, etc. Ctrl+Shift+G to search on a selection in the search results view also used to work.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/FindAction.java
}
		if (type != null) {
			ICompilationUnit cu= type.getCompilationUnit();
			if (cu == null)
				return type;
				
			IType wcType= (IType)getWorkingCopy(type);
			if (wcType != null)
				return wcType;
			else
				return type;
		}
		return null;
	}
	
	/**
	 * Tries to find the given element in a working copy.
	 */
	private IJavaElement getWorkingCopy(IJavaElement input) {
		try {
			if (input instanceof ICompilationUnit)
				return EditorUtility.getWorkingCopy((ICompilationUnit)input);
			else
				return EditorUtility.getWorkingCopy(input, true);
		} catch (JavaModelException ex) {
		}
		return null;
	}
}