获取DTE.ExecuteCommand的可用命令的完整列表 [英] Get full list of available commands for DTE.ExecuteCommand

查看:516
本文介绍了获取DTE.ExecuteCommand的可用命令的完整列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用VS2010和Addin,使用DTE.ExecuteCommand和Build,Build.Cancel,Build.RebuildSolution等命令。

I use VS2010 and Addin, using DTE.ExecuteCommand and commands like Build, Build.Cancel, Build.RebuildSolution, etc.

您可以使用DTE .Commands.Item(xxx)并猜测它是否可用于Command.IsAvailable。命令列表在工具,选项窗口,环境,键盘部分。

You can get a command with DTE.Commands.Item("xxx") and guess if it is available with Command.IsAvailable. The list of commands is in the Tools, Options window, Environment, Keyboard section.

还有,你知道DTE.ExecuteCommand需要两个字符串作为参数。

Too, as you know DTE.ExecuteCommand takes two strings as parameters.

第一个是命令的名称(例如,Action.CreateNewShortcut),第二个是命令需要的参数。

The first one is the name of the command (for example, Action.CreateNewShortcut) and the second one is the arguments that the command takes.

问题是一些命令需要可变数量的参数,我不知道顺序等。

The problem is that some commands require a variable number of arguments and I don't know the order, etc.

例如我猜Action.CreateNewShortcut需要至少两个参数:执行快捷方式时执行的操作(Build.RebuildSolution)和快捷方式本身(Alt + O)。

For example I guess Action.CreateNewShortcut needs at least two arguments: the action to be run when the shortcut is executed (Build.RebuildSolution) and the shortcut itself ( Alt+O).

有超过4k命令在VS.但是Microsoft没有关于它的官方文档。

There are over 4k commands in VS. but Microsoft hasn't official documentation about it, I think.

对于DTE.ExecuteCommand

It would be very useful any official documentation with FULL list of available commands for DTE.ExecuteCommand

有任何建议吗?

推荐答案


  • 开启Visual Studio的选项对话框

  • 选择环境/键盘页面

  • 您可以在显示包含命令的框中搜索特定命令,或者只滚动其后面的列表。

  • Open Visual Studio's Options Dialog Box
  • Select the Environment/Keyboard page
  • You can search for a specific command in the "Show commands containing:" box, or just scroll the list behind it.

这篇关于获取DTE.ExecuteCommand的可用命令的完整列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆