Bug 33390 No New menu when selecting file
build RC1 When I select a file in the Package Expliorer I should be able to create a new element when poping up the context menu. The parent of the new element should be the parent of the selected file. See Navigator behavior.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/actions/NewWizardsActionGroup.java
ISelection selection= getContext().getSelection();
		if (selection instanceof IStructuredSelection) {
			IStructuredSelection sel= (IStructuredSelection) selection;
			if (sel.size() <= 1 && isNewTarget(sel.getFirstElement())) {
				IMenuManager newMenu= new MenuManager(ActionMessages.getString("NewWizardsActionGroup.new")); 
				menu.appendToGroup(IContextMenuConstants.GROUP_NEW, newMenu);
				new NewWizardMenu(newMenu, fSite.getWorkbenchWindow(), false);
			}
		}		
		
	}
	
	private boolean isNewTarget(Object element) {
		if (element == null)
			return true;
		if (element instanceof IContainer) {
			return true;
		}
		if (element instanceof IJavaElement) {
			int type= ((IJavaElement)element).getElementType();
			return type == IJavaElement.JAVA_PROJECT ||
				type == IJavaElement.PACKAGE_FRAGMENT_ROOT || 
				type == IJavaElement.PACKAGE_FRAGMENT ||
				type == IJavaElement.COMPILATION_UNIT ||
				type == IJavaElement.TYPE;
		}
		return false;
	}	
}