@Override public Object getInput() { return TextMergeViewer.this.getInput(); } @Override
public Object getInput() { return TextMergeViewer.this.getInput(); } }
@Override public Object getInput() { return TextMergeViewer.this.getInput(); } }
public void getName(AccessibleEvent e) { e.result = NLS.bind(CompareMessages.TextMergeViewer_accessible_right, getCompareConfiguration().getRightLabel(getInput())); } });
private boolean isPatchHunk() { return Utilities.isHunk(getInput()); }
private boolean isPatchHunk() { return Utilities.isHunk(getInput()); }
@Override public void getName(AccessibleEvent e) { e.result = NLS.bind(CompareMessages.TextMergeViewer_accessible_ancestor, getCompareConfiguration().getAncestorLabel(getInput())); } });
@Override public void getName(AccessibleEvent e) { e.result = NLS.bind(CompareMessages.TextMergeViewer_accessible_right, getCompareConfiguration().getRightLabel(getInput())); } });
@Override public void getName(AccessibleEvent e) { e.result = NLS.bind(CompareMessages.TextMergeViewer_accessible_left, getCompareConfiguration().getLeftLabel(getInput())); } });
private ITypedElement getParent(char type) { Object input= getInput(); if (input instanceof IDiffElement) { IDiffContainer parent= ((IDiffElement) input).getParent(); return Utilities.getLeg(type, parent); } return null; }
private ITypedElement getParent(char type) { Object input= getInput(); if (input instanceof IDiffElement) { IDiffContainer parent= ((IDiffElement)input).getParent(); return Utilities.getLeg(type, parent); } return null; }
@Override public boolean isHunkOnLeft() { ITypedElement left = ((ICompareInput) getInput()).getRight(); return left != null && Adapters.adapt(left, IHunk.class) != null; } @Override
private boolean isPatchHunkOk() { if (isPatchHunk()) return Utilities.isHunkOk(getInput()); return false; }
/** * Return the provided start position of the hunk in the target file. * @return the provided start position of the hunk in the target file */ private int getHunkStart() { Object input = getInput(); if (input != null && input instanceof DiffNode){ ITypedElement right = ((DiffNode) input).getRight(); if (right != null) { Object element = Adapters.adapt(right, IHunk.class); if (element instanceof IHunk) return ((IHunk) element).getStartPosition(); } ITypedElement left = ((DiffNode) input).getLeft(); if (left != null) { Object element = Adapters.adapt(left, IHunk.class); if (element instanceof IHunk) return ((IHunk) element).getStartPosition(); } } return 0; }
/** * Return the provided start position of the hunk in the target file. * @return the provided start position of the hunk in the target file */ private int getHunkStart() { Object input = getInput(); if (input != null && input instanceof DiffNode){ ITypedElement right = ((DiffNode) input).getRight(); if (right != null) { Object element = Utilities.getAdapter(right, IHunk.class); if (element instanceof IHunk) return ((IHunk)element).getStartPosition(); } ITypedElement left = ((DiffNode) input).getLeft(); if (left != null) { Object element = Utilities.getAdapter(left, IHunk.class); if (element instanceof IHunk) return ((IHunk)element).getStartPosition(); } } return 0; }
fHandlerService.dispose(); Object input= getInput(); removeFromDocumentManager(ANCESTOR_CONTRIBUTOR, input); removeFromDocumentManager(LEFT_CONTRIBUTOR, input);
newDocument= ((IDocumentRange)parent).getDocument(); newDocument.addPositionCategory(DIFF_RANGE_CATEGORY); Object input= this.fViewer.getInput(); range= this.fViewer.getNewRange(fLeg, input); if (range == null) {
newDocument= ((IDocumentRange) parent).getDocument(); newDocument.addPositionCategory(DIFF_RANGE_CATEGORY); Object input= this.fViewer.getInput(); range= this.fViewer.getNewRange(fLeg, input); if (range == null) {