Exemplo n.º 1
0
        public int AddAdornments()
        {
            IVsTextView textView;

            if (ErrorHandler.Succeeded(CodeWindow.GetPrimaryView(out textView)) && textView != null)
            {
                ErrorHandler.ThrowOnFailure(OnNewView(textView));
            }
            if (ErrorHandler.Succeeded(CodeWindow.GetSecondaryView(out textView)) && textView != null)
            {
                ErrorHandler.ThrowOnFailure(OnNewView(textView));
            }

            if (ServiceProvider.GetHlslToolsService().LanguagePreferences.NavigationBar)
            {
                return(AddDropDownBar());
            }

            return(VSConstants.S_OK);
        }
Exemplo n.º 2
0
        public virtual int AddAdornments()
        {
            IVsTextView textView;

            if (ErrorHandler.Succeeded(CodeWindow.GetPrimaryView(out textView)) && textView != null)
            {
                ErrorHandler.ThrowOnFailure(OnNewView(textView));
            }
            if (ErrorHandler.Succeeded(CodeWindow.GetSecondaryView(out textView)) && textView != null)
            {
                ErrorHandler.ThrowOnFailure(OnNewView(textView));
            }

            int comboBoxCount;
            IVsDropdownBarClient client;

            if (LanguagePreferences.ShowDropdownBar && TryCreateDropdownBarClient(out comboBoxCount, out client))
            {
                ErrorHandler.ThrowOnFailure(AddDropdownBar(comboBoxCount, client));
                _dropdownBarClient = client;
            }

            return(VSConstants.S_OK);
        }