Bug 8808 Class folder: Must use create to add an existing folder
Build I20020129 "Add Folders..." does not show the project itself. I have to do the following trick to add an existing folder as class folder: Press "Create folder" Enter the name of the existing folder (hopfully it's in the project root :-) Voila BTW: I can't do this a second time - the UI tells me it already exists - which is OK. To be consistent with other dialogs "Create Folder" should always warn about existing projects.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/LibrariesWorkbookPage.java
elem.setIsMissing((resolvedPath == null) || !resolvedPath.toFile().isFile());
			return new CPListElement[] { elem };
		}
		return null;
	}
	
	
	private void addAttachmentsFromExistingLibs(CPListElement elem) {
		try {
			IJavaModel jmodel= fCurrJProject.getJavaModel();
			IJavaProject[] jprojects= jmodel.getJavaProjects();
			for (int i= 0; i < jprojects.length; i++) {
				IJavaProject curr= jprojects[i];
				if (!curr.equals(fCurrJProject)) {
					IClasspathEntry[] entries= curr.getRawClasspath();
					for (int k= 0; k < entries.length; k++) {
						IClasspathEntry entry= entries[k];
						if (entry.getEntryKind() == elem.getEntryKind()
							&& entry.getPath().equals(elem.getPath())) {
							IPath attachPath= entry.getSourceAttachmentPath();
							if (attachPath != null && !attachPath.isEmpty()) {
								elem.setSourceAttachment(attachPath, entry.getSourceAttachmentRootPath());
								return;
							}
						}
					}
				}
			}
		} catch (JavaModelException e) {
			JavaPlugin.log(e.getStatus());