Visual-studio – use GhostDoc to add documentation to an entire class or code file

ghostdocvisual studio

I love GhostDoc, but I want to be able to "Document This" for an entire file, and not just one member at a time. Is this possible?

Best Answer

When I originally answered this question, this was not possible in GhostDoc, or in my (similar) addin, Atomineer Pro Documentation).

(This was an intentional design choice in Atomineer, and presumably also in GhostDoc, because it's a generally bad idea to document everything automatically and move on. Both these addins produce a reasonable starting point for documentation of a method, and sometimes they will provide good enough documentation that you don't need to make any adjustments - but most of the time you will want to tweak the resulting comment. If you auto-generate the entire documentation set, then the docs will be pretty poor, because they will do little more than describing what the code element names already state).

However, both addins now now provide this feature, which is very useful in the following situations:

  • (in Atomineer) To batch-convert legacy comments between JavaDoc, Doxygen, Qt and XML Documentation formats
  • (in Atomineer) To update the style/layout of documentation comments after changing the AtomineerUtils formatting options
  • (in both addins) To quickly add skeleton documentation to a class

In all these situations it is strongly recommended that you review the resulting comments, but automating the update does save a lot of time.