Package org.eclipse.jface.text.source
Class DefaultAnnotationHover
java.lang.Object
org.eclipse.jface.text.source.DefaultAnnotationHover
- All Implemented Interfaces:
- IAnnotationHover
Standard implementation of 
IAnnotationHover.- Since:
- 3.2
- 
Constructor SummaryConstructorsConstructorDescriptionCreates a new default annotation hover.DefaultAnnotationHover(boolean showLineNumber) Creates a new default annotation hover.
- 
Method SummaryModifier and TypeMethodDescriptionprotected StringformatMultipleMessages(List<String> messages) Hook method to formats the given messages.protected StringformatSingleMessage(String message) Hook method to format the given single message.getHoverInfo(ISourceViewer sourceViewer, int lineNumber) Returns the text which should be presented in the a hover popup window.protected booleanisIncluded(Annotation annotation) Tells whether the annotation should be included in the computation.
- 
Constructor Details- 
DefaultAnnotationHoverpublic DefaultAnnotationHover()Creates a new default annotation hover.- Since:
- 3.4
 
- 
DefaultAnnotationHoverpublic DefaultAnnotationHover(boolean showLineNumber) Creates a new default annotation hover.- Parameters:
- showLineNumber-- trueif the line number should be shown when no annotation is found
- Since:
- 3.4
 
 
- 
- 
Method Details- 
getHoverInfoDescription copied from interface:IAnnotationHoverReturns the text which should be presented in the a hover popup window. This information is requested based on the specified line number.- Specified by:
- getHoverInfoin interface- IAnnotationHover
- Parameters:
- sourceViewer- the source viewer this hover is registered with
- lineNumber- the line number for which information is requested
- Returns:
- the requested information or nullif no such information exists
 
- 
isIncludedTells whether the annotation should be included in the computation.- Parameters:
- annotation- the annotation to test
- Returns:
- trueif the annotation is included in the computation
 
- 
formatSingleMessageHook method to format the given single message.Subclasses can change this to create a different format like HTML. - Parameters:
- message- the message to format
- Returns:
- the formatted message
 
- 
formatMultipleMessagesHook method to formats the given messages.Subclasses can change this to create a different format like HTML. - Parameters:
- messages- the messages to format
- Returns:
- the formatted message
 
 
-