internal void Close() { if (Manager == null) { return; } try { if (_added) { GetService <IAnkhPackage>().UnregisterIdleProcessor(this); IVsDropdownBarManager dbm = Manager.CodeWindow as IVsDropdownBarManager; dbm.RemoveDropdownBar(); } OnClose(); List <ComboTextView> m = new List <ComboTextView>(_comboViews.Values); _comboViews.Clear(); foreach (ComboTextView ctv in m) { ctv.Dispose(); } } finally { _added = false; _manager = null; _activeView = null; _bar = null; } }
public AnkhLanguageDropDownBar(AnkhLanguage language, AnkhCodeWindowManager manager) : base(language) { if (manager == null) { throw new ArgumentNullException("manager"); } _manager = manager; }
public UnifiedDiffDropDownBar(UnifiedDiffLanguage language, AnkhCodeWindowManager manager) : base(language, manager) { IVsTextView view = EnumTools.GetFirst(manager.GetViews()); if (ErrorHandler.Succeeded(view.GetBuffer(out _buffer))) { if (!TryHookConnectionPoint<IVsTextLinesEvents>(_buffer, this, out _linesCookie)) _linesCookie = 0; } }
protected internal virtual void OnNewView(AnkhCodeWindowManager codeWindowManager, IVsTextView view) { AnkhViewFilter filter = CreateFilter(codeWindowManager, view); if (filter != null) { IOleCommandTarget chained; view.AddCommandFilter(filter, out chained); filter.AddChained(chained); } }
public virtual AnkhLanguageDropDownBar CreateDropDownBar(AnkhCodeWindowManager manager) { return(null); }
protected virtual AnkhViewFilter CreateFilter(AnkhCodeWindowManager manager, IVsTextView view) { return(new AnkhViewFilter(manager, view)); }
internal void OnCloseView(AnkhCodeWindowManager ankhCodeWindowManager, IVsTextView view) { }
public virtual AnkhLanguageDropDownBar CreateDropDownBar(AnkhCodeWindowManager manager) { return null; }
protected virtual AnkhViewFilter CreateFilter(AnkhCodeWindowManager manager, IVsTextView view) { return new AnkhViewFilter(manager, view); }
public AnkhViewFilter(AnkhCodeWindowManager codeWindowManager, IVsTextView textView) : base(codeWindowManager) { }
public override AnkhLanguageDropDownBar CreateDropDownBar(AnkhCodeWindowManager manager) { return new UnifiedDiffDropDownBar(this, manager); }