Пример #1
0
        public void VsTextViewCreated(IVsTextView textView)
        {
            var wpfTextView = AdaptersFactory.GetWpfTextView(textView);

            if (wpfTextView == null)
            {
                Debug.Fail("Unable to get IWpfTextView from IVsTextView");
                return;
            }

            var adornmentManager = MacroAdornmentManager.Create(wpfTextView);
            var filter           = new MacroCommandFilter(adornmentManager);

            IOleCommandTarget next;

            if (ErrorHandler.Succeeded(textView.AddCommandFilter(filter, out next)))
            {
                filter.Next = next;
            }
        }
Пример #2
0
 // Constructor
 public MacroCommandFilter(MacroAdornmentManager adornmentManager)
 {
     this.AdornmentManager = adornmentManager;
 }
Пример #3
0
 // Constructor
 public MacroCommandFilter(MacroAdornmentManager adornmentManager)
 {
     this.AdornmentManager = adornmentManager;
 }