if (!ExceptionHandler.handle(e.getTargetException(), getActionName(), JavaPlugin.getResourceString(SAVE_EDITORS_EXCEPTION))) { MessageDialog.openError(JavaPlugin.getActiveWorkbenchShell(), "Error", e.getMessage());
if (!ExceptionHandler.handle(e.getTargetException(), getActionName(), ReorgMessages.getString("ReorgAction.exception.saving"))) { MessageDialog.openError(JavaPlugin.getActiveWorkbenchShell(), ReorgMessages.getString("ReorgAction.error.title"), e.getMessage());
	protected boolean ensureSaved(final List elements) {		final List unsavedEditors= new ArrayList();		final List unsavedElements= new ArrayList();				collectUnsavedEditors(elements, unsavedEditors, unsavedElements);				if (unsavedEditors.size() == 0)			return true;					int labelFlags= JavaElementLabelProvider.SHOW_DEFAULT | JavaElementLabelProvider.SHOW_CONTAINER_QUALIFICATION 					| JavaElementLabelProvider.SHOW_POSTIFIX_QUALIFICATION;		Shell parent= JavaPlugin.getActiveWorkbenchShell();					ListSelectionDialog dialog= new ListSelectionDialog(parent, unsavedElements, new ListContentProvider(), 			new JavaElementLabelProvider(labelFlags), getSaveTargetsMessage());		dialog.setInitialSelections(unsavedElements.toArray());		if (dialog.open() != dialog.OK)			return false;		final Object[] elementsToSave= dialog.getResult();		final int nrFiles= elementsToSave.length;		ProgressMonitorDialog pmd= new ProgressMonitorDialog(JavaPlugin.getActiveWorkbenchShell());		IRunnableWithProgress r= new IRunnableWithProgress() {			public void run(IProgressMonitor pm) {				pm.beginTask(JavaPlugin.getResourceString(SAVE_TARGETS_PROGRESS), nrFiles*10);				for (int i= 0; i < nrFiles; i++) {					int index= elements.indexOf(elementsToSave[i]);										IEditorPart editor= (IEditorPart)unsavedEditors.get(index);					editor.doSave(new SubProgressMonitor(pm, 10));				}				pm.done();			}		};		try {			pmd.run(false, false, r);		} catch (InvocationTargetException e) {			if (!ExceptionHandler.handle(e.getTargetException(), getActionName(), JavaPlugin.getResourceString(SAVE_EDITORS_EXCEPTION))) {				MessageDialog.openError(JavaPlugin.getActiveWorkbenchShell(), "Error", e.getMessage());			}			return false;		} catch (InterruptedException e) {		}		return true;	}