C# Class Microsoft.R.Editor.Selection.RSelectionTracker

JScript selection tracker. Helps preserve selection and correct caret position during script autoformatting. Uses tokenizer to calculate where caret should be after autoatic formatting.
Inheritance: Microsoft.Languages.Editor.Selection.SelectionTracker
Afficher le fichier Open project: Microsoft/RTVS Class Usage Examples

Méthodes publiques

Méthode Description
EndTracking ( ) : void

Restores saved selection

RSelectionTracker ( ITextView textView, ITextBuffer textBuffer, ITextRange changingRange ) : System

SelectionTracker constructor

StartTracking ( bool automaticTracking ) : void

Saves current selection

Private Methods

Méthode Description
PositionFromTokens ( ITextSnapshot snapshot, int itemIndex, int offset ) : int
TokenFromPosition ( ITextSnapshot snapshot, int position, int &itemIndex, int &offset ) : void

Method Details

EndTracking() public méthode

Restores saved selection
public EndTracking ( ) : void
Résultat void

RSelectionTracker() public méthode

SelectionTracker constructor
public RSelectionTracker ( ITextView textView, ITextBuffer textBuffer, ITextRange changingRange ) : System
textView ITextView Text view
textBuffer ITextBuffer Editor text buffer (may be different from one attached to text view)
changingRange ITextRange Range that is changing in the buffer
Résultat System

StartTracking() public méthode

Saves current selection
public StartTracking ( bool automaticTracking ) : void
automaticTracking bool
Résultat void