public virtual bool DisableCmdInCurrentMode()

in vsintegration/src/FSharp.ProjectSystem.Base/Project/HierarchyNode.cs [1778:1836]


        public virtual bool DisableCmdInCurrentMode(Guid commandGroup, uint command)
        {
            if (this.ProjectMgr == null || this.ProjectMgr.IsClosed)
            {
                return false;
            }

            // Don't ask if it is not these two commandgroups.
            if (commandGroup == VsMenus.guidStandardCommandSet97 || commandGroup == VsMenus.guidStandardCommandSet2K)
            {
                if (this.ProjectMgr.IsCurrentStateASuppressCommandsMode())
                {
                    if (commandGroup == VsMenus.guidStandardCommandSet97)
                    {
                        switch ((VsCommands)command)
                        {
                            default:
                                break;
                            case VsCommands.AddExistingItem:
                            case VsCommands.AddNewItem:
                            case VsCommands.NewFolder:
                            case VsCommands.Remove:
                            case VsCommands.Cut:
                            case VsCommands.Paste:
                            case VsCommands.Copy:
                            case VsCommands.EditLabel:
                            case VsCommands.Rename:
                            case VsCommands.UnloadProject:
                                return true;
                        }
                    }
                    else if (commandGroup == VsMenus.guidStandardCommandSet2K)
                    {
                        switch ((VsCommands2K)command)
                        {
                            default:
                                break;
                            case VsCommands2K.EXCLUDEFROMPROJECT:
                            case VsCommands2K.INCLUDEINPROJECT:
                            case VsCommands2K.ADDWEBREFERENCECTX:
                            case VsCommands2K.ADDWEBREFERENCE:
                            case VsCommands2K.ADDREFERENCE:
                            case VsCommands2K.SETASSTARTPAGE:
                                return true;
                        }
                    }
                }
                // If we are not in a cut or copy mode then disable the paste command
                else if (!this.ProjectMgr.AllowPasteCommand())
                {
                    if (commandGroup == VsMenus.guidStandardCommandSet97 && (VsCommands)command == VsCommands.Paste)
                    {
                        return true;
                    }
                }
            }

            return false;
        }