Bug 28474 selection in packages view incorrect when switching editors
use project swt in source for example. 1) open an editor for cu COM in org.eclipse.swt.internal.ole.win32. open an editor for a cu in a different project. 3)make sure browsing view is linked to editor 2)make sure packages view is in hierarchical mode. 3)click in package explorer on project swt. DO NOT expand in packages view. 4)now bring the editor for COM to top. Notice the expansion in the packages view is not complete. Ie. the logical package org.eclipse.swt.internal.ole.win23 is not visible and highlighted. 20021216. JRT.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/PackagesView.java
hookViewerListeners();
		
		viewer.setContentProvider(createContentProvider());
		
		initDragAndDrop();
		
	}
	
	protected JavaElementSorter createJavaElementSorter() {
		return new JavaElementSorter(){
			public int category(Object element) {
				if (element instanceof LogicalPackage) {
					LogicalPackage cp= (LogicalPackage) element;
					return super.category(cp.getFragments()[0]);
				} else return super.category(element);
			}
			public int compare(Viewer viewer, Object e1, Object e2){
				if (e1 instanceof LogicalPackage) {
					LogicalPackage cp= (LogicalPackage) e1;
					e1= cp.getFragments()[0];
				}
				if (e2 instanceof LogicalPackage) {
					LogicalPackage cp= (LogicalPackage) e2;
					e2= cp.getFragments()[0];
				}
				return super.compare(viewer, e1, e2);
			}
		};