/// <summary> /// Executes a command from the standard Visual Studio 2000 command set. /// </summary> /// <param name="command">The command to execute.</param> /// <returns>true if the command is supported; otherwise, false.</returns> public override bool ExecuteStandard2KCommand(VsCommand2K command) { bool supported = true; switch (command) { case VsCommand2K.ADDREFERENCE: this.Hierarchy.ShowAddReferenceDialog(); break; default: supported = base.ExecuteStandard2KCommand(command); break; } return(supported); }
/// <summary> /// Executes a command from the standard Visual Studio 2000 command set. /// </summary> /// <param name="command">The command to execute.</param> /// <returns>true if the command is supported; otherwise, false.</returns> public virtual bool ExecuteStandard2KCommand(VsCommand2K command) { bool supported = true; switch (command) { case VsCommand2K.EXCLUDEFROMPROJECT: this.RemoveFromProject(); break; default: supported = false; break; } return(supported); }
//========================================================================================== // Methods //========================================================================================== /// <summary> /// Queries the state of a command from the standard Visual Studio 2000 command set on this node. /// </summary> /// <param name="command">The command to query.</param> /// <returns>One of the <see cref="CommandStatus"/> values if the node handles the command; /// otherwise <see cref="CommandStatus.Unhandled"/>.</returns> public override CommandStatus QueryStandard2KCommandStatus(VsCommand2K command) { CommandStatus status = CommandStatus.Unhandled; switch (command) { case VsCommand2K.ADDREFERENCE: status = CommandStatus.SupportedAndEnabled; break; default: status = base.QueryStandard2KCommandStatus(command); break; } return(status); }
/// <summary> /// Queries the state of a command from the standard Visual Studio 2000 command set on this node. /// </summary> /// <param name="command">The command to query.</param> /// <returns>One of the <see cref="CommandStatus"/> values if the node handles the command; /// otherwise <see cref="CommandStatus.Unhandled"/>.</returns> public virtual CommandStatus QueryStandard2KCommandStatus(VsCommand2K command) { CommandStatus status = CommandStatus.Unhandled; switch (command) { case VsCommand2K.EXCLUDEFROMPROJECT: if (this.CanRemoveFromProject) { status = CommandStatus.SupportedAndEnabled; } else { status = CommandStatus.NotSupportedOrEnabled; } break; } return(status); }
/// <summary> /// Queries the state of a command from the standard Visual Studio 2000 command set on this node. /// </summary> /// <param name="command">The command to query.</param> /// <returns>One of the <see cref="CommandStatus"/> values if the node handles the command; /// otherwise <see cref="CommandStatus.Unhandled"/>.</returns> public override CommandStatus QueryStandard2KCommandStatus(VsCommand2K command) { if (this.Unavailable) { return(CommandStatus.Unhandled); } CommandStatus status = CommandStatus.Unhandled; switch (command) { case VsCommand2K.ADDREFERENCE: status = this.ReferencesNode.QueryStandard2KCommandStatus(command); break; default: status = base.QueryStandard2KCommandStatus(command); break; } return(status); }
//========================================================================================== // Methods //========================================================================================== /// <summary> /// Queries the state of a command from the standard Visual Studio 2000 command set on this node. /// </summary> /// <param name="command">The command to query.</param> /// <returns>One of the <see cref="CommandStatus"/> values if the node handles the command; /// otherwise <see cref="CommandStatus.Unhandled"/>.</returns> public override CommandStatus QueryStandard2KCommandStatus(VsCommand2K command) { CommandStatus status = CommandStatus.Unhandled; switch (command) { case VsCommand2K.ADDREFERENCE: status = CommandStatus.SupportedAndEnabled; break; default: status = base.QueryStandard2KCommandStatus(command); break; } return status; }
/// <summary> /// Executes a command from the standard Visual Studio 2000 command set. /// </summary> /// <param name="command">The command to execute.</param> /// <returns>true if the command is supported; otherwise, false.</returns> public override bool ExecuteStandard2KCommand(VsCommand2K command) { bool supported = true; switch (command) { case VsCommand2K.ADDREFERENCE: this.Hierarchy.ShowAddReferenceDialog(); break; default: supported = base.ExecuteStandard2KCommand(command); break; } return supported; }
protected virtual bool ExecuteStandard2KCommand(Node node, VsCommand2K command) { Tracer.VerifyNonNullArgument(node, "node"); bool supported = node.ExecuteStandard2KCommand(command); Tracer.WriteLineIf(classType, "ExecuteStandard2KCommand", Tracer.Level.Verbose, !supported, "Not executing the command '{0}'", command); return supported; }
/// <summary> /// Queries the state of a command from the standard Visual Studio 2000 command set on this node. /// </summary> /// <param name="command">The command to query.</param> /// <returns>One of the <see cref="CommandStatus"/> values if the node handles the command; /// otherwise <see cref="CommandStatus.Unhandled"/>.</returns> public virtual CommandStatus QueryStandard2KCommandStatus(VsCommand2K command) { CommandStatus status = CommandStatus.Unhandled; switch (command) { case VsCommand2K.EXCLUDEFROMPROJECT: if (this.CanRemoveFromProject) { status = CommandStatus.SupportedAndEnabled; } else { status = CommandStatus.NotSupportedOrEnabled; } break; } return status; }
/// <summary> /// Executes a command from the standard Visual Studio 2000 command set. /// </summary> /// <param name="command">The command to execute.</param> /// <returns>true if the command is supported; otherwise, false.</returns> public virtual bool ExecuteStandard2KCommand(VsCommand2K command) { bool supported = true; switch (command) { case VsCommand2K.EXCLUDEFROMPROJECT: this.RemoveFromProject(); break; default: supported = false; break; } return supported; }
/// <summary> /// Queries the state of a command from the standard Visual Studio 2000 command set on this node. /// </summary> /// <param name="command">The command to query.</param> /// <returns>One of the <see cref="CommandStatus"/> values if the node handles the command; /// otherwise <see cref="CommandStatus.Unhandled"/>.</returns> public override CommandStatus QueryStandard2KCommandStatus(VsCommand2K command) { if (this.Unavailable) { return CommandStatus.Unhandled; } CommandStatus status = CommandStatus.Unhandled; switch (command) { case VsCommand2K.ADDREFERENCE: status = this.ReferencesNode.QueryStandard2KCommandStatus(command); break; default: status = base.QueryStandard2KCommandStatus(command); break; } return status; }