Method | Description | |
---|---|---|
BeginEditSnippet ( ) : void |
Moves caret to the first tab stop in the active snippet.
|
|
CreateSnippetInView ( ViewContext view, Span tabStops, int tabStopGroups ) : |
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.
|
Method | 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 |
public static CreateSnippetInView ( ViewContext view, Span tabStops, int tabStopGroups ) : |
||
view | ViewContext | Editor view that contains snippet. |
tabStops | Span | Tab stops collection. |
tabStopGroups | int | Groups the tab stop belongs to. |
return |
public TryMoveToNextTabStop ( bool reverse = false ) : bool | ||
reverse | bool | Indicates whether move should be made in reverse direction. |
return | bool |