ICompilationUnit original= (ICompilationUnit) unit.getOriginalElement();  if (fSavePolicy != null) fSavePolicy.preSave(original);  super.doSave(progressMonitor);  if (fSavePolicy != null) fSavePolicy.postSave(original);
try {  p.aboutToChange(getEditorInput()); operation.run(progressMonitor);  } catch (InterruptedException x) { } catch (InvocationTargetException x) {  Shell shell= getSite().getShell(); String title= getResourceString("Error.save.title"); String msg= getResourceString("Error.save.message");  Throwable t= x.getTargetException(); if (t instanceof CoreException) { CoreException cx= (CoreException) t; ErrorDialog.openError(shell, title, msg, cx.getStatus()); } else { MessageDialog.openError(shell, title, msg + t.getMessage()); }  } finally { p.changed(getEditorInput()); }
	public void doSave(IProgressMonitor progressMonitor) {				IWorkingCopyManager manager= JavaPlugin.getDefault().getWorkingCopyManager();		ICompilationUnit unit= manager.getWorkingCopy(getEditorInput());				synchronized (unit) {						ICompilationUnit original= (ICompilationUnit) unit.getOriginalElement();						if (fSavePolicy != null)				fSavePolicy.preSave(original);						super.doSave(progressMonitor);						if (fSavePolicy != null)				fSavePolicy.postSave(original);		}				getStatusLineManager().setErrorMessage("");	}