Class AbstractCommentManager<C,U extends IInteractiveUnit>

java.lang.Object
com.pnfsoftware.jeb.core.units.impl.AbstractCommentManager<C,U>
Direct Known Subclasses:
CodeCommentManager, CommentManager

@Ser public abstract class AbstractCommentManager<C,U extends IInteractiveUnit> extends Object
An comment manager to be used by IInteractiveUnit. It supports dual-addressing: regular string address (per the interactive unit specifications), and custom address (methods for custom addressing are suffixed by 2). The conversion methods are to be provided by the subclass.

Specialized subclasses exist.

  • Field Details

    • INLINE

      public static final int INLINE
      Constant used to identify an item's primary comment inlined with the item (for rendering purposes).
      See Also:
    • PRE

      public static final int PRE
      Constant used to identify an item's primary comment located above/before the item (for rendering purposes).
      See Also:
    • COMMENT_FLAG_FAVORITE

      public static final int COMMENT_FLAG_FAVORITE
      See Also:
  • Constructor Details

    • AbstractCommentManager

      public AbstractCommentManager(U unit)
  • Method Details

    • getUnit

      public U getUnit()
    • getComments

      public Map<String,Comment> getComments()
    • getComments2

      public Map<C,Comment> getComments2()
    • getComment

      public Comment getComment(String address)
    • getComment2

      public Comment getComment2(C coord)
    • setComment

      public boolean setComment(String address, Comment comment, boolean notify)
    • setComment2

      public boolean setComment2(C coord, Comment comment, boolean notify)
    • getInlineComment

      public String getInlineComment(String address)
    • setInlineComment

      public boolean setInlineComment(String address, String value)
    • setInlineComment

      public boolean setInlineComment(String address, String value, boolean notify)
    • getInlineComment2

      public String getInlineComment2(C coord)
    • setInlineComment2

      public boolean setInlineComment2(C coord, String value)
    • setInlineComment2

      public boolean setInlineComment2(C coord, String value, boolean notify)
    • getPreComment

      public String getPreComment(String address)
    • setPreComment

      public boolean setPreComment(String address, String value)
    • setPreComment

      public boolean setPreComment(String address, String value, boolean notify)
    • getPreComment2

      public String getPreComment2(C coord)
    • setPreComment2

      public boolean setPreComment2(C coord, String value)
    • setPreComment2

      public boolean setPreComment2(C coord, String value, boolean notify)
    • getPrimary

      public String getPrimary(String address, int position)
      Parameters:
      address -
      position - one of INLINE or PRE
      Returns:
    • getPrimary2

      public String getPrimary2(C coord, int position)
      Parameters:
      coord -
      position - one of INLINE or PRE
      Returns:
    • setPrimary

      public boolean setPrimary(String address, String value, int position, boolean notify)
      Parameters:
      address -
      value -
      position - one of INLINE or PRE
      notify -
      Returns:
    • setPrimary2

      public boolean setPrimary2(C coord, String value, int position, boolean notify)
      Parameters:
      coord -
      value -
      position - one of INLINE or PRE
      notify -
      Returns:
    • getPrimaryMap

      public Map<String,String> getPrimaryMap(int position)
      Parameters:
      position - one of INLINE or PRE
      Returns:
    • getPrimaryMap2

      public Map<C,String> getPrimaryMap2(int position)
      Parameters:
      position - one of INLINE or PRE
      Returns:
    • getMetaComments

      public Collection<MetaComment> getMetaComments(String address)
    • getMetaComments2

      public Collection<MetaComment> getMetaComments2(C coord)
    • getMetaComments

      public Collection<MetaComment> getMetaComments(String address, int flagsMustHave, int flagsCantHave)
    • getMetaComments2

      public Collection<MetaComment> getMetaComments2(C coord, int flagsMustHave, int flagsCantHave)
    • addMetaComment

      public boolean addMetaComment(String address, MetaComment c, boolean notify)
    • addMetaComment2

      public boolean addMetaComment2(C coord, MetaComment c, boolean notify)
    • removeMetaComment

      public boolean removeMetaComment(String address, MetaComment c, boolean notify)
    • removeMetaComment2

      public boolean removeMetaComment2(C coord, MetaComment c, boolean notify)
    • getMetaCommentObjects

      public Collection<String> getMetaCommentObjects(String address, int flagsMustHave, int flagsCantHave)
    • getMetaCommentObjects2

      public Collection<String> getMetaCommentObjects2(C coord, int flagsMustHave, int flagsCantHave)
    • formatComments

      public String formatComments(String address, boolean includePre, int flagsMustHave, int flagsCantHave)
    • formatComments2

      public String formatComments2(C coord, boolean includePre, int flagsMustHave, int flagsCantHave)
    • formatMetaComment

      public String formatMetaComment(MetaComment c)
    • formatMetaFlags

      public String formatMetaFlags(int flags)
    • addressToCoord

      public abstract C addressToCoord(String address)
    • coordToAddress

      public abstract String coordToAddress(C coord)
    • putAll

      public void putAll(Map<C,Comment> map)