예제 #1
0
        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;
            }
        }
예제 #2
0
        public AnkhLanguageDropDownBar(AnkhLanguage language, AnkhCodeWindowManager manager)
            : base(language)
        {
            if (manager == null)
            {
                throw new ArgumentNullException("manager");
            }

            _manager = manager;
        }
예제 #3
0
        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;
            }
        }
예제 #4
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);
            }
        }
예제 #5
0
 public virtual AnkhLanguageDropDownBar CreateDropDownBar(AnkhCodeWindowManager manager)
 {
     return(null);
 }
예제 #6
0
 protected virtual AnkhViewFilter CreateFilter(AnkhCodeWindowManager manager, IVsTextView view)
 {
     return(new AnkhViewFilter(manager, view));
 }
예제 #7
0
 internal void OnCloseView(AnkhCodeWindowManager ankhCodeWindowManager, IVsTextView view)
 {
 }
예제 #8
0
 public virtual AnkhLanguageDropDownBar CreateDropDownBar(AnkhCodeWindowManager manager)
 {
     return null;
 }
예제 #9
0
 protected virtual AnkhViewFilter CreateFilter(AnkhCodeWindowManager manager, IVsTextView view)
 {
     return new AnkhViewFilter(manager, view);
 }
예제 #10
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);
            }
        }
예제 #11
0
 internal void OnCloseView(AnkhCodeWindowManager ankhCodeWindowManager, IVsTextView view)
 {
 }
예제 #12
0
 public AnkhViewFilter(AnkhCodeWindowManager codeWindowManager, IVsTextView textView)
     : base(codeWindowManager)
 {
 }
예제 #13
0
 public override AnkhLanguageDropDownBar CreateDropDownBar(AnkhCodeWindowManager manager)
 {
     return new UnifiedDiffDropDownBar(this, manager);
 }
예제 #14
0
 public AnkhViewFilter(AnkhCodeWindowManager codeWindowManager, IVsTextView textView)
     : base(codeWindowManager)
 {
 }