
284
|
Chapter 8, Comments and Documentation
#69 Create Comments Faster
HACK
Getting Started
First, you will need to download and run the GhostDoc installer from http://
www.roland-weigelt.de/ghostdoc.
After running the GhostDoc installer, the next time you start Visual Studio,
a couple of configuration dialogs appear to complete the setup (for exam-
ple, choose a hotkey). Note that GhostDoc cannot install a hotkey if Visual
Studio is not already using a custom keyboard scheme—this is a limitation
of Visual Studio’s extensibility model. If you are not sure, simply try to
assign a hotkey; if GhostDoc setup encounters a problem, it will tell you
what to do.
GhostDoc comes with a C# source file that demonstrates the features of this
add-in; simply load the demo project, which can be found in a subdirectory
of the folder GhostDoc was installed to. Inside Visual Studio, open the
Demo.cs C# file, move the cursor into the body of a method, for example,
and invoke the Document This command. The Document This command
can be invoked using the hotkey, from the right-click menu, or from Tools
➝ GhostDoc ➝ DocumentThis.
After you invoke the Document This command, GhostDoc will go to work
and generate as much of your XML comments as it can.
Tweaking GhostDoc
Certain aspects of GhostDoc can be configured:
• Which words are treated as acronyms
• Which words must not be preceded by “the”
• Which words trigger the “of the” ...