com.intellij.openapi.fileTypes
Class PlainSyntaxHighlighter

java.lang.Object
  extended by com.intellij.openapi.fileTypes.PlainSyntaxHighlighter
All Implemented Interfaces:
SyntaxHighlighter

public class PlainSyntaxHighlighter
extends java.lang.Object
implements SyntaxHighlighter


Constructor Summary
PlainSyntaxHighlighter()
           
 
Method Summary
 Lexer getHighlightingLexer()
          Returns the lexer used for highlighing the file.
 TextAttributesKey[] getTokenHighlights(IElementType tokenType)
          Returns the list of text attribute keys used for highlighting the specified token type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PlainSyntaxHighlighter

public PlainSyntaxHighlighter()
Method Detail

getHighlightingLexer

@NotNull
public Lexer getHighlightingLexer()
Description copied from interface: SyntaxHighlighter
Returns the lexer used for highlighing the file. The lexer is invoked incrementally when the file is changed, so it must be capable of saving/restoring state and resuming lexing from the middle of the file.

Specified by:
getHighlightingLexer in interface SyntaxHighlighter
Returns:
The lexer implementation.

getTokenHighlights

@NotNull
public TextAttributesKey[] getTokenHighlights(IElementType tokenType)
Description copied from interface: SyntaxHighlighter
Returns the list of text attribute keys used for highlighting the specified token type. The attributes of all attribute keys returned for the token type are successively merged to obtain the color and attributes of the token.

Specified by:
getTokenHighlights in interface SyntaxHighlighter
Parameters:
tokenType - The token type for which the highlighting is requested.
Returns:
The array of text attribute keys.