DummyTokenHandler (jEdit API Documentation)

Package org.gjt.sp.jedit.syntax

## Class DummyTokenHandler

- java.lang.Object
- - org.gjt.sp.jedit.syntax.DummyTokenHandler

- All Implemented Interfaces:
    `TokenHandler`

      public class DummyTokenHandler
      extends java.lang.Object
      implements TokenHandler

  A dummy token handler that discards tokens.
  Since:
    jEdit 4.1pre1

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `static DummyTokenHandler` | `INSTANCE` | To avoid having to create new instances of this class, use this variable.

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `DummyTokenHandler()` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `handleToken​(javax.swing.text.Segment seg, byte id, int offset, int length, TokenMarker.LineContext context)` | Called by the token marker when a syntax token has been parsed.
    `void` | `setLineContext​(TokenMarker.LineContext lineContext)` | The token handler can compare this object with the object previously given for this line to see if the token type at the end of the line has changed (meaning subsequent lines might need to be retokenized).

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### INSTANCE

          public static final DummyTokenHandler INSTANCE

      To avoid having to create new instances of this class, use this variable. This is allowed because instances of this class do not store any state.

  - ### Constructor Detail

    - #### DummyTokenHandler

          public DummyTokenHandler()

  - ### Method Detail

    - #### handleToken

          public void handleToken​(javax.swing.text.Segment seg,
                                  byte id,
                                  int offset,
                                  int length,
                                  TokenMarker.LineContext context)

      Called by the token marker when a syntax token has been parsed.
      Specified by:
        `handleToken` in interface `TokenHandler`
      Parameters:
        `seg` - The segment containing the text
        `id` - The token type (one of the constants in the `Token` class).
        `offset` - The start offset of the token
        `length` - The number of characters in the token
        `context` - The line context
      Since:
        jEdit 4.2pre3

    - #### setLineContext

          public void setLineContext​(TokenMarker.LineContext lineContext)

      The token handler can compare this object with the object previously given for this line to see if the token type at the end of the line has changed (meaning subsequent lines might need to be retokenized).
      Specified by:
        `setLineContext` in interface `TokenHandler`
      Since:
        jEdit 4.2pre6