org.eclipse.xtext.ui.editor.hover
Class ProblemAnnotationHover

java.lang.Object
  extended by org.eclipse.xtext.ui.editor.hover.AbstractHover
      extended by org.eclipse.xtext.ui.editor.hover.AbstractProblemHover
          extended by org.eclipse.xtext.ui.editor.hover.ProblemAnnotationHover
All Implemented Interfaces:
org.eclipse.jface.text.ITextHover, org.eclipse.jface.text.ITextHoverExtension, org.eclipse.jface.text.ITextHoverExtension2, org.eclipse.jface.text.source.IAnnotationHover, ISourceViewerAware

public class ProblemAnnotationHover
extends AbstractProblemHover
implements org.eclipse.jface.text.source.IAnnotationHover

Author:
Sven Efftinge - Initial contribution and API, Christoph Kulla - Adaptation to AbstractProblemHover

Field Summary
 
Fields inherited from class org.eclipse.xtext.ui.editor.hover.AbstractHover
sourceViewer
 
Constructor Summary
ProblemAnnotationHover()
           
 
Method Summary
protected  java.lang.String formatInfo(java.util.Collection<java.lang.String> messages)
           
 java.lang.String getHoverInfo(org.eclipse.jface.text.source.ISourceViewer sourceViewer, int lineNumber)
          Returns the text which should be presented in the a hover popup window.
protected  java.lang.Object getHoverInfoInternal(org.eclipse.jface.text.ITextViewer textViewer, int lineNumber, int offset)
           
protected  org.eclipse.jface.text.Region getHoverRegionInternal(int lineNumber, int offset)
           
 
Methods inherited from class org.eclipse.xtext.ui.editor.hover.AbstractProblemHover
getAnnotationModel, getAnnotations, getHoverInfo2, getHoverRegion, isLineDiffInfo
 
Methods inherited from class org.eclipse.xtext.ui.editor.hover.AbstractHover
getDocument, getHoverControlCreator, getHoverInfo, getLineNumber, setSourceViewer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProblemAnnotationHover

public ProblemAnnotationHover()
Method Detail

getHoverInfo

public java.lang.String getHoverInfo(org.eclipse.jface.text.source.ISourceViewer sourceViewer,
                                     int lineNumber)
Description copied from interface: org.eclipse.jface.text.source.IAnnotationHover
Returns the text which should be presented in the a hover popup window. This information is requested based on the specified line number.

Specified by:
getHoverInfo in interface org.eclipse.jface.text.source.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 null if no such information exists

getHoverRegionInternal

protected org.eclipse.jface.text.Region getHoverRegionInternal(int lineNumber,
                                                               int offset)
Specified by:
getHoverRegionInternal in class AbstractProblemHover

getHoverInfoInternal

protected java.lang.Object getHoverInfoInternal(org.eclipse.jface.text.ITextViewer textViewer,
                                                int lineNumber,
                                                int offset)
Specified by:
getHoverInfoInternal in class AbstractProblemHover

formatInfo

protected java.lang.String formatInfo(java.util.Collection<java.lang.String> messages)