Bug 12585 Packages view should not provide file and resource transfer if Java element below CU is selected
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageExplorerPart.java
if (input instanceof IFile) 
			element= JavaCore.create((IFile)input);
			
		if (element == null) 
			element= input;
			
		if (element != null) {
			
			
			IStructuredSelection oldSelection= (IStructuredSelection)getSelection();
			if (oldSelection.size() == 1) {
				Object o= oldSelection.getFirstElement();
				if (o instanceof IMember) {
					IMember m= (IMember)o;
					if (element.equals(m.getCompilationUnit()))
						return;
					if (element.equals(m.getClassFile())) 
						return;
				}
			}
			ISelection newSelection= new StructuredSelection(element);
			if (!fViewer.getSelection().equals(newSelection)) {
				try {
					fViewer.removeSelectionChangedListener(fSelectionListener);
					fViewer.setSelection(newSelection);
				} finally {
					fViewer.addSelectionChangedListener(fSelectionListener);
				}
			}