Class DisplayableEol


  • public class DisplayableEol
    extends java.lang.Object
    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.
    • Constructor Detail

      • DisplayableEol

        public DisplayableEol​(CodeUnit cu,
                              boolean alwaysShowRepeatable,
                              boolean alwaysShowRefRepeats,
                              boolean alwaysShowAutomatic,
                              boolean operandsFollowPointerRefs,
                              int maxDisplayLines,
                              boolean useAbbreviatedAutomatic)
        Construct a new DisplayableEol.
        Parameters:
        cu - code unit that may have end of line or repeatable comments.
    • Method Detail

      • hasEOL

        public boolean hasEOL()
        Return 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.
      • hasReferencedRepeatable

        public boolean hasReferencedRepeatable()
        Return 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. (i.e. any memory reference from this code unit has a function defined at the reference's to address, or if the to address is a pointer.)
      • getComments

        public java.lang.String[] getComments()
        Return all the comments (End of Line, Repeatable, Referenced Repeatables, and Referenced Data).
      • getEOLComments

        public java.lang.String[] getEOLComments()
        Gets the end of line comment as an array.
        Returns:
        the EOL comment
      • getRepeatableComments

        public java.lang.String[] 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

        public java.lang.String[] getReferencedRepeatableComments()
      • getReferencedRepeatableComments

        public RefRepeatComment getReferencedRepeatableComments​(int index)
        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

        public java.lang.String[] getReferencedRepeatableComments​(Address refAddress)
        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

        public java.lang.String[] getAutomaticComment()
        Gets the automatic comment as an array.
        Returns:
        the automatic comment
      • getCommentLineCount

        public int getCommentLineCount​(int subType)
      • getRefRepeatableCommentLineCount

        public int getRefRepeatableCommentLineCount​(Address refAddress)
      • getLocation

        public ProgramLocation getLocation​(int eolRow,
                                           int eolColumn)
      • isRefRepeatRow

        public boolean isRefRepeatRow​(int eolRow)