Bug 15157 New-> menu disappears when folder is selected
Build: 20020501 The New-> menu in the packages view is not added to the pop-up menu when a folder is selected. It is added when a source folder is selected.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/JavaBrowsingPart.java
setSelection(new StructuredSelection(elementToSelect), true);
			fPreviousSelectionProvider= part;
			return;
		}
		
		
		if (part != fPreviousSelectionProvider && selectedElement != null && !selectedElement.equals(currentInput) && isInputResetBy(selectedElement, currentInput, part)) {
			if (!isAncestorOf(selectedElement, currentInput))
				setInput(null);
			fPreviousSelectionProvider= part;
			return;
		} else	if (selection.isEmpty() && !isInputResetBy(part)) {
			fPreviousSelectionProvider= part;
			return;
		} else if (selectedElement == null && part == fPreviousSelectionProvider) {
			setInput(null);
			fPreviousSelectionProvider= part;
			return;
		}
		fPreviousSelectionProvider= part;
		
		 
		if (selectedElement instanceof IJavaElement)
			adjustInputAndSetSelection((IJavaElement)selectedElement);
		else
			setSelection(StructuredSelection.EMPTY, true);
	}
	protected void setInput(Object input) {
		if (input == null)
			setTitleImage(fOriginalTitleImage);