Source:
private void selectAndReveal(MergeSourceViewer sourceViewer, Position position) { StyledText widget = sourceViewer.getSourceViewer().getTextWidget(); widget.setRedraw(false); adjustHighlightRange(sourceViewer.getSourceViewer(), position.offset, position.length); sourceViewer.getSourceViewer().revealRange(position.offset, position.length); sourceViewer.getSourceViewer().setSelectedRange(position.offset, position.length); SourceViewer srcViewer = sourceViewer.getSourceViewer(); IReviewItem reviewitem = ((ReviewAnnotationModel) srcViewer.getAnnotationModel()).getItem(); List<CommentAnnotation> comments = getAnnotationsForLine(srcViewer, position.offset); Point p = sourceViewer.getLineRange(position, sourceViewer.getSourceViewer().getSelectedRange()); LineRange range = new LineRange(p.x + 1, p.y); if (commentPopupDialog != null) { commentPopupDialog.dispose(false); commentPopupDialog = null; } commentPopupDialog = new CommentPopupDialog( ReviewsUiPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getShell(), SWT.NO_FOCUS | SWT.ON_TOP, reviewitem, range, true); CommentAnnotationHoverInput input = new CommentAnnotationHoverInput(comments, ((ReviewAnnotationModel) srcViewer.getAnnotationModel()).getBehavior()); commentPopupDialog.create(); commentPopupDialog.setInput(input); commentPopupDialog.setHeightBasedOnMouse(sourceViewer.getSourceViewer().getControl().toDisplay(0, 0).y); Point location = sourceViewer.getSourceViewer().getControl().toDisplay(sourceViewer.getViewportHeight() / 2, sourceViewer.getViewportHeight() / 3); commentPopupDialog.setLocation(location); commentPopupDialog.open(); commentPopupDialog.setFocus(); widget.setRedraw(true); }

Target:
private void selectAndReveal(MergeSourceViewer sourceViewer, Position position) { StyledText widget = sourceViewer.getSourceViewer().getTextWidget(); widget.setRedraw(false); adjustHighlightRange(sourceViewer.getSourceViewer(), position.offset, position.length); sourceViewer.getSourceViewer().revealRange(position.offset, position.length); sourceViewer.getSourceViewer().setSelectedRange(position.offset, position.length); SourceViewer srcViewer = sourceViewer.getSourceViewer(); IReviewItem reviewitem = ((ReviewAnnotationModel) srcViewer.getAnnotationModel()).getItem(); List<CommentAnnotation> comments = getAnnotationsForLine(srcViewer, position.offset); Point p = sourceViewer.getLineRange(position, sourceViewer.getSourceViewer().getSelectedRange()); LineRange range = new LineRange(p.x + 1, p.y); if (commentPopupDialog != null) { commentPopupDialog.dispose(false); commentPopupDialog = null; } commentPopupDialog = new CommentPopupDialog( ReviewsUiPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getShell(), SWT.NO_FOCUS | SWT.ON_TOP, reviewitem, range, true); CommentAnnotationHoverInput input = new CommentAnnotationHoverInput(comments, ((ReviewAnnotationModel) srcViewer.getAnnotationModel()).getBehavior()); commentPopupDialog.create(); commentPopupDialog.setInput(input); commentPopupDialog.setHeightBasedOnMouse(sourceViewer.getSourceViewer().getControl().toDisplay(0, 0).y); Point location = sourceViewer.getSourceViewer().getControl().toDisplay( sourceViewer.getSourceViewer().getControl().getSize().x, sourceViewer.getViewportHeight() / 3); commentPopupDialog.setLocation(location); commentPopupDialog.open(); commentPopupDialog.setFocus(); widget.setRedraw(true); }