/** * Computes the content of the hover for the document contained in <code>viewer</code> on * line <code>line</code>. * * @param viewer the connected viewer * @param first the first line in <code>viewer</code>'s document to consider * @param last the last line in <code>viewer</code>'s document to consider * @param maxLines the max number of lines * @return The hover content corresponding to the parameters * @see #getHoverInfo(ISourceViewer, int) * @see #getHoverInfo(ISourceViewer, ILineRange, int) */ private String computeContent(ISourceViewer viewer, int first, int last, int maxLines) { ILineDiffer differ= getDiffer(viewer); if (differ == null) return null; final List<ILineDiffInfo> lines= new LinkedList<>(); for (int l= first; l <= last; l++) { ILineDiffInfo info= differ.getLineInfo(l); if (info != null) lines.add(info); } return decorateText(lines, maxLines); }
/** * Computes the content of the hover for the document contained in <code>viewer</code> on * line <code>line</code>. * * @param viewer the connected viewer * @param first the first line in <code>viewer</code>'s document to consider * @param last the last line in <code>viewer</code>'s document to consider * @param maxLines the max number of lines * @return The hover content corresponding to the parameters * @see #getHoverInfo(ISourceViewer, int) * @see #getHoverInfo(ISourceViewer, ILineRange, int) */ private String computeContent(ISourceViewer viewer, int first, int last, int maxLines) { ILineDiffer differ= getDiffer(viewer); if (differ == null) return null; final List<ILineDiffInfo> lines= new LinkedList<>(); for (int l= first; l <= last; l++) { ILineDiffInfo info= differ.getLineInfo(l); if (info != null) lines.add(info); } return decorateText(lines, maxLines); }