C# Class Nexus.Client.ModManagement.Scripting.XmlScript.CPL.Controls.CplHighlightingStrategy

The highlighting strategy for the Conditional Pattern Language.
This is used to highilight CPL in the editor.
Inheritance: IHighlightingStrategy
Mostra file Open project: NexusMods/NexusModManager-4.5

Public Methods

Method Description
CplHighlightingStrategy ( ICplParserFactory p_cpfLexerFactory ) : System

A simple construstor that sets the LexerFactory to use.

GetColorFor ( TokenClass p_ttpTokenClass ) : HighlightColor

Gets the HighlightColor for the specified class of token.

GetColorFor ( string p_strColourName ) : HighlightColor

Gets the HighlightColor for the specified class of token.

MarkTokens ( IDocument document ) : void

Highlights the tokens in the given document.

MarkTokens ( IDocument document, List lines ) : void

Highlights the tokens in the given lines in the given document.

Protected Methods

Method Description
GetTokenClass ( Int32 p_intTokenType ) : TokenClass

Determines the token class of the given token type.

HandleToken ( IDocument document, IToken j ) : void

Colourises the given token and adds it to the document.

Method Details

CplHighlightingStrategy() public method

A simple construstor that sets the LexerFactory to use.
public CplHighlightingStrategy ( ICplParserFactory p_cpfLexerFactory ) : System
p_cpfLexerFactory ICplParserFactory The factory to use to create the CPL lexer used to highlight the code.
return System

GetColorFor() public method

Gets the HighlightColor for the specified class of token.
public GetColorFor ( TokenClass p_ttpTokenClass ) : HighlightColor
p_ttpTokenClass TokenClass The token class for which the /// is to be returned.
return ICSharpCode.TextEditor.Document.HighlightColor

GetColorFor() public method

Gets the HighlightColor for the specified class of token.
public GetColorFor ( string p_strColourName ) : HighlightColor
p_strColourName string
return ICSharpCode.TextEditor.Document.HighlightColor

GetTokenClass() protected method

Determines the token class of the given token type.
protected GetTokenClass ( Int32 p_intTokenType ) : TokenClass
p_intTokenType System.Int32 The token type to classify.
return TokenClass

HandleToken() protected method

Colourises the given token and adds it to the document.
protected HandleToken ( IDocument document, IToken j ) : void
document IDocument The document being highlighted.
j IToken The token to highlight.
return void

MarkTokens() public method

Highlights the tokens in the given document.
public MarkTokens ( IDocument document ) : void
document IDocument The document being highlighted.
return void

MarkTokens() public method

Highlights the tokens in the given lines in the given document.
public MarkTokens ( IDocument document, List lines ) : void
document IDocument The document being highlighted.
lines List The lines to highlight.
return void