public class PovClipseHoverPresenter
extends java.lang.Object
IInformationPresenter
used by text hovers.Modifier and Type | Field and Description |
---|---|
static int |
HOVER_TYPE_CODE |
static int |
HOVER_TYPE_COLOR |
static int |
HOVER_TYPE_COLOR_MAP |
static int |
HOVER_TYPE_DECLARATION |
static int |
HOVER_TYPE_DEFAULT |
static int |
HOVER_TYPE_ERROR |
static int |
HOVER_TYPE_INCLUDE |
static int |
HOVER_TYPE_MACRO |
Constructor and Description |
---|
PovClipseHoverPresenter()
Constructor reading the colors from the preference store.
|
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
getExtraInfo(java.lang.String msg)
Gets the extra information stored between the
TYPE information
and the TYPE_DELIMETER . |
static int |
getHoverType(java.lang.String msg)
Gets the hover type using the hover message.
|
static java.lang.String |
getStrippedHoverMessage(java.lang.String msg) |
static boolean |
isHoverTypeCode(java.lang.String msg)
Checks whether the hover message belongs to a code-folding or not.
|
static boolean |
isHoverTypeColor(java.lang.String msg)
Checks whether the hover message belongs to a color or not.
|
static boolean |
isHoverTypeColorMap(java.lang.String msg)
Checks whether the hover message belongs to a color_map or not.
|
static boolean |
isHoverTypeDeclaration(java.lang.String msg)
Checks whether the hover message belongs to a declare statement or not.
|
static boolean |
isHoverTypeInclude(java.lang.String msg)
Checks whether the hover message belongs to a include statement or not.
|
static boolean |
isHoverTypeMacro(java.lang.String msg)
Checks whether the hover message belongs to a macro or not.
|
java.lang.String |
updatePresentation(Display display,
java.lang.String hoverInfo,
TextPresentation presentation,
int maxWidth,
int maxHeight)
Default implemtation, not uased by the framework as this
class implements
IInformationPresenterExtension as well! |
java.lang.String |
updatePresentation(Drawable drawable,
java.lang.String hoverInfo,
TextPresentation presentation,
int maxWidth,
int maxHeight) |
public static final int HOVER_TYPE_DEFAULT
public static final int HOVER_TYPE_CODE
public static final int HOVER_TYPE_MACRO
public static final int HOVER_TYPE_INCLUDE
public static final int HOVER_TYPE_DECLARATION
public static final int HOVER_TYPE_COLOR
public static final int HOVER_TYPE_COLOR_MAP
public static final int HOVER_TYPE_ERROR
public PovClipseHoverPresenter()
public java.lang.String updatePresentation(Display display, java.lang.String hoverInfo, TextPresentation presentation, int maxWidth, int maxHeight)
IInformationPresenterExtension
as well!org.eclipse.jface.text.DefaultInformationControl$IInformationPresenter#updatePresentation(org.eclipse.swt.widgets.Display, java.lang.String, org.eclipse.jface.text.TextPresentation, int, int)
public java.lang.String updatePresentation(Drawable drawable, java.lang.String hoverInfo, TextPresentation presentation, int maxWidth, int maxHeight)
org.eclipse.jface.text.DefaultInformationControl$IInformationPresenterExtension#updatePresentation(org.eclipse.swt.graphics.Drawable, java.lang.String, org.eclipse.jface.text.TextPresentation, int, int)
public static int getHoverType(java.lang.String msg)
msg
- The hover message including the ttype prefix.HOVER_TYPE_*
constants. If the
msg
is null or the type is either unknown or not set
HOVER_TYPE_DEFAULT
is returned.public static boolean isHoverTypeColor(java.lang.String msg)
msg
- The message to be processed.true
it the message belongs to a color hover.public static boolean isHoverTypeColorMap(java.lang.String msg)
msg
- The message to be processed.true
it the message belongs to a color_map hover.public static boolean isHoverTypeMacro(java.lang.String msg)
msg
- The message to be processed.true
it the message belongs to a macro hover.public static boolean isHoverTypeCode(java.lang.String msg)
msg
- The message to be processed.true
it the message belongs to a code-folding hover.public static boolean isHoverTypeInclude(java.lang.String msg)
msg
- The message to be processed.true
it the message belongs to a include hover.public static boolean isHoverTypeDeclaration(java.lang.String msg)
msg
- The message to be processed.true
it the message belongs to a declare hover.public static java.lang.String getExtraInfo(java.lang.String msg)
TYPE
information
and the TYPE_DELIMETER
.msg
- The message to be processed.public static java.lang.String getStrippedHoverMessage(java.lang.String msg)