Bug 41523 Keep Order of libs when editing library [build path]
When I edit a library in the Properties dialog of my project using "Properties"->"Java Build Path"->"Libraries"->"Edit", e.g. changing the JRE from 1.4 to 1.3, or changing from an old version of a JAR to a newer one, the changed library is at the last position in the classpath. It should kept at the position it was.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/LibrariesWorkbookPage.java
elem.setIsMissing((resolvedPath == null) || !resolvedPath.toFile().exists());
					if (!existingElements.contains(elem)) {
						result.add(elem);
					}
				}
				return (CPListElement[]) result.toArray(new CPListElement[result.size()]);
			}
		} else {
			List existingElements= fLibrariesList.getElements();
			ArrayList existingPaths= new ArrayList(existingElements.size());
			for (int i= 0; i < existingElements.size(); i++) {
				CPListElement elem= (CPListElement) existingElements.get(i);
				if (elem.getEntryKind() == IClasspathEntry.CPE_VARIABLE) {
					existingPaths.add(elem.getPath());
				}
			}
			EditVariableEntryDialog dialog= new EditVariableEntryDialog(getShell(), existing.getPath(), existingPaths);
			dialog.setTitle(NewWizardMessages.getString("LibrariesWorkbookPage.VariableSelectionDialog.edit.title")); 
			if (dialog.open() == Window.OK) {
				CPListElement elem= new CPListElement(fCurrJProject, IClasspathEntry.CPE_VARIABLE, dialog.getPath(), null);
				return new CPListElement[] { elem };
			}
		}
		return null;
	}
	private CPListElement[] openContainerSelectionDialog(CPListElement existing) {
		IClasspathEntry elem= null;
		String title;
		if (existing == null) {
			title= NewWizardMessages.getString("LibrariesWorkbookPage.ContainerDialog.new.title");