Bug 5093 Lost exported classpath entries
Build 205 1. Create new java project 2. Open build path properties 3. Check JRE_LIB so it is exported 4. Press OK 5. Open build path properties again Observe: JRE_LIB is not exported (but it is according to the .classpath) If you press OK without paying attention, you will loose the fact that JRE_LIB was exported.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/JavaElementSorter.java
package org.eclipse.jdt.internal.ui.viewsupport;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.jface.viewers.ViewerSorter;
import org.eclipse.core.resources.IContainer;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.IStorage;
import org.eclipse.jdt.core.Flags;
import org.eclipse.jdt.core.IClasspathEntry;
import org.eclipse.jdt.core.IField;
import org.eclipse.jdt.core.IInitializer;
import org.eclipse.jdt.core.IJavaElement;
import org.eclipse.jdt.core.IMethod;
import org.eclipse.jdt.core.IPackageFragment;
import org.eclipse.jdt.core.IPackageFragmentRoot;
import org.eclipse.jdt.core.IType;
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jdt.internal.ui.JavaPlugin;
import org.eclipse.jdt.internal.ui.util.JavaModelUtil;
/**
 * Sorts Java elements:
 * Package fragment roots are sorted as ordered in the classpath.
 */
public class JavaElementSorter extends ViewerSorter {
	
	private static final int CU_MEMBERS=	0;