Bug 70412 [api] Formatting a large file makes Eclipse freeze (enabling/disabling of partitioning updating)
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/FormatAllAction.java
ICompilationUnit[] cus= getCompilationUnits(selection);
		if (cus.length == 0)
			return;
		if (cus.length > 1) {
			int returnCode= OptionalMessageDialog.open("FormatAll",  
					getShell(), 
					ActionMessages.getString("FormatAllAction.noundo.title"), 
					null,
					ActionMessages.getString("FormatAllAction.noundo.message"),  
					MessageDialog.WARNING, 		
					new String[] {IDialogConstants.OK_LABEL, IDialogConstants.CANCEL_LABEL}, 
					0);
			if (returnCode != OptionalMessageDialog.NOT_SHOWN && 
					returnCode != Window.OK ) return;
		}
				
		IStatus status= Resources.makeCommittable(getResources(cus), getShell());
		if (!status.isOK()) {
			ErrorDialog.openError(getShell(), ActionMessages.getString("FormatAllAction.failedvalidateedit.title"), ActionMessages.getString("FormatAllAction.failedvalidateedit.message"), status); 
			return;
		}
		
		runOnMultiple(cus);
	}
	private IResource[] getResources(ICompilationUnit[] cus) {
		IResource[] res= new IResource[cus.length];
		for (int i= 0; i < res.length; i++) {
			res[i]= cus[i].getResource();
		}
		return res;