Package ghidra.app.util
Class DisplayableEol
java.lang.Object
ghidra.app.util.DisplayableEol
Utility class with methods to get comment information that can be displayed in the
end of line comment field. A DisplayableEol is associated with a code unit.
The DisplayableEol gets information for the EOL comment field, which can show the
End of Line comment for the code unit, the Repeatable comment for the code unit,
any repeatable comments for the code units that this code unit has references to, and
possibly a comment indicating the data at a code unit that is referenced by this code unit.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
static final int
static final int
static final int
-
Constructor Summary
ConstructorsConstructorDescriptionDisplayableEol
(CodeUnit cu, boolean alwaysShowRepeatable, boolean alwaysShowRefRepeats, boolean alwaysShowAutomatic, boolean operandsFollowPointerRefs, int maxDisplayLines, boolean useAbbreviatedAutomatic, boolean showAutomaticFunctions) -
Method Summary
Modifier and TypeMethodDescriptionString[]
Gets the automatic comment as an array.int
getCommentLineCount
(int subType) String[]
Return all the commentsString[]
Gets the end of line comment as an array.getLocation
(int eolRow, int eolColumn) String[]
getReferencedRepeatableComments
(int index) Gets a referenced repeatable comment as a RefRepeatComment object.String[]
getReferencedRepeatableComments
(Address refAddress) Gets a referenced repeatable comment as a RefRepeatComment object.int
Gets the number of repeatable comments at the "to reference"sint
getRefRepeatableCommentLineCount
(Address refAddress) String[]
Gets the repeatable comment as an array.boolean
Return whether this code unit has an automatic comment.boolean
hasEOL()
Return whether the associated code unit has an end of line commentboolean
Return whether any memory reference from this code unit has a repeatable comment at the reference's to addressboolean
Return whether the associated code unit has a repeatable commentboolean
isRefRepeatRow
(int eolRow) toString()
-
Field Details
-
MY_EOLS
public static final int MY_EOLS- See Also:
-
MY_REPEATABLES
public static final int MY_REPEATABLES- See Also:
-
REF_REPEATABLES
public static final int REF_REPEATABLES- See Also:
-
MY_AUTOMATIC
public static final int MY_AUTOMATIC- See Also:
-
-
Constructor Details
-
DisplayableEol
public DisplayableEol(CodeUnit cu, boolean alwaysShowRepeatable, boolean alwaysShowRefRepeats, boolean alwaysShowAutomatic, boolean operandsFollowPointerRefs, int maxDisplayLines, boolean useAbbreviatedAutomatic, boolean showAutomaticFunctions)
-
-
Method Details
-
hasEOL
public boolean hasEOL()Return whether the associated code unit has an end of line comment- Returns:
- whether the associated code unit has an end of line comment
-
hasRepeatable
public boolean hasRepeatable()Return whether the associated code unit has a repeatable comment- Returns:
- whether the associated code unit has a repeatable comment
-
hasReferencedRepeatable
public boolean hasReferencedRepeatable()Return whether any memory reference from this code unit has a repeatable comment at the reference's to address- Returns:
- whether any memory reference from this code unit has a repeatable comment at the reference's to address
-
hasAutomatic
public boolean hasAutomatic()Return whether this code unit has an automatic comment. For example, a memory reference from this code unit has a function defined at the reference's to address, or if the to address is a pointer.- Returns:
- whether this code unit has an automatic comment
-
getComments
Return all the comments- Returns:
- the comments
-
getEOLComments
Gets the end of line comment as an array.- Returns:
- the EOL comment
-
getRepeatableComments
Gets the repeatable comment as an array.- Returns:
- the repeatable comment.
-
getReferencedRepeatableCommentsCount
public int getReferencedRepeatableCommentsCount()Gets the number of repeatable comments at the "to reference"s- Returns:
- the number of reference repeatable comments
-
getReferencedRepeatableComments
-
getReferencedRepeatableComments
Gets a referenced repeatable comment as a RefRepeatComment object.- Parameters:
index
- indicator of which referenced repeatable comment is desired. The value is 0 thru one less than the number of referenced repeatable comments.- Returns:
- the RefRepeatComment containing the referenced address and its referenced repeatable comment
-
getReferencedRepeatableComments
Gets a referenced repeatable comment as a RefRepeatComment object.- Parameters:
refAddress
- the reference address whose repeatable comment is desired. Note: there must be a reference from the address for this displayableEol to the refAddress.- Returns:
- the comment lines for the referenced address's repeatable comment or null.
-
getAutomaticComment
Gets the automatic comment as an array.- Returns:
- the automatic comment
-
toString
-
getCommentLineCount
public int getCommentLineCount(int subType) -
getRefRepeatableCommentLineCount
-
getRowCol
-
getLocation
-
isRefRepeatRow
public boolean isRefRepeatRow(int eolRow)
-