C# 클래스 ICSharpCode.AvalonEdit.Highlighting.DocumentHighlighter

This class can syntax-highlight a document. It automatically manages invalidating the highlighting when the document changes.
상속: ILineTracker, IHighlighter
파일 보기 프로젝트 열기: kjk/kjkpub 1 사용 예제들

Private Properties

프로퍼티 타입 설명
AllocateMatchArray System.Text.RegularExpressions.Match[]
CheckIsHighlighting void
HighlightLineAndUpdateTreeList void
HighlightLineInternal void
HighlightNonSpans void
HighlightUpTo void
ILineTracker void
ILineTracker void
ILineTracker void
ILineTracker void
Minimum System.Text.RegularExpressions.Match
PopAllColors void
PopColor void
PushColor void
ResetColorStack void

공개 메소드들

메소드 설명
DocumentHighlighter ( TextDocument document, ICSharpCode.AvalonEdit.Highlighting.HighlightingRuleSet baseRuleSet ) : System

Creates a new DocumentHighlighter instance.

GetSpanStack ( int lineNumber ) : ICSharpCode.AvalonEdit.Utils.ImmutableStack

Gets the span stack at the end of the specified line. -> GetSpanStack(1) returns the spans at the start of the second line.

GetSpanStack(0) is valid and will always return the empty stack.

HighlightLine ( DocumentLine line ) : HighlightedLine

Highlights the specified document line.

InvalidateHighlighting ( ) : void

Invalidates all stored highlighting info. When the document changes, the highlighting is invalidated automatically, this method needs to be called only when there are changes to the highlighting rule set.

보호된 메소드들

메소드 설명
OnHighlightStateChanged ( DocumentLine line, int lineNumber ) : void

Is called when the highlighting state at the end of the specified line has changed.

This callback must not call HighlightLine or InvalidateHighlighting. It may call GetSpanStack, but only for the changed line and lines above. This method must not modify the document.

비공개 메소드들

메소드 설명
AllocateMatchArray ( int count ) : System.Text.RegularExpressions.Match[]
CheckIsHighlighting ( ) : void
HighlightLineAndUpdateTreeList ( DocumentLine line, int lineNumber ) : void
HighlightLineInternal ( DocumentLine line ) : void
HighlightNonSpans ( int until ) : void
HighlightUpTo ( int targetLineNumber ) : void
ILineTracker ( ) : void
ILineTracker ( DocumentLine line ) : void
ILineTracker ( DocumentLine insertionPos, DocumentLine newLine ) : void
ILineTracker ( DocumentLine line, int newTotalLength ) : void
Minimum ( Match arr, Match endSpanMatch ) : Match

Returns the first match from the array or endSpanMatch.

PopAllColors ( ) : void
PopColor ( ) : void
PushColor ( ICSharpCode.AvalonEdit.Highlighting.HighlightingColor color ) : void
ResetColorStack ( ) : void

메소드 상세

DocumentHighlighter() 공개 메소드

Creates a new DocumentHighlighter instance.
public DocumentHighlighter ( TextDocument document, ICSharpCode.AvalonEdit.Highlighting.HighlightingRuleSet baseRuleSet ) : System
document ICSharpCode.AvalonEdit.Document.TextDocument
baseRuleSet ICSharpCode.AvalonEdit.Highlighting.HighlightingRuleSet
리턴 System

GetSpanStack() 공개 메소드

Gets the span stack at the end of the specified line. -> GetSpanStack(1) returns the spans at the start of the second line.
GetSpanStack(0) is valid and will always return the empty stack.
public GetSpanStack ( int lineNumber ) : ICSharpCode.AvalonEdit.Utils.ImmutableStack
lineNumber int
리턴 ICSharpCode.AvalonEdit.Utils.ImmutableStack

HighlightLine() 공개 메소드

Highlights the specified document line.
public HighlightLine ( DocumentLine line ) : HighlightedLine
line ICSharpCode.AvalonEdit.Document.DocumentLine The line to highlight.
리턴 HighlightedLine

InvalidateHighlighting() 공개 메소드

Invalidates all stored highlighting info. When the document changes, the highlighting is invalidated automatically, this method needs to be called only when there are changes to the highlighting rule set.
public InvalidateHighlighting ( ) : void
리턴 void

OnHighlightStateChanged() 보호된 메소드

Is called when the highlighting state at the end of the specified line has changed.
This callback must not call HighlightLine or InvalidateHighlighting. It may call GetSpanStack, but only for the changed line and lines above. This method must not modify the document.
protected OnHighlightStateChanged ( DocumentLine line, int lineNumber ) : void
line ICSharpCode.AvalonEdit.Document.DocumentLine
lineNumber int
리턴 void