- Create your external tool using the "Tools=>External Tools" menu option. Your new external tool will be called "External Command n" where 'n' is the external menu item tool location in the external menu items group of the Tools menu
- Open "Tools=>Customize" dialog.
- Select "Context Menus" in the "Toolbars" tab.
- The context menus will appear on the toolbar. Select a context menu from one on the toolbar. Some useful ones are:
- "Project and Solution Context Menus=>Item" - This is the file context menu in the solutions folder
- "Project and Solution Context Menus=>Project" - This is the project context menu in the solutions folder
- "Other Context Menus=>Easy MDI Document Window" - Not obvious. This is the context menu for the tab at the top of a file editor window
- Goto "Command" tab and select "Tools" in the categories tab. From the "Commands:" list select the appropriate "External Command n"
Title: P4 Checkout
Command: C:\Program Files (x86)\Perforce\p4.exe
Arguments: edit $(ItemPath)
Initial Directory: $(ItemDir)
Select "Use Output window"
As shown here:
Title: P4 Revert
Command: C:\Program Files (x86)\Perforce\p4.exe
Arguments: revert $(ItemPath)
Initial Directory: $(ItemDir)
Select "Use Output window"
No comments:
Post a Comment