Bug 15301 'show in packages view' - does not work fo java files not in source folders
20020502 open a java file that is in a resource folder (so it is not an ICompilationUnit - just a file with .java extension) 'show in packages view' is present in the context menu but it does nothing
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/BaseJavaElementContentProvider.java
protected boolean isClassPathChange(IJavaElementDelta delta) {
		int flags= delta.getFlags();
		return (delta.getKind() == IJavaElementDelta.CHANGED && 
			((flags & IJavaElementDelta.F_ADDED_TO_CLASSPATH) != 0) ||
			 ((flags & IJavaElementDelta.F_REMOVED_FROM_CLASSPATH) != 0) ||
			 ((flags & IJavaElementDelta.F_CLASSPATH_REORDER) != 0));
	}
	
	
	/**
	 * Returns parent of the presented hierarchy. Skips over 
	 * project package fragment root nodes.
	 */
	protected Object skipProjectPackageFragmentRoot(IPackageFragmentRoot root) {
		try {
			if (isProjectPackageFragmentRoot(root))
				return root.getParent(); 
			return root;
		} catch(JavaModelException e) {
			return root;
		}
	}
	
	protected boolean isPackageFragmentEmpty(IJavaElement element) throws JavaModelException {
		if (element instanceof IPackageFragment) {
			IPackageFragment fragment= (IPackageFragment)element;
			if (!(fragment.hasChildren() || fragment.getNonJavaResources().length > 0) && fragment.hasSubpackages()) 
				return true;
		}
		return false;