Class InspectorLine

All Implemented Interfaces:
Serializable

public class InspectorLine extends Verbatim
A line of an inspector represents a line of the submitted source code and helds all graja result comments that belongs to this line. The renderable line returns getLine() as a Verbatim. Result information about this line returns getLineInfo() as List<InspectorLineInfo>.
See Also:
  • Constructor Details

  • Method Details

    • prependLineInfo

      public void prependLineInfo(InspectorLineInfo info)
    • addLineInfo

      public void addLineInfo(InspectorLineInfo info)
    • cssHighlightLine

      public void cssHighlightLine()
    • addStyle

      public void addStyle(String css)
    • addHtmlAttr

      public void addHtmlAttr(String key, String val)
    • getStyle

      public String getStyle()
    • getContents

      public Iterable<Content> getContents()
      Returns:
      a list of all contents.
    • prefix

      public static String prefix(Integer lineNumber)
      Prefixes looks like this: 9| 10| 11|
      Parameters:
      lineNumber - as Integer
      Returns:
      The line prefix as a String
    • getLine

      public Verbatim getLine()
    • getLineInfo

      public List<InspectorLineInfo> getLineInfo()
    • hasLineInfo

      public boolean hasLineInfo()
    • getLineNumber

      public int getLineNumber()
    • getCharLength

      public int getCharLength()
    • renderHtmlImpl

      public void renderHtmlImpl(StringBuilder sb, IncludeInfo includeInfo, RenderContext ctx, boolean useJavascript)
      Description copied from class: Content
      render content to HTML. This method is meant to be overriden by subclasses.
      Overrides:
      renderHtmlImpl in class Verbatim
      Parameters:
      sb - HTML code result
      includeInfo - controls, which content to be rendered.
      ctx - render context
      useJavascript - if true, the generated HTML code will contain Javascript
      See Also:
      • Content#renderHtmlImpl(StringBuilder, IncludeInfo, RenderContext)
    • renderPlainImpl

      public void renderPlainImpl(StringBuilder sb, IncludeInfo includeInfo, RenderContext ctx)
      Description copied from class: Content
      render content to plain text. This method is meant to be overriden by subclasses.
      Overrides:
      renderPlainImpl in class Verbatim
      Parameters:
      sb - plain text result
      includeInfo - controls, which content to be rendered.
      ctx - render context (unused).
      See Also: