Example #1
0
        public int AddAdornments()
        {
            IVsTextView primaryView, secondaryView;
            if (ErrorHandler.Succeeded(_window.GetPrimaryView(out primaryView)) && primaryView != null)
                OnNewView(primaryView);

            if (ErrorHandler.Succeeded(_window.GetSecondaryView(out secondaryView)) && secondaryView != null)
                OnNewView(secondaryView);

            if (primaryView != null || secondaryView != null)
            {
                AnkhLanguageDropDownBar bar = Language.CreateDropDownBar(this);

                if (bar != null)
                {
                    _bar = bar;

                    bar.Initialize();
                }
            }

            return VSConstants.S_OK;
        }
Example #2
0
        public int RemoveAdornments()
        {
            AnkhLanguageDropDownBar bar = _bar;
            _bar = null;

            if (bar != null)
                bar.Close();
            return VSConstants.S_OK;
        }