/** * Flush any modifications made in the viewer into the compare input. This method * calls {@link #flushContent(Object, IProgressMonitor)} with the compare input * of the viewer as the first parameter. * @param monitor a progress monitor * @see org.eclipse.compare.contentmergeviewer.IFlushable#flush(org.eclipse.core.runtime.IProgressMonitor) * @since 3.3 */ public final void flush(IProgressMonitor monitor) { flushContent(getInput(), monitor); }
/** * Flush any modifications made in the viewer into the compare input. This method * calls {@link #flushContent(Object, IProgressMonitor)} with the compare input * of the viewer as the first parameter. * * @param monitor a progress monitor * @see org.eclipse.compare.contentmergeviewer.IFlushable#flush(org.eclipse.core.runtime.IProgressMonitor) * @since 3.3 */ @Override public final void flush(IProgressMonitor monitor) { flushContent(getInput(), monitor); }
@Override protected void flushContent(Object oldInput, IProgressMonitor monitor) { flushLeftSide(oldInput, monitor); flushRightSide(oldInput, monitor); IMergeViewerContentProvider content = getMergeContentProvider(); if (!(content instanceof MergeViewerContentProvider) || isLeftDirty() || isRightDirty()) { super.flushContent(oldInput, monitor); } }
if (Utilities.RUNNING_TESTS) { if (Utilities.TESTING_FLUSH_ON_COMPARE_INPUT_CHANGE) { flushContent(oldInput, null); flushContent(oldInput, null); break; case 1: flushContent(oldInput, null);
flushContent(input, null); flushContent(input, null); break; case 1:
flushContent(oldInput, null); flushContent(oldInput, null); break; case 1: flushContent(oldInput, null); return true;
flushContent(input, null); flushContent(input, null); break; case 1:
protected void flushContent(Object oldInput, IProgressMonitor monitor) { // check and handle any shared buffers IMergeViewerContentProvider content= getMergeContentProvider(); Object leftContent = content.getLeftContent(oldInput); Object rightContent = content.getRightContent(oldInput); if (leftContent != null && getCompareConfiguration().isLeftEditable() && isLeftDirty()) { if (fLeftContributor.hasSharedDocument(leftContent)) { if (flush(fLeftContributor)) setLeftDirty(false); } } if (rightContent != null && getCompareConfiguration().isRightEditable() && isRightDirty()) { if (fRightContributor.hasSharedDocument(rightContent)) { if (flush(fRightContributor)) setRightDirty(false); } } if (!(content instanceof MergeViewerContentProvider) || isLeftDirty() || isRightDirty()) { super.flushContent(oldInput, monitor); } }