C# Class ICSharpCode.TextEditor.Document.TextUtilities

Show file Open project: jumpinjackie/fdotoolbox Class Usage Examples

Public Methods

Method Description
FindNextWordStart ( IDocument document, int offset ) : int
FindPrevWordStart ( IDocument document, int offset ) : int
FindWordEnd ( IDocument document, int offset ) : int
FindWordStart ( IDocument document, int offset ) : int
GetCharacterType ( char c ) : CharacterType
GetExpressionBeforeOffset ( TextArea textArea, int initialOffset ) : string This method returns the expression before a specified offset. That method is used in code completion to determine the expression given to the parser for type resolve.
GetFirstNonWSChar ( IDocument document, int offset ) : int
GetLineAsString ( IDocument document, int lineNumber ) : string
GetWordAt ( IDocument document, int offset ) : string
IsEmptyLine ( IDocument document, LineSegment line ) : bool Returns true, if the line lineNumber is empty or filled with whitespaces.
IsEmptyLine ( IDocument document, int lineNumber ) : bool Returns true, if the line lineNumber is empty or filled with whitespaces.
IsLetterDigitOrUnderscore ( char c ) : bool
LeadingWhiteSpaceToTabs ( string line, int tabIndent ) : string This function takes a string and converts the whitespace in front of it to tabs. If the length of the whitespace at the start of the string was not a whole number of tabs then there will still be some spaces just before the text starts. the output string will be of the form: 1. zero or more tabs 2. zero or more spaces (less than tabIndent) 3. the rest of the line
SearchBracketBackward ( IDocument document, int offset, char openBracket, char closingBracket ) : int
SearchBracketForward ( IDocument document, int offset, char openBracket, char closingBracket ) : int

Private Methods

Method Description
IsWordPart ( char ch ) : bool

Method Details

FindNextWordStart() public static method

public static FindNextWordStart ( IDocument document, int offset ) : int
document IDocument
offset int
return int

FindPrevWordStart() public static method

public static FindPrevWordStart ( IDocument document, int offset ) : int
document IDocument
offset int
return int

FindWordEnd() public static method

public static FindWordEnd ( IDocument document, int offset ) : int
document IDocument
offset int
return int

FindWordStart() public static method

public static FindWordStart ( IDocument document, int offset ) : int
document IDocument
offset int
return int

GetCharacterType() public static method

public static GetCharacterType ( char c ) : CharacterType
c char
return CharacterType

GetExpressionBeforeOffset() public static method

This method returns the expression before a specified offset. That method is used in code completion to determine the expression given to the parser for type resolve.
public static GetExpressionBeforeOffset ( TextArea textArea, int initialOffset ) : string
textArea TextArea
initialOffset int
return string

GetFirstNonWSChar() public static method

public static GetFirstNonWSChar ( IDocument document, int offset ) : int
document IDocument
offset int
return int

GetLineAsString() public static method

public static GetLineAsString ( IDocument document, int lineNumber ) : string
document IDocument
lineNumber int
return string

GetWordAt() public static method

public static GetWordAt ( IDocument document, int offset ) : string
document IDocument
offset int
return string

IsEmptyLine() public static method

Returns true, if the line lineNumber is empty or filled with whitespaces.
public static IsEmptyLine ( IDocument document, LineSegment line ) : bool
document IDocument
line LineSegment
return bool

IsEmptyLine() public static method

Returns true, if the line lineNumber is empty or filled with whitespaces.
public static IsEmptyLine ( IDocument document, int lineNumber ) : bool
document IDocument
lineNumber int
return bool

IsLetterDigitOrUnderscore() public static method

public static IsLetterDigitOrUnderscore ( char c ) : bool
c char
return bool

LeadingWhiteSpaceToTabs() public static method

This function takes a string and converts the whitespace in front of it to tabs. If the length of the whitespace at the start of the string was not a whole number of tabs then there will still be some spaces just before the text starts. the output string will be of the form: 1. zero or more tabs 2. zero or more spaces (less than tabIndent) 3. the rest of the line
public static LeadingWhiteSpaceToTabs ( string line, int tabIndent ) : string
line string
tabIndent int
return string

SearchBracketBackward() public static method

public static SearchBracketBackward ( IDocument document, int offset, char openBracket, char closingBracket ) : int
document IDocument
offset int
openBracket char
closingBracket char
return int

SearchBracketForward() public static method

public static SearchBracketForward ( IDocument document, int offset, char openBracket, char closingBracket ) : int
document IDocument
offset int
openBracket char
closingBracket char
return int