Links
EControl Syntax Editor SDK
TTextRange Class

Text range is a group of consecutive tokens.

TTextRange = class(TSortedItem);

ecSyntAnal

Text range is a group of consecutive tokens. Text ranges may intersect each other. 

Text ranges are created by the block rule (TTagBlockCondition, BlockType is btRangeStart), that is stored in Rule property. 

After creating text range properties StartIdx, IdentIdx, Parent, Level are determined. 

 

Initially text range is opened (EndIdx is equal to -1). Text range is closed when block rule (TTagBlockCondition, BlockType is btRangeEnd) is succesfully tested and it is referred by the Rule.BlockEnd or BlockEnd property of the block rule is equal to Rule of this text range. 

 

StartIdx is the index of the first token, EndIdx is the index of the last token. 

 

To access text ranges array use TClientSyntAnalyzer.Ranges property. 

 

Parent specifies parent text range (last opened text range when current text range is being created), Level is the indentation in the ranges tree. 

Parent text range is always before children. You can use this to optimize tree filling.

Topic 
Description 
The methods of the TSortedItem class are listed here. 
TTextRange Class
Topic 
Description 
The methods of the TTextRange class are listed here. 
The properties of the TTextRange class are listed here. 
 
Method 
 
protected 
 
abstract 
 
Property 
 
read only 
TSortedItem Methods 
Description 
Derived classes should return the ID of the item. This ID is used for sorting. 
TTextRange Class
TTextRange Class 
Description 
Creates and initializes a TTextRange instance. 
Checks whether Range is parent of this text range. 
TTextRange Class
TTextRange Class 
Description 
Indicates index of the last token in the text range. 
Indicates index of the identifying token of the text range. 
Indicates index of text range in TClientSyntAnalyzer.Ranges array. 
Indicates whether text range is closed. 
Indicates the level of indentation of a text range within the text ranges tree. 
Points to parent text range. 
Rule 
Refers to the start block rule. 
Indicates index of the first token in the text range. 
Text range start position. 
Copyright (c) 2004-2011. All rights reserved.
What do you think about this topic? Send feedback!