|
Eclipse Platform Pre-release 3.0 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.eclipse.jface.text.source.LineChangeHover
A hover for line oriented diffs. It determines the text to show as hover for a certain line in the document.
| Constructor Summary | |
LineChangeHover()
|
|
| Method Summary | |
protected Point |
computeLineRange(ISourceViewer viewer,
int line,
int min,
int max)
Computes the block of lines which form a contiguous block of changes covering line. |
protected String |
decorateText(List diffInfos,
int maxLines)
Takes a list of ILineDiffInfos and computes a hover of at most maxLines. |
protected String |
formatSource(String content)
Formats the source w/ syntax coloring etc. |
String |
getHoverInfo(ISourceViewer sourceViewer,
int lineNumber)
Returns the text which should be presented in the a hover popup window. |
String |
getHoverInfo(ISourceViewer sourceViewer,
int lineNumber,
int first,
int number)
Returns the text which should be presented in the a hover popup window. |
IInformationControlCreator |
getInformationControlCreator()
Returns the information control creator of this annotation hover. |
ITextSelection |
getLineRange(ISourceViewer viewer,
int line,
int first,
int number)
Returns the range of lines that are covered by this hover for the given ISourceViewer at model line line. |
protected String |
getTabReplacement()
Consults the preferences for the number of spaces a tab should be displayed as. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public LineChangeHover()
| Method Detail |
public String getHoverInfo(ISourceViewer sourceViewer,
int lineNumber,
int first,
int number)
IAnnotationHoverExtension
getHoverInfo in interface IAnnotationHoverExtensionsourceViewer - the source viewer this hover is registered withlineNumber - the line number for which information is requestedfirst - the first line in viewer's document to considernumber - the number of lines in viewer's document to consider
null if no such information exists
public String getHoverInfo(ISourceViewer sourceViewer,
int lineNumber)
IAnnotationHover
getHoverInfo in interface IAnnotationHoversourceViewer - the source viewer this hover is registered withlineNumber - the line number for which information is requested
null if no such information exists
public ITextSelection getLineRange(ISourceViewer viewer,
int line,
int first,
int number)
IAnnotationHoverExtensionISourceViewer at model line line.
getLineRange in interface IAnnotationHoverExtensionviewer - the viewer which the hover is queried forline - the line which a hover is displayed forfirst - the first line in viewer's document to considernumber - the number of lines in viewer's document to consider
viewer containing line
that is covered by the hover information returned by the receiver.protected String formatSource(String content)
content - the hover content
content reformattedprotected String getTabReplacement()
protected String decorateText(List diffInfos,
int maxLines)
ILineDiffInfos and computes a hover of at most maxLines.
Added lines are prefixed with a '+', changed lines with '>' and
deleted lines with '-'.
Deleted and added lines can even each other out, so that a number of deleted lines get displayed where - in the current document - the added lines are.
diffInfos - a List of ILineDiffInfomaxLines - the maximum number of lines. Note that adding up all annotations might give
more than that due to deleted lines.
String suitable for hover display
protected Point computeLineRange(ISourceViewer viewer,
int line,
int min,
int max)
line.
viewer - the source viewer showingline - the line which a hover is displayed formin - the first line in viewer's document to considermax - the last line in viewer's document to consider
viewer containing line
that is covered by the hover information returned by the receiver.public IInformationControlCreator getInformationControlCreator()
IAnnotationHoverExtension
getInformationControlCreator in interface IAnnotationHoverExtension
|
Eclipse Platform Pre-release 3.0 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||