Example #1
0
 public void RegisterLineChangeHandler(uint document,
                                       TextLineChangeEvent lineChanged, Action <IVsTextLines> onIdle)
 {
     _documents[document].OnFileChangedImmediate += delegate(object sender, TextLineChange[] changes, int fLast) {
         lineChanged(sender, changes, fLast);
     };
     _documents[document].OnFileChanged += (sender, args) => onIdle(args.TextBuffer);
 }
        void IVsTextLinesEvents.OnChangeLineText(TextLineChange[] pTextLineChange, int fLast)
        {
            TextLineChangeEvent eh = OnFileChangedImmediate;

            if (null != eh)
            {
                eh(this, pTextLineChange, fLast);
            }

            isDirty = true;
        }
        void IVsTextLinesEvents.OnChangeLineText(TextLineChange[] pTextLineChange, int fLast)
        {
            TextLineChangeEvent eh = OnFileChangedImmediate;

            if (null != eh)
            {
                eh(this, pTextLineChange, fLast);
            }
            // As soon as we have a modification on a buffer... Maybe a little bit too much !! :)
            isDirty = true;
        }
Example #4
0
        public void RegisterLineChangeHandler(uint document,
                                              TextLineChangeEvent lineChanged, Action <IVsTextLines> onIdle)
        {
#if TEXTCHANGELISTENER
            documents[document].OnFileChangedImmediate += delegate(object sender, TextLineChange[] changes, int fLast)
            {
                lineChanged(sender, changes, fLast);
            };
            documents[document].OnFileChanged += delegate(object sender, HierarchyEventArgs args)
            {
                onIdle(args.TextBuffer);
            };
#endif
        }
Example #5
0
 public void RegisterLineChangeHandler(uint document,
     TextLineChangeEvent lineChanged, Action<IVsTextLines> onIdle)
 {
     _documents[document].OnFileChangedImmediate += delegate(object sender, TextLineChange[] changes, int fLast) {
         lineChanged(sender, changes, fLast);
     };
     _documents[document].OnFileChanged += delegate(object sender, HierarchyEventArgs args) {
         onIdle(args.TextBuffer);
     };
 }