Bug 29755 Attach source does not allow one to select a folder... [build path]
When opening some .class that does not yet have a source attachment eclipse shows a text version of the interface defintion and a button for Attaching source. When pressing this button a window appaer where one can enter the name/location of a folder, zip or jar for the source. There are also a button for choosing it via a file selection dialog and this works fine for zip and jar files - but not for selecting a directory :( Workaround is just to enter the directory manually.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/SourceAttachmentBlock.java
if (ArchiveFileFilter.isArchivePath(currPath)) {
				currPath= currPath.removeLastSegments(1);
			}
		
			FileDialog dialog= new FileDialog(getShell());
			dialog.setText(NewWizardMessages.getString("SourceAttachmentBlock.extjardialog.text")); 
			dialog.setFilterExtensions(new String[] {"*.jar;*.zip"}); 
			dialog.setFilterPath(currPath.toOSString());
			String res= dialog.open();
			if (res != null) {
				return new Path(res).makeAbsolute();
			}
		}
		return null;
	}
	/*
	 * Opens a dialog to choose an internal jar.
	 */	
	private IPath chooseInternalJarFile() {
		String initSelection= fFileNameField.getText();
		
		Class[] acceptedClasses= new Class[] { IFolder.class, IFile.class };
		TypedElementSelectionValidator validator= new TypedElementSelectionValidator(acceptedClasses, false);
	
		ViewerFilter filter= new ArchiveFileFilter(null, false);
		ILabelProvider lp= new WorkbenchLabelProvider();
		ITreeContentProvider cp= new WorkbenchContentProvider();
		IResource initSel= null;
		if (initSelection.length() > 0) {