Bug 35381 Newly added items are not inserted at correct position in package explorer
I20030319 (RC3) On MacOS X: - create new Java project "test" - select project - create folder "A" inside this project Observe: "A" shows up as last child of "test" - collapse tree node "test" - exapnd tree node "test" Observe: now "A" shows up at correct position
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/JavaElementSorter.java
}
	
	/*
	 * @see ViewerSorter#compare
	 */
	public int compare(Viewer viewer, Object e1, Object e2) {
		int cat1= category(e1);
		int cat2= category(e2);
		if (cat1 != cat2)
			return cat1 - cat2;
		
		if (cat1 == PROJECTS) {
			IWorkbenchAdapter a1= (IWorkbenchAdapter)((IAdaptable)e1).getAdapter(IWorkbenchAdapter.class);
			IWorkbenchAdapter a2= (IWorkbenchAdapter)((IAdaptable)e2).getAdapter(IWorkbenchAdapter.class);
				return getCollator().compare(a1.getLabel(e1), a2.getLabel(e2));
		}
			
		if (cat1 == PACKAGEFRAGMENTROOTS) {
			IPackageFragmentRoot root1= getPackageFragmentRoot(e1);
			IPackageFragmentRoot root2= getPackageFragmentRoot(e2);
			if (root1 == null) {
				if (root2 == null) {
					return 0;
				} else {
					return 1;
				}
			} else if (root2 == null) {
				return -1;
			}			
			if (!root1.getPath().equals(root2.getPath())) {