Class ErrorStrip.MarkedOccurrenceNotice

  • All Implemented Interfaces:
    java.lang.Comparable<ParserNotice>, ParserNotice
    Enclosing class:
    ErrorStrip

    private class ErrorStrip.MarkedOccurrenceNotice
    extends java.lang.Object
    implements ParserNotice
    A notice that wraps a "marked occurrence" instance.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.awt.Color color  
      private DocumentRange range  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int compareTo​(ParserNotice other)  
      boolean containsPosition​(int pos)
      Returns whether this parser notice contains the specified location in the document.
      boolean equals​(java.lang.Object o)  
      java.awt.Color getColor()
      Returns the color to use when painting this notice.
      boolean getKnowsOffsetAndLength()
      Returns whether this parser notice has offset and length information (as opposed to just what line number to mark).
      int getLength()
      Returns the length of the code the message is concerned with.
      ParserNotice.Level getLevel()
      Returns the level of this notice.
      int getLine()
      Returns the line number the notice is about.
      java.lang.String getMessage()
      Returns the message from the parser.
      int getOffset()
      Returns the offset of the code the message is concerned with.
      Parser getParser()
      Returns the parser that created this message.
      boolean getShowInEditor()
      Whether a squiggle underline should be drawn in the editor for this notice.
      java.lang.String getToolTipText()
      Returns the tool tip text to display for this notice.
      int hashCode()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • color

        private java.awt.Color color
    • Constructor Detail

      • MarkedOccurrenceNotice

        MarkedOccurrenceNotice​(DocumentRange range,
                               java.awt.Color color)
    • Method Detail

      • compareTo

        public int compareTo​(ParserNotice other)
        Specified by:
        compareTo in interface java.lang.Comparable<ParserNotice>
      • containsPosition

        public boolean containsPosition​(int pos)
        Description copied from interface: ParserNotice
        Returns whether this parser notice contains the specified location in the document.
        Specified by:
        containsPosition in interface ParserNotice
        Parameters:
        pos - The position in the document.
        Returns:
        Whether the position is contained. This will always return false if ParserNotice.getOffset() returns -1.
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • getColor

        public java.awt.Color getColor()
        Description copied from interface: ParserNotice
        Returns the color to use when painting this notice.
        Specified by:
        getColor in interface ParserNotice
        Returns:
        The color.
      • getLine

        public int getLine()
        Description copied from interface: ParserNotice
        Returns the line number the notice is about.
        Specified by:
        getLine in interface ParserNotice
        Returns:
        The line number.
      • getMessage

        public java.lang.String getMessage()
        Description copied from interface: ParserNotice
        Returns the message from the parser.
        Specified by:
        getMessage in interface ParserNotice
        Returns:
        The message from the parser.
      • getParser

        public Parser getParser()
        Description copied from interface: ParserNotice
        Returns the parser that created this message.
        Specified by:
        getParser in interface ParserNotice
        Returns:
        The parser.
      • getShowInEditor

        public boolean getShowInEditor()
        Description copied from interface: ParserNotice
        Whether a squiggle underline should be drawn in the editor for this notice.
        Specified by:
        getShowInEditor in interface ParserNotice
        Returns:
        Whether a squiggle underline should be drawn.
      • getToolTipText

        public java.lang.String getToolTipText()
        Description copied from interface: ParserNotice
        Returns the tool tip text to display for this notice.
        Specified by:
        getToolTipText in interface ParserNotice
        Returns:
        The tool tip text. If none has been explicitly set, this method returns the same text as ParserNotice.getMessage().
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object