Bug 39953 Navigator sort wrong in Java Source Attachment -> Workspace
If you rc a jar file, properties, java source attachment, and then click workspace, and then navigate to a lib directory which contains sub directories, the subdirectories and files are treated as items and sorted whereas in the main navigator subdirectories are given higher sort order over file items.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/FolderSelectionDialog.java
private IContainer fSelectedContainer;
	public FolderSelectionDialog(Shell parent, ILabelProvider labelProvider, ITreeContentProvider contentProvider) {
		super(parent, labelProvider, contentProvider);
	}
	/* (non-Javadoc)
	 * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite)
	 */
	protected Control createDialogArea(Composite parent) {
		Composite result= (Composite)super.createDialogArea(parent);
		
		getTreeViewer().addSelectionChangedListener(this);
		
		Button button = new Button(result, SWT.PUSH);
		button.setText(NewWizardMessages.getString("FolderSelectionDialog.button")); 
		button.addSelectionListener(new SelectionAdapter() {
			public void widgetSelected(SelectionEvent event) {
				newFolderButtonPressed();
			}
		});
		button.setFont(parent.getFont());
		GridData data= new GridData();
		data.heightHint = convertVerticalDLUsToPixels(IDialogConstants.BUTTON_HEIGHT);
		button.setLayoutData(data);
		fNewFolderButton= button;
		
		applyDialogFont(result);		
		return result;
	}
	private void updateNewFolderButtonState() {
		IStructuredSelection selection= (IStructuredSelection) getTreeViewer().getSelection();