@Override public void run() { try { long stamp= unit.getResource().getModificationStamp(); listener.saved(unit, changedRegions, getSubProgressMonitor(monitor, 4)); if (stamp != unit.getResource().getModificationStamp()) { String msg= Messages.format(JavaEditorMessages.CompilationUnitDocumentProvider_error_saveParticipantSavedFile, participantName); errorStatus.add(new Status(IStatus.ERROR, JavaUI.ID_PLUGIN, IJavaStatusConstants.EDITOR_POST_SAVE_NOTIFICATION, msg, null)); } if (buffer.hasUnsavedChanges()) buffer.save(getSubProgressMonitor(monitor, 1), true); } catch (CoreException ex) { handleException(ex); } finally { monitor.worked(1); } }
@Override public void run() { try { long stamp= unit.getResource().getModificationStamp(); listener.saved(unit, changedRegions, getSubProgressMonitor(monitor, 4)); if (stamp != unit.getResource().getModificationStamp()) { String msg= Messages.format(JavaEditorMessages.CompilationUnitDocumentProvider_error_saveParticipantSavedFile, participantName); errorStatus.add(new Status(IStatus.ERROR, JavaUI.ID_PLUGIN, IJavaStatusConstants.EDITOR_POST_SAVE_NOTIFICATION, msg, null)); } if (buffer.hasUnsavedChanges()) buffer.save(getSubProgressMonitor(monitor, 1), true); } catch (CoreException ex) { handleException(ex); } finally { monitor.worked(1); } }