Package sc.parser

Class RangeStyleAdapter

  • All Implemented Interfaces:

    public abstract class RangeStyleAdapter
    extends java.lang.Object
    implements IStyleAdapter
    Used by IDE integrations to hook into the parselets style engine. You extend this class, override the styleMatched method, and call "styleNode".
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      boolean getNeedsFormattedString()
      For styling in HTML, the styleString method returns the styled string.
      void setFormatContext​(FormatContext ctx)  
      void styleEnd​(java.lang.String styleName)  
      abstract void styleMatched​(java.lang.String styleName, java.lang.String styleDesc, int startOffset, int endOffset)  
      void styleStart​(java.lang.String styleName)  
      void styleString​(java.lang.CharSequence codeOut, boolean escape, java.lang.String styleName, java.lang.String styleDesc)
      Adds a style for the text range specified.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • RangeStyleAdapter

        public RangeStyleAdapter()
    • Method Detail

      • getNeedsFormattedString

        public boolean getNeedsFormattedString()
        Description copied from interface: IStyleAdapter
        For styling in HTML, the styleString method returns the styled string. For IDEs, it's api drive so no result string is required.
        Specified by:
        getNeedsFormattedString in interface IStyleAdapter
      • styleStart

        public void styleStart​(java.lang.String styleName)
        Specified by:
        styleStart in interface IStyleAdapter
      • styleEnd

        public void styleEnd​(java.lang.String styleName)
        Specified by:
        styleEnd in interface IStyleAdapter
      • styleMatched

        public abstract void styleMatched​(java.lang.String styleName,
                                          java.lang.String styleDesc,
                                          int startOffset,
                                          int endOffset)
      • styleString

        public void styleString​(java.lang.CharSequence codeOut,
                                boolean escape,
                                java.lang.String styleName,
                                java.lang.String styleDesc)
        Description copied from interface: IStyleAdapter
        Adds a style for the text range specified. If needsFormattedString is true, the result is used to accumulate the result string.
        Specified by:
        styleString in interface IStyleAdapter