Bug 17045 Import/Export should always be on context menu of Packages view (or never)
Build 20020521 The Packages view does only include Import when a container is selected. It only includes Export when a container or file is selected. When the selection is empty, neither appear. The Navigator always includes Import/Export on the context menu. Filtering these action based on the selection makes too many assumptions about the kinds of available importers / exporters. For example, the importers for external projects and binary projects ignore the selection. Therefore, I currently cannot import binary projects via the packages view when my workspace is empty. Either these actions should always be included (and enabled), or always excluded.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/ImportActionGroup.java
private int checkSelection(IStructuredSelection selection) {
		int result= 0;
		for (Iterator iter= selection.iterator(); iter.hasNext();) {
			Object element= (Object) iter.next();
			if (element instanceof IJavaElement) {
				int type= ((IJavaElement)element).getElementType();
				switch (type) {
					case IJavaElement.JAVA_PROJECT:
					case IJavaElement.PACKAGE_FRAGMENT_ROOT:
					case IJavaElement.PACKAGE_FRAGMENT:
						result= result | IMPORT_EXPORT;
						break;
					case IJavaElement.COMPILATION_UNIT:
						result= result | EXPORT;
						break;
					default:
						return FAILED;
				}
			} else if (element instanceof IContainer) {
				result= result | IMPORT_EXPORT;
			} else if (element instanceof IFile) {
				result= result | EXPORT;
			} else {
				return FAILED;
			}
		}
		return result;
	}
}