Beispiel #1
0
 public void ChangeComplete(DocumentChangeEventArgs e)
 {
     foreach (var lt in _lineTrackers)
     {
         lt.ChangeComplete(e);
     }
 }
Beispiel #2
0
 void ILineTracker.ChangeComplete(DocumentChangeEventArgs e)
 {
     if (_targetObject.Target is ILineTracker targetTracker)
     {
         targetTracker.ChangeComplete(e);
     }
     else
     {
         Deregister();
     }
 }
Beispiel #3
0
 /// <summary>
 /// Updates the start and end offsets of all segments stored in this collection.
 /// </summary>
 /// <param name="e">DocumentChangeEventArgs instance describing the change to the document.</param>
 public void UpdateOffsets(DocumentChangeEventArgs e)
 {
     if (e == null)
     {
         throw new ArgumentNullException(nameof(e));
     }
     if (_isConnectedToDocument)
     {
         throw new InvalidOperationException("This TextSegmentCollection will automatically update offsets; do not call UpdateOffsets manually!");
     }
     OnDocumentChanged(this, e);
     CheckProperties();
 }
Beispiel #4
0
        private void OnDocumentChanged(object sender, DocumentChangeEventArgs e)
        {
            var map = e.OffsetChangeMapOrNull;

            if (map != null)
            {
                foreach (var entry in map)
                {
                    UpdateOffsetsInternal(entry);
                }
            }
            else
            {
                UpdateOffsetsInternal(e.CreateSingleChangeMapEntry());
            }
        }
 public DocumentChangeOperation(TextDocument document, DocumentChangeEventArgs change)
 {
     _document = document;
     _change   = change;
 }