Class EolComments

java.lang.Object
ghidra.app.util.EolComments

public class EolComments extends Object
Utility class with methods to get comment information that can be displayed in the end of line comment field. Each instance of this class is associated with a code unit. This class uses the provided options to decide how to load and filter existing comments.

Comment types that can be shown include 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 Details

    • EolComments

      public EolComments(CodeUnit cu, boolean operandsShowReferences, int maxDisplayComments, EolExtraCommentsOption extraCommentsOption)
  • Method Details

    • isShowingRepeatables

      public boolean isShowingRepeatables()
    • isShowingRefRepeatables

      public boolean isShowingRefRepeatables()
    • isShowingAutoComments

      public boolean isShowingAutoComments()
    • getComments

      public List<String> getComments()
      Return all comments loaded by this class
      Returns:
      the comments
    • getEOLComments

      public List<String> getEOLComments()
      Gets the End of Line comments
      Returns:
      the comments
    • getRepeatableComments

      public List<String> getRepeatableComments()
      Gets the repeatable comments
      Returns:
      the comments
    • getReferencedRepeatableComments

      public List<RefRepeatComment> getReferencedRepeatableComments()
      Gets the repeatable comments at the "to reference"s
      Returns:
      the comments
    • getAutomaticComment

      public List<String> getAutomaticComment()
      Gets the automatic comments
      Returns:
      the comments
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getRowCol

      public RowColLocation getRowCol(CommentFieldLocation cloc)
    • getLocation

      public ProgramLocation getLocation(int eolRow, int eolColumn)