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
private static ICompilationUnit getCompilationUnit(JavaEditor editor) {
		IWorkingCopyManager manager= JavaPlugin.getDefault().getWorkingCopyManager();
		ICompilationUnit cu= manager.getWorkingCopy(editor.getEditorInput());
		return cu;
	}
	
	/* (non-Javadoc)
	 * Method declared on SelectionDispatchAction.
	 */
	public void run(IStructuredSelection selection) {
		ICompilationUnit[] cus= getCompilationUnits(selection);
		if (cus.length == 1) {
			run(cus[0]);
		} else {
			runOnMultiple(cus);
		}
	}
	private void runOnMultiple(final ICompilationUnit[] cus) {
		try {
			String message= ActionMessages.getString("OrganizeImportsAction.multi.status.description"); 
			final MultiStatus status= new MultiStatus(JavaUI.ID_PLUGIN, Status.OK, message, null);
			
			ProgressMonitorDialog dialog= new ProgressMonitorDialog(getShell());
			dialog.run(true, true, new WorkbenchRunnableAdapter(new IWorkspaceRunnable() {
				public void run(IProgressMonitor monitor) {
					doRunOnMultiple(cus, status, monitor);
				}
			}));
			if (!status.isOK()) {
				String title= ActionMessages.getString("OrganizeImportsAction.multi.status.title");