Bug 37467 Add Types/Source/Organize Imports [code manipulation]
Please add a Types/Source/Organize Imports menu item and make sure it is enabled when _multiple_ types are selected. We use this nice feature all the time but this would make it easier to use. Thanks.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/OrganizeImportsAction.java
case IJavaElement.PACKAGE_FRAGMENT_ROOT:
							IPackageFragmentRoot root= (IPackageFragmentRoot) elem.getAncestor(IJavaElement.PACKAGE_FRAGMENT_ROOT);
							return (root.getKind() == IPackageFragmentRoot.K_SOURCE);
						case IJavaElement.JAVA_PROJECT:
							return hasSourceFolders((IJavaProject) elem);
					}
				}
			} catch (JavaModelException e) {
				JavaPlugin.log(e);
			}
		}
		return false;
	}
	
	private boolean hasSourceFolders(IJavaProject project) throws JavaModelException {
		IPackageFragmentRoot[] roots= project.getPackageFragmentRoots();
		for (int i= 0; i < roots.length; i++) {
			IPackageFragmentRoot root= roots[i];
			if (root.getKind() == IPackageFragmentRoot.K_SOURCE) {
				return true;
			}
		}
		return false;
	}
	/* (non-Javadoc)
	 * Method declared on SelectionDispatchAction.
	 */
	public void run(ITextSelection selection) {
		run(getCompilationUnit(fEditor));
	}