Package ghidra.app.util.viewer.field
Class Annotation
- java.lang.Object
-
- ghidra.app.util.viewer.field.Annotation
-
public class Annotation extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description Annotation(java.lang.String annotationText, AttributedString prototypeString, Program program)
Constructor Note: This constructor assumes that the provided annotation text matches the regular expression defined indocking.widgets.fieldpanel.support.FieldUtils#ENCLOSING_ANNOTATION_PATTERN
, which assures that the string starts with "{
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static AnnotatedStringHandler[]
getAnnotatedStringHandlers()
java.lang.String
getAnnotationText()
AttributedString
getDisplayString()
boolean
handleMouseClick(Navigatable sourceNavigatable, ServiceProvider serviceProvider)
Called when a mouse click occurs on a FieldElement containing this Annotation.
-
-
-
Constructor Detail
-
Annotation
public Annotation(java.lang.String annotationText, AttributedString prototypeString, Program program)
Constructor Note: This constructor assumes that the provided annotation text matches the regular expression defined indocking.widgets.fieldpanel.support.FieldUtils#ENCLOSING_ANNOTATION_PATTERN
, which assures that the string starts with "{@
" and ends with '}'- Parameters:
annotationText
- The complete annotation text.prototypeString
- An AttributedString that provides the attributes for the display text this Annotation can create
-
-
Method Detail
-
getDisplayString
public AttributedString getDisplayString()
-
handleMouseClick
public boolean handleMouseClick(Navigatable sourceNavigatable, ServiceProvider serviceProvider)
Called when a mouse click occurs on a FieldElement containing this Annotation.- Parameters:
sourceNavigatable
- The source navigatable associated with the mouse click.serviceProvider
- The service provider to be used when creatingAnnotatedStringHandler
instances.- Returns:
- true if the handler desires to handle the mouse click.
-
getAnnotationText
public java.lang.String getAnnotationText()
-
getAnnotatedStringHandlers
public static AnnotatedStringHandler[] getAnnotatedStringHandlers()
-
-