Bug 5128 JavaUI.revealInEditor doesn't handle ICompilationUnits properly
When calling JavaUI.revealInEditor with an ICompilationUnit, then the package declaration is revealed. This isn't useful, passing an ICompilationUnit should be treated as a no-op. Otherwise clients need to guard against revealing the package declaration in their code (see OpenResourceAction as an example)
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaEditor.java
if (moveCursor)
			resetHighlightRange();
	}
		
	public void setSelection(ISourceReference reference) {
		
		if (reference == null)
			return;
		
		try {
			ISourceRange range= reference.getSourceRange();
			if (range == null) {
				return;
			}
			
			reference= getJavaSourceReferenceAt(range.getOffset());
		} catch (JavaModelException x) {
			
		}
		
		if (reference == null)
			return;
			
		
		setSelection(reference, true);
		
		
		if (fOutlinePage != null) {
			fOutlinePage.removeSelectionChangedListener(this);