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
int p1= getClassPathIndex(root1);
				int p2= getClassPathIndex(root2);
				if (p1 != p2) {
					return p1 - p2;
				}
			}
			e1= root1; 
			e2= root2;
		}
		
		if (cat1 == PROJECTS || cat1 == RESOURCES || cat1 == RESOURCEFOLDERS || cat1 == STORAGE || cat1 == OTHERS) {
			return compareWithLabelProvider(viewer, e1, e2);
		}
		
		if (e1 instanceof IMember) {
			if (fMemberOrderCache.isSortByVisibility()) {
				try {
					int flags1= JdtFlags.getVisibilityCode((IMember) e1);
					int flags2= JdtFlags.getVisibilityCode((IMember) e2);
					int vis= fMemberOrderCache.getVisibilityIndex(flags1) - fMemberOrderCache.getVisibilityIndex(flags2);
					if (vis != 0) {
						return vis;
					}
				} catch (JavaModelException ignore) {
				}
			}
		}
		
		String name1= ((IJavaElement) e1).getElementName();
		String name2= ((IJavaElement) e2).getElementName();