/** * If the inputs are mirrored, this asks the right model value. * * @return true if the left viewer is editable * @since 3.7 */ protected boolean isLeftEditable() { return fCompareConfiguration.isMirrored() ? fCompareConfiguration.isRightEditable() : fCompareConfiguration.isLeftEditable(); }
/** * If the inputs are mirrored, this asks the left model value. * * @return true if the right viewer is editable * @since 3.7 */ protected boolean isRightEditable() { return fCompareConfiguration.isMirrored() ? fCompareConfiguration.isLeftEditable() : fCompareConfiguration.isRightEditable(); } }
/** * Return whether the compare editor input of this dialog is editable. * By default, the input is editable if the compare configuration * indicates that either the left or right sides are editable. * Subclasses may override. * @return whether the compare editor input of this dialog is editable * @see CompareConfiguration#isLeftEditable() * @see CompareConfiguration#isRightEditable() */ protected boolean isInputEditable() { return fCompareEditorInput.getCompareConfiguration().isLeftEditable() || fCompareEditorInput.getCompareConfiguration().isRightEditable(); }
private boolean isEditable() { return getCompareConfiguration().isLeftEditable() || getCompareConfiguration().isRightEditable(); }
private boolean isEditable() { return getCompareConfiguration().isLeftEditable() || getCompareConfiguration().isRightEditable(); }
private boolean isEditable() { return getCompareConfiguration().isLeftEditable() || getCompareConfiguration().isRightEditable(); }
private boolean isEditable() { return getCompareConfiguration().isLeftEditable() || getCompareConfiguration().isRightEditable(); }
/** * Return whether the compare editor input of this dialog is editable. * By default, the input is editable if the compare configuration * indicates that either the left or right sides are editable. * Subclasses may override. * @return whether the compare editor input of this dialog is editable * @see CompareConfiguration#isLeftEditable() * @see CompareConfiguration#isRightEditable() */ protected boolean isInputEditable() { return fCompareEditorInput.getCompareConfiguration().isLeftEditable() || fCompareEditorInput.getCompareConfiguration().isRightEditable(); }
private boolean showResolveUI() { if (!fUseResolveUI || !isThreeWay() || isIgnoreAncestor()) return false; CompareConfiguration cc= getCompareConfiguration(); // we only enable the new resolve UI if exactly one side is editable boolean l= cc.isLeftEditable(); boolean r= cc.isRightEditable(); //return (l && !r) || (r && !l); return l || r; }
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); } }
boolean rightEmpty= content.getRightContent(input) == null; if (getCompareConfiguration().isLeftEditable() && isLeftDirty()) { byte[] bytes= getContents(true); if (rightEmpty && bytes != null && bytes.length == 0)
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); } }
if (cc.isLeftEditable()) { fCopyRightToLeftAction= new Action() {
fLeftContributor.setDocument(fLeft, cc.isLeftEditable() && cp.isLeftEditable(input)); fLeftLineCount= fLeft.getLineCount();
if (cc.isLeftEditable()) { a= new Action() { public void run() {