Ejemplo n.º 1
0
        public vsCommandStatus Query(string name_)
        {
            Log.Debug("Trying to query command \"{0}\"", name_);

            string name = Basename(name_);

            if (!mCommands.ContainsKey(name))
            {
                Log.Debug("{0} is an unkown command", name_);
                return(vsCommandStatus.vsCommandStatusUnsupported);
            }

            CommandBase cmd = mCommands[name];

            if (cmd.IsEnabled())
            {
                Log.Debug("{0} is enabled", name_);
                return(vsCommandStatus.vsCommandStatusSupported | vsCommandStatus.vsCommandStatusEnabled);
            }
            else
            {
                Log.Debug("{0} is disabled", name_);
                return(vsCommandStatus.vsCommandStatusSupported);
            }
        }