C# Class Emmet.EmmetEditor

Implements editor interface required by the Emmet engine based on the Visual Studio editor.
Inheritance: IEmmetEditor
Afficher le fichier Open project: sergey-rybalkin/emmet.net Class Usage Examples

Méthodes publiques

Méthode Description
CreateSelection ( int start, int end ) : void

Selects the specified text range.

EmmetEditor ( IWpfTextView wpfView, IVsTextView textView ) : System.Windows.Forms

Initializes a new instance of the EmmetEditor class.

FormatRegion ( int startPosition = -1, int endPosition ) : void

Formats the specified code region. If region position is negative then the whole document will be formatted.

GetCaretPosition ( ) : int

Gets caret position.

GetContent ( ) : string

Gets the content of the editor.

GetContentTypeInActiveBuffer ( ) : string

Gets content type of the text buffer that has the caret.

GetCurrentLine ( ) : string

Gets text on the current line.

GetCurrentLineRange ( ) : Range

Gets indexes of the first and last characters of the current line in the editor.

GetSelection ( ) : string

Gets currently selected text.

GetSelectionRange ( ) : Range

Gets current selection range or caret position if no selection exists.

Prompt ( ) : string

Displays dialog box that prompts user for input.

ReplaceContentRange ( string newContent, int startPosition = -1, int endPosition ) : void

Replaces the specified region in the document with the new content. If region start position is negative then the whole document will be replaced with the specified content.

SetCaretPosition ( int position ) : void

Sets the caret position.

TrackTabStops ( Range tabStops, int tabStopGroups ) : void

Starts tracking the specified regions as tab stops.

Method Details

CreateSelection() public méthode

Selects the specified text range.
public CreateSelection ( int start, int end ) : void
start int First character to select.
end int Last character to select.
Résultat void

EmmetEditor() public méthode

Initializes a new instance of the EmmetEditor class.
public EmmetEditor ( IWpfTextView wpfView, IVsTextView textView ) : System.Windows.Forms
wpfView IWpfTextView The WPF interface for the editor.
textView IVsTextView The text view interface for the editor.
Résultat System.Windows.Forms

FormatRegion() public méthode

Formats the specified code region. If region position is negative then the whole document will be formatted.
public FormatRegion ( int startPosition = -1, int endPosition ) : void
startPosition int The start position of the region to format.
endPosition int The end position of the region to format.
Résultat void

GetCaretPosition() public méthode

Gets caret position.
public GetCaretPosition ( ) : int
Résultat int

GetContent() public méthode

Gets the content of the editor.
public GetContent ( ) : string
Résultat string

GetContentTypeInActiveBuffer() public méthode

Gets content type of the text buffer that has the caret.
public GetContentTypeInActiveBuffer ( ) : string
Résultat string

GetCurrentLine() public méthode

Gets text on the current line.
public GetCurrentLine ( ) : string
Résultat string

GetCurrentLineRange() public méthode

Gets indexes of the first and last characters of the current line in the editor.
public GetCurrentLineRange ( ) : Range
Résultat Emmet.Engine.Range

GetSelection() public méthode

Gets currently selected text.
public GetSelection ( ) : string
Résultat string

GetSelectionRange() public méthode

Gets current selection range or caret position if no selection exists.
public GetSelectionRange ( ) : Range
Résultat Emmet.Engine.Range

Prompt() public méthode

Displays dialog box that prompts user for input.
public Prompt ( ) : string
Résultat string

ReplaceContentRange() public méthode

Replaces the specified region in the document with the new content. If region start position is negative then the whole document will be replaced with the specified content.
public ReplaceContentRange ( string newContent, int startPosition = -1, int endPosition ) : void
newContent string New content to replace the specified range with.
startPosition int The start position of the range to replace.
endPosition int The end position of the range to replace.
Résultat void

SetCaretPosition() public méthode

Sets the caret position.
public SetCaretPosition ( int position ) : void
position int New caret position.
Résultat void

TrackTabStops() public méthode

Starts tracking the specified regions as tab stops.
public TrackTabStops ( Range tabStops, int tabStopGroups ) : void
tabStops Emmet.Engine.Range The tab stops array with start and end positions.
tabStopGroups int Tab stops groups indexes array.
Résultat void