Examples of IMergeViewerContentProvider


Examples of org.eclipse.compare.contentmergeviewer.IMergeViewerContentProvider

   * @since 3.3
   */
  protected void flushContentOld(Object input, IProgressMonitor monitor) {

    // write back modified contents
    IMergeViewerContentProvider content = (IMergeViewerContentProvider) getContentProvider();

    boolean leftEmpty = content.getLeftContent(input) == null;
    boolean rightEmpty = content.getRightContent(input) == null;

    if (getCompareConfiguration().isLeftEditable() && isLeftDirty()) {
      byte[] bytes = getContents(true);
      if (rightEmpty && bytes != null && bytes.length == 0)
        bytes = null;
      setLeftDirty(false);
      content.saveLeftContent(input, bytes);
    }

    if (getCompareConfiguration().isRightEditable() && isRightDirty()) {
      byte[] bytes = getContents(false);
      if (leftEmpty && bytes != null && bytes.length == 0)
        bytes = null;
      setRightDirty(false);
      content.saveRightContent(input, bytes);
    }
  }
View Full Code Here

Examples of org.eclipse.compare.contentmergeviewer.IMergeViewerContentProvider

    flushLeftSide(input, monitor);
    flushRightSide(input, monitor);
  }

  void flushLeftSide(Object input, IProgressMonitor monitor) {
    IMergeViewerContentProvider content = (IMergeViewerContentProvider) getContentProvider();

    boolean rightEmpty = content.getRightContent(input) == null;

    if (getCompareConfiguration().isLeftEditable() && isLeftDirty()) {
      byte[] bytes = getContents(true);
      if (rightEmpty && bytes != null && bytes.length == 0)
        bytes = null;
      setLeftDirty(false);
      content.saveLeftContent(input, bytes);
    }
  }
View Full Code Here

Examples of org.eclipse.compare.contentmergeviewer.IMergeViewerContentProvider

      content.saveLeftContent(input, bytes);
    }
  }

  void flushRightSide(Object input, IProgressMonitor monitor) {
    IMergeViewerContentProvider content = (IMergeViewerContentProvider) getContentProvider();

    boolean leftEmpty = content.getLeftContent(input) == null;

    if (getCompareConfiguration().isRightEditable() && isRightDirty()) {
      byte[] bytes = getContents(false);
      if (leftEmpty && bytes != null && bytes.length == 0)
        bytes = null;
      setRightDirty(false);
      content.saveRightContent(input, bytes);
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.