C# 클래스 Emmet.EmmetEditor

Implements editor interface required by the Emmet engine based on the Visual Studio editor.
상속: IEmmetEditor
파일 보기 프로젝트 열기: sergey-rybalkin/emmet.net 1 사용 예제들

공개 메소드들

메소드 설명
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.

메소드 상세

CreateSelection() 공개 메소드

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

EmmetEditor() 공개 메소드

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.
리턴 System.Windows.Forms

FormatRegion() 공개 메소드

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.
리턴 void

GetCaretPosition() 공개 메소드

Gets caret position.
public GetCaretPosition ( ) : int
리턴 int

GetContent() 공개 메소드

Gets the content of the editor.
public GetContent ( ) : string
리턴 string

GetContentTypeInActiveBuffer() 공개 메소드

Gets content type of the text buffer that has the caret.
public GetContentTypeInActiveBuffer ( ) : string
리턴 string

GetCurrentLine() 공개 메소드

Gets text on the current line.
public GetCurrentLine ( ) : string
리턴 string

GetCurrentLineRange() 공개 메소드

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

GetSelection() 공개 메소드

Gets currently selected text.
public GetSelection ( ) : string
리턴 string

GetSelectionRange() 공개 메소드

Gets current selection range or caret position if no selection exists.
public GetSelectionRange ( ) : Range
리턴 Emmet.Engine.Range

Prompt() 공개 메소드

Displays dialog box that prompts user for input.
public Prompt ( ) : string
리턴 string

ReplaceContentRange() 공개 메소드

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.
리턴 void

SetCaretPosition() 공개 메소드

Sets the caret position.
public SetCaretPosition ( int position ) : void
position int New caret position.
리턴 void

TrackTabStops() 공개 메소드

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.
리턴 void