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/ui/actions/ImportActionGroup.java
* 
 * @sine 2.0
 */
public class ImportActionGroup extends ActionGroup {
	private static final String GROUP_IMPORT= "group.import";
	private ImportResourcesAction fImportAction;
	private ExportResourcesAction fExportAction;
	/**
	 * Creates a new <code>ImportActionGroup</code>.
	 * 
	 * @param part the view part that owns this action group
	 */
	public ImportActionGroup(IViewPart part) {
		IWorkbench workbench = part.getSite().getWorkbenchWindow().getWorkbench();
		fImportAction= new ImportResourcesAction(workbench);
		fExportAction= new ExportResourcesAction(workbench);			
	}
	
	/* (non-Javadoc)
	 * Method declared in ActionGroup
	 */
	public void fillContextMenu(IMenuManager menu) {
		IStructuredSelection selection= getStructuredSelection();
		if (selection == null)
			return;
			
		if (checkSelection(selection)) {
			menu.appendToGroup(IContextMenuConstants.GROUP_REORGANIZE, new Separator(GROUP_IMPORT));
			if (selection.size() == 1)
				menu.appendToGroup(GROUP_IMPORT, fImportAction);