C# 클래스 Alsing.SourceCode.SyntaxDocument

The SyntaxDocument is a component that is responsible for Parsing , Folding , Undo / Redo actions and various text actions.
상속: System.ComponentModel.Component, IEnumerable
파일 보기 프로젝트 열기: vchelaru/FlatRedBall 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
KeywordQueue RowList
NeedResetRows bool
ParseQueue RowList
Parser IParser
Tag object
UndoBuffer UndoBuffer
VisibleRows RowList

Private Properties

프로퍼티 타입 설명
Init void
InitializeComponent void
InternalResetVisibleRows void
OnChange void
OnModifiedChanged void
OnRowDeleted void
OnRowParsed void
ParseRows int
ParseRows int

공개 메소드들

메소드 설명
Add ( string text ) : Row

Add a new row with the specified text to the bottom of the document

Add ( string text, bool StoreUndo ) : Row

Add a new row with the specified text to the bottom of the document

AddToUndoList ( UndoBlock undo ) : void
AddToUndoList ( UndoBlockCollection ActionGroup ) : void

Add an action to the undo stack

AutoIndentSegment ( Span span ) : void
ChangeVersion ( ) : void

For internal use only

Clear ( ) : void
ClearBookmarks ( ) : void

Removes all bookmarks in the document

ClearBreakpoints ( ) : void

Removes all breakpoints in the document.

DeleteRange ( TextRange Range ) : void

Deletes a range of text

DeleteRange ( TextRange Range, bool StoreUndo ) : void

Deletes a range of text

EndUndoCapture ( ) : UndoBlockCollection

Ends an Undo capture and pushes the collected actions onto the undostack StartUndoCapture

EnsureParsed ( Row Row ) : void

Call this method to ensure that a specific row is fully parsed

FoldAll ( ) : void

Folds all foldable rows

GetEndBracketWord ( Word Start, Pattern End, Span FindIn ) : Word
GetEnumerator ( ) : IEnumerator

GetFormatWordFromPos ( TextPoint p ) : Word

Gets a Word object form a given column , Row index (this only applies if the row is fully parsed)

GetNextBookmark ( int StartIndex ) : int

Gets the row index of the next bookmarked row

GetPreviousBookmark ( int StartIndex ) : int

Gets the row index of the previous bookmarked row

GetRange ( TextRange Range ) : string

Get a range of text

GetRangeFromText ( string text, int xPos, int yPos ) : TextRange

Gets a Range from a given text

GetSegmentFromPos ( TextPoint p ) : Span

Gets a span object form a given column , Row index (This only applies if the row is fully parsed)

GetStartBracketWord ( Word Start, Pattern End, Span FindIn ) : Word
GetWordFromPos ( TextPoint p ) : Word

Gets a Word object form a given column , Row index (this only applies if the row is fully parsed)

IndexOf ( Row xtr ) : int

Returns the index of a given row

Insert ( string text, int index ) : Row

Insert a text at the specified row index

Insert ( string text, int index, bool storeUndo ) : Row

Insert a text at the specified row index

InsertText ( string text, int xPos, int yPos ) : TextPoint

Inserts a text into the document at a given column,row.

InsertText ( string text, int xPos, int yPos, bool StoreUndo ) : TextPoint

Inserts a text into the document at a given column,row.

IntPosToPoint ( int pos ) : TextPoint

Converts a char index into a Column/Row index

InvokeBookmarkAdded ( Row r ) : void
InvokeBookmarkRemoved ( Row r ) : void
InvokeBreakPointAdded ( Row r ) : void
InvokeBreakPointRemoved ( Row r ) : void
InvokeChange ( ) : void

Call this method to make the SyntaxDocument raise the Changed event

InvokeRowParsed ( Row row ) : void

Call this method to make the document raise the RowParsed event

OnApplyFormatRanges ( Row row ) : void
ParseAll ( ) : void

Performs a span parse on all rows. No Keyword colorizing

ParseAll ( bool ParseKeywords ) : void

Parses all rows , either a span parse or a full parse with keyword colorizing

ParseRow ( Row r ) : void

Forces a row to be parsed

ParseRow ( Row r, bool ParseKeywords ) : void

Forces a row to be parsed

ParseSome ( ) : void

Parses a chunk of 1000 rows , this is not thread safe

ParseSome ( int RowCount ) : void

Parse a chunk of rows, this is not thread safe

PointToIntPos ( TextPoint pos ) : int

Converts a Column/Row index position into a char index

PushUndoBlock ( UndoAction Action, string text, int x, int y ) : void
ReParse ( ) : void

ReParses the document

Redo ( ) : TextPoint

Perform an redo action

Remove ( int index ) : void

Remove a row at specified row index

Remove ( int index, bool StoreUndo ) : void
Remove ( int index, bool storeUndo, bool raiseChanged ) : void

Remove a row at specified row index

ResetVisibleRows ( ) : void

Call this method to recalculate the visible rows

SetSyntaxFromEmbeddedResource ( Assembly assembly, String resourceName ) : void

Sets a syntax file, from an embedded resource.

StartUndoCapture ( ) : void

Starts an Undo Capture. This method can be called if you with to collect multiple text operations into one undo action

SyntaxDocument ( ) : System

SyntaxDocument ( IContainer container ) : System

ToggleRow ( Row r ) : void

Toggle expansion of a given row

UnFoldAll ( ) : void

UnFolds all foldable rows

Undo ( ) : TextPoint

Perform an undo action

clear ( ) : void

Clear all content in the document

this ( int index ) : Row

Returns the row at the specified index

보호된 메소드들

메소드 설명
OnBookmarkAdded ( Row r ) : void
OnBookmarkRemoved ( Row r ) : void
OnBreakPointAdded ( Row r ) : void
OnBreakPointRemoved ( Row r ) : void
OnUndoBufferChanged ( ) : void

비공개 메소드들

메소드 설명
Init ( ) : void
InitializeComponent ( ) : void

Required method for Designer support - do not modify the contents of this method with the code editor.

InternalResetVisibleRows ( ) : void
OnChange ( ) : void
OnModifiedChanged ( ) : void
OnRowDeleted ( Row r ) : void
OnRowParsed ( Row r ) : void
ParseRows ( Row row ) : int
ParseRows ( Row row, bool Keywords ) : int

메소드 상세

Add() 공개 메소드

Add a new row with the specified text to the bottom of the document
public Add ( string text ) : Row
text string Text to add
리턴 Row

Add() 공개 메소드

Add a new row with the specified text to the bottom of the document
public Add ( string text, bool StoreUndo ) : Row
text string Text to add
StoreUndo bool true if and undo action should be added to the undo stack
리턴 Row

AddToUndoList() 공개 메소드

public AddToUndoList ( UndoBlock undo ) : void
undo UndoBlock
리턴 void

AddToUndoList() 공개 메소드

Add an action to the undo stack
public AddToUndoList ( UndoBlockCollection ActionGroup ) : void
ActionGroup UndoBlockCollection action to add
리턴 void

AutoIndentSegment() 공개 메소드

public AutoIndentSegment ( Span span ) : void
span Span
리턴 void

ChangeVersion() 공개 메소드

For internal use only
public ChangeVersion ( ) : void
리턴 void

Clear() 공개 메소드

public Clear ( ) : void
리턴 void

ClearBookmarks() 공개 메소드

Removes all bookmarks in the document
public ClearBookmarks ( ) : void
리턴 void

ClearBreakpoints() 공개 메소드

Removes all breakpoints in the document.
public ClearBreakpoints ( ) : void
리턴 void

DeleteRange() 공개 메소드

Deletes a range of text
public DeleteRange ( TextRange Range ) : void
Range TextRange the range that should be deleted
리턴 void

DeleteRange() 공개 메소드

Deletes a range of text
public DeleteRange ( TextRange Range, bool StoreUndo ) : void
Range TextRange Range to delete
StoreUndo bool true if the actions should be pushed onto the undo stack
리턴 void

EndUndoCapture() 공개 메소드

Ends an Undo capture and pushes the collected actions onto the undostack StartUndoCapture
public EndUndoCapture ( ) : UndoBlockCollection
리턴 UndoBlockCollection

EnsureParsed() 공개 메소드

Call this method to ensure that a specific row is fully parsed
public EnsureParsed ( Row Row ) : void
Row Row
리턴 void

FoldAll() 공개 메소드

Folds all foldable rows
public FoldAll ( ) : void
리턴 void

GetEndBracketWord() 공개 메소드

public GetEndBracketWord ( Word Start, Pattern End, Span FindIn ) : Word
Start Word
End Pattern
FindIn Span
리턴 Word

GetEnumerator() 공개 메소드

public GetEnumerator ( ) : IEnumerator
리턴 IEnumerator

GetFormatWordFromPos() 공개 메소드

Gets a Word object form a given column , Row index (this only applies if the row is fully parsed)
public GetFormatWordFromPos ( TextPoint p ) : Word
p TextPoint Column and Rowindex
리턴 Word

GetNextBookmark() 공개 메소드

Gets the row index of the next bookmarked row
public GetNextBookmark ( int StartIndex ) : int
StartIndex int Start index
리턴 int

GetPreviousBookmark() 공개 메소드

Gets the row index of the previous bookmarked row
public GetPreviousBookmark ( int StartIndex ) : int
StartIndex int Start index
리턴 int

GetRange() 공개 메소드

Get a range of text
public GetRange ( TextRange Range ) : string
Range TextRange The range to get
리턴 string

GetRangeFromText() 공개 메소드

Gets a Range from a given text
public GetRangeFromText ( string text, int xPos, int yPos ) : TextRange
text string
xPos int
yPos int
리턴 TextRange

GetSegmentFromPos() 공개 메소드

Gets a span object form a given column , Row index (This only applies if the row is fully parsed)
public GetSegmentFromPos ( TextPoint p ) : Span
p TextPoint Column and Rowindex
리턴 Span

GetStartBracketWord() 공개 메소드

public GetStartBracketWord ( Word Start, Pattern End, Span FindIn ) : Word
Start Word
End Pattern
FindIn Span
리턴 Word

GetWordFromPos() 공개 메소드

Gets a Word object form a given column , Row index (this only applies if the row is fully parsed)
public GetWordFromPos ( TextPoint p ) : Word
p TextPoint Column and Rowindex
리턴 Word

IndexOf() 공개 메소드

Returns the index of a given row
public IndexOf ( Row xtr ) : int
xtr Row row to find
리턴 int

Insert() 공개 메소드

Insert a text at the specified row index
public Insert ( string text, int index ) : Row
text string Text to insert
index int Row index where the text should be inserted
리턴 Row

Insert() 공개 메소드

Insert a text at the specified row index
public Insert ( string text, int index, bool storeUndo ) : Row
text string Text to insert
index int Row index where the text should be inserted
storeUndo bool true if and undo action should be added to the undo stack
리턴 Row

InsertText() 공개 메소드

Inserts a text into the document at a given column,row.
public InsertText ( string text, int xPos, int yPos ) : TextPoint
text string Text to insert
xPos int Column
yPos int Row index
리턴 TextPoint

InsertText() 공개 메소드

Inserts a text into the document at a given column,row.
public InsertText ( string text, int xPos, int yPos, bool StoreUndo ) : TextPoint
text string Text to insert
xPos int Column
yPos int Row index
StoreUndo bool true if this action should be pushed onto the undo stack
리턴 TextPoint

IntPosToPoint() 공개 메소드

Converts a char index into a Column/Row index
public IntPosToPoint ( int pos ) : TextPoint
pos int Char index to convert
리턴 TextPoint

InvokeBookmarkAdded() 공개 메소드

public InvokeBookmarkAdded ( Row r ) : void
r Row
리턴 void

InvokeBookmarkRemoved() 공개 메소드

public InvokeBookmarkRemoved ( Row r ) : void
r Row
리턴 void

InvokeBreakPointAdded() 공개 메소드

public InvokeBreakPointAdded ( Row r ) : void
r Row
리턴 void

InvokeBreakPointRemoved() 공개 메소드

public InvokeBreakPointRemoved ( Row r ) : void
r Row
리턴 void

InvokeChange() 공개 메소드

Call this method to make the SyntaxDocument raise the Changed event
public InvokeChange ( ) : void
리턴 void

InvokeRowParsed() 공개 메소드

Call this method to make the document raise the RowParsed event
public InvokeRowParsed ( Row row ) : void
row Row
리턴 void

OnApplyFormatRanges() 공개 메소드

public OnApplyFormatRanges ( Row row ) : void
row Row
리턴 void

OnBookmarkAdded() 보호된 메소드

protected OnBookmarkAdded ( Row r ) : void
r Row
리턴 void

OnBookmarkRemoved() 보호된 메소드

protected OnBookmarkRemoved ( Row r ) : void
r Row
리턴 void

OnBreakPointAdded() 보호된 메소드

protected OnBreakPointAdded ( Row r ) : void
r Row
리턴 void

OnBreakPointRemoved() 보호된 메소드

protected OnBreakPointRemoved ( Row r ) : void
r Row
리턴 void

OnUndoBufferChanged() 보호된 메소드

protected OnUndoBufferChanged ( ) : void
리턴 void

ParseAll() 공개 메소드

Performs a span parse on all rows. No Keyword colorizing
public ParseAll ( ) : void
리턴 void

ParseAll() 공개 메소드

Parses all rows , either a span parse or a full parse with keyword colorizing
public ParseAll ( bool ParseKeywords ) : void
ParseKeywords bool
리턴 void

ParseRow() 공개 메소드

Forces a row to be parsed
public ParseRow ( Row r ) : void
r Row Row to parse
리턴 void

ParseRow() 공개 메소드

Forces a row to be parsed
public ParseRow ( Row r, bool ParseKeywords ) : void
r Row Row to parse
ParseKeywords bool true if keywords and operators should be parsed
리턴 void

ParseSome() 공개 메소드

Parses a chunk of 1000 rows , this is not thread safe
public ParseSome ( ) : void
리턴 void

ParseSome() 공개 메소드

Parse a chunk of rows, this is not thread safe
public ParseSome ( int RowCount ) : void
RowCount int The number of rows to parse
리턴 void

PointToIntPos() 공개 메소드

Converts a Column/Row index position into a char index
public PointToIntPos ( TextPoint pos ) : int
pos TextPoint TextPoint where x is column and y is row index
리턴 int

PushUndoBlock() 공개 메소드

public PushUndoBlock ( UndoAction Action, string text, int x, int y ) : void
Action UndoAction
text string
x int
y int
리턴 void

ReParse() 공개 메소드

ReParses the document
public ReParse ( ) : void
리턴 void

Redo() 공개 메소드

Perform an redo action
public Redo ( ) : TextPoint
리턴 TextPoint

Remove() 공개 메소드

Remove a row at specified row index
public Remove ( int index ) : void
index int index of the row that should be removed
리턴 void

Remove() 공개 메소드

public Remove ( int index, bool StoreUndo ) : void
index int
StoreUndo bool
리턴 void

Remove() 공개 메소드

Remove a row at specified row index
public Remove ( int index, bool storeUndo, bool raiseChanged ) : void
index int index of the row that should be removed
storeUndo bool true if and undo action should be added to the undo stack
raiseChanged bool
리턴 void

ResetVisibleRows() 공개 메소드

Call this method to recalculate the visible rows
public ResetVisibleRows ( ) : void
리턴 void

SetSyntaxFromEmbeddedResource() 공개 메소드

Sets a syntax file, from an embedded resource.
public SetSyntaxFromEmbeddedResource ( Assembly assembly, String resourceName ) : void
assembly System.Reflection.Assembly The assembly which contains the embedded resource.
resourceName String The name of the resource.
리턴 void

StartUndoCapture() 공개 메소드

Starts an Undo Capture. This method can be called if you with to collect multiple text operations into one undo action
public StartUndoCapture ( ) : void
리턴 void

SyntaxDocument() 공개 메소드

public SyntaxDocument ( ) : System
리턴 System

SyntaxDocument() 공개 메소드

public SyntaxDocument ( IContainer container ) : System
container IContainer
리턴 System

ToggleRow() 공개 메소드

Toggle expansion of a given row
public ToggleRow ( Row r ) : void
r Row
리턴 void

UnFoldAll() 공개 메소드

UnFolds all foldable rows
public UnFoldAll ( ) : void
리턴 void

Undo() 공개 메소드

Perform an undo action
public Undo ( ) : TextPoint
리턴 TextPoint

clear() 공개 메소드

Clear all content in the document
public clear ( ) : void
리턴 void

this() 공개 메소드

Returns the row at the specified index
public this ( int index ) : Row
index int
리턴 Row

프로퍼티 상세

KeywordQueue 공개적으로 프로퍼티

public RowList KeywordQueue
리턴 RowList

NeedResetRows 공개적으로 프로퍼티

Gets or Sets if folding needs to be recalculated
public bool NeedResetRows
리턴 bool

ParseQueue 공개적으로 프로퍼티

List of rows that should be parsed
public RowList ParseQueue
리턴 RowList

Parser 공개적으로 프로퍼티

The active parser of the document
public IParser Parser
리턴 IParser

Tag 공개적으로 프로퍼티

Tag property , lets the user store custom data in the row.
public object Tag
리턴 object

UndoBuffer 공개적으로 프로퍼티

Buffer containing undo actions
public UndoBuffer UndoBuffer
리턴 UndoBuffer

VisibleRows 공개적으로 프로퍼티

List of rows that is not hidden by folding
public RowList VisibleRows
리턴 RowList