Example #1
0
        public bool TryAdd(IUICommandDescriptor command)
        {
            var vsCommand = new VsCommand(command).Register();
            if (vsCommand == null) return false;
            this[vsCommand.CommandGroupGuid, vsCommand.CommandId] = vsCommand;

            if (command.Context == UICommandContext.Global)
            {
                vsCommand.RegisterUI(ToolsMenu);
            }

            return true;
        }
Example #2
0
        public bool TryAdd(IUICommandDescriptor command)
        {
            var vsCommand = new VsCommand(command).Register();

            if (vsCommand == null)
            {
                return(false);
            }
            this[vsCommand.CommandGroupGuid, vsCommand.CommandId] = vsCommand;

            if (command.Context == UICommandContext.Global)
            {
                vsCommand.RegisterUI(ToolsMenu);
            }

            return(true);
        }