/** * 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 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); } }
if (getCompareConfiguration().isRightEditable() && isRightDirty()) { byte[] bytes= getContents(false); if (leftEmpty && 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.isRightEditable()) { fCopyLeftToRightAction= new Action() {
fLeftLineCount= fLeft.getLineCount(); fRightContributor.setDocument(fRight, cc.isRightEditable() && cp.isRightEditable(input)); fRightLineCount= fRight.getLineCount();
if (cc.isRightEditable()) { a= new Action() { public void run() {