C# Class Emmet.Snippets.CodeSnippet

Represents a region of source code in the editor that has some tab stops in it.
Afficher le fichier Open project: sergey-rybalkin/emmet.net Class Usage Examples

Méthodes publiques

Méthode Description
BeginEditSnippet ( ) : void

Moves caret to the first tab stop in the active snippet.

CreateSnippetInView ( ViewContext view, Span tabStops, int tabStopGroups ) : CodeSnippet

Creates code snippet in the specified view.

EndEditSnippet ( ) : void

Detaches this object from the target view.

GetTabStopsPositions ( ) : Span[]

Gets this snippet tab stops positions in the active text snapshot.

TryMoveToNextTabStop ( bool reverse = false ) : bool

Tries to move caret to next tab stop. Returns true if succeeded; false otherwise. False indicates that caret is not inside any of the available tab stops which indicates that tab stops tracking should be finished and this snippet should be detached from the view.

Private Methods

Méthode Description
CodeSnippet ( ) : Microsoft.VisualStudio.Text

Initializes a new instance of the CodeSnippet class. Constructor that prevents a default instance of this class from being created.

ConvertToTrackingSpans ( ViewContext view, Span spans ) : ITrackingSpan[]
GetLastTabStopInGroup ( int index ) : int
MoveToSpan ( ITrackingSpan span ) : void
MoveToSpan ( SnapshotSpan target ) : void

Method Details

BeginEditSnippet() public méthode

Moves caret to the first tab stop in the active snippet.
public BeginEditSnippet ( ) : void
Résultat void

CreateSnippetInView() public static méthode

Creates code snippet in the specified view.
public static CreateSnippetInView ( ViewContext view, Span tabStops, int tabStopGroups ) : CodeSnippet
view ViewContext Editor view that contains snippet.
tabStops Span Tab stops collection.
tabStopGroups int Groups the tab stop belongs to.
Résultat CodeSnippet

EndEditSnippet() public méthode

Detaches this object from the target view.
public EndEditSnippet ( ) : void
Résultat void

GetTabStopsPositions() public méthode

Gets this snippet tab stops positions in the active text snapshot.
public GetTabStopsPositions ( ) : Span[]
Résultat Span[]

TryMoveToNextTabStop() public méthode

Tries to move caret to next tab stop. Returns true if succeeded; false otherwise. False indicates that caret is not inside any of the available tab stops which indicates that tab stops tracking should be finished and this snippet should be detached from the view.
public TryMoveToNextTabStop ( bool reverse = false ) : bool
reverse bool Indicates whether move should be made in reverse direction.
Résultat bool