subscribe

C# developer by day, Ruby and budding Erlang enthusiast by night. Father, husband and all around good guy.

Programming

Lightweight Perforce integration in Visual Studio 2010

Wednesday, February 16th, 2011

This is something I’ve been doing to add very light-weight Perforce integration in Visual Studio 2010 without having to use source control bindings in the projects or solutions.

Basically I wanted a way to reduce context switches caused by needing to go to the command line to check out or add files in Perforce.

I ended up creating a few external commands (Tools -> External Tools) for perforce commands “Add” and “Edit” …

clip_image002

Then I created a new toolbar (Tools -> Customize)

clip_image004

And then from the toolbar in the IDE shell (which is empty so may be hard to find if you have many toolbars open) I clicked on the little down arrow and choose “Add or Remove Buttons” -> Customize.

From there I selected the “My Tools” toolbar I created:

clip_image006

And clicked “Add Command”

From there I picked “Tools” from Categories and “External Command 1” (this is the first item in the External Tools list – so “Edit” in this case)

clip_image008

And then back at the Customize window I clicked “Modify Selection” and renamed “External Command 1” to “Edit” to match the command.

Now when I have a file open in VS I can just click the “Edit” button and the file is checked out for edit and the output of the command line goes to the Output window (notice I had that option selected above when defining the External Tool).

image

It saves me from having to bounce back and forth between VS and the command line when I need to add/edit a file – this keeps my fingers on the keyboard and off the mouse.

User Experience Tip: Don’t mix units

Wednesday, August 19th, 2009

I need how much space?

image

Maybe I’m dense.  But I had to read this window not once or twice … but 5, yes 5, times before I realized that it was giving the “Required” units in “KB” and “Available” units in “MB”.

Please … unless your UX is a “convert unit X to Y” window, stick to one unit.