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
else if (input instanceof Collection) {
			if (((Collection)input).isEmpty())
				setTitleImage(fOriginalTitleImage);
			else {
				Object firstElement= ((Collection)input).iterator().next();
				setTitleImage(fTitleProvider.getImage(firstElement));
			}
		} else
			setTitleImage(fTitleProvider.getImage(input));
		setViewerInput(input);
		updateTitle();
	}
	private void setViewerInput(Object input) {
		fProcessSelectionEvents= false;
		fViewer.setInput(input);
		fProcessSelectionEvents= true;
	}
	void updateTitle() {
		setTitleToolTip(getToolTipText(fViewer.getInput()));
	}
	/**
	 * Returns the tool tip text for the given element.
	 */
	String getToolTipText(Object element) {
		String result;
		if (!(element instanceof IResource)) {
			result= JavaElementLabels.getTextLabel(element, StandardJavaUILabelProvider.DEFAULT_TEXTFLAGS);		
		} else {
			IPath path= ((IResource) element).getFullPath();
			if (path.isRoot()) {