in Nodejs/Product/Nodejs/SharedProject/ProjectNode.IOleCommandTarget.cs [357:422]
protected virtual bool DisableCmdInCurrentMode(Guid commandGroup, uint command)
{
if (this.IsClosed)
{
return false;
}
// Don't ask if it is not these commandgroups.
if (commandGroup == VsMenus.guidStandardCommandSet97 ||
commandGroup == VsMenus.guidStandardCommandSet2K ||
commandGroup == this.SharedCommandGuid)
{
if (this.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;
}
}
else if (commandGroup == this.SharedCommandGuid)
{
switch ((SharedCommands)command)
{
case SharedCommands.AddExistingFolder:
return true;
}
}
}
// If we are not in a cut or copy mode then disable the paste command
else if (commandGroup == VsMenus.guidStandardCommandSet97 && (VsCommands)command == VsCommands.Paste)
{
return !this.AllowPasteCommand();
}
}
return false;
}