Home > Visualization > Visualization – XML Doc Comments Painter

Visualization – XML Doc Comments Painter

May 31st, 2011

The XML Doc Comments Painter feature of CodeRush Pro paints over XML documentation comments in the code editor, so they are easier to read in a nice-looking form. It visually replaces all XML doc tags and make them hidden, and leave the important information only:

CodeRush XML Doc Comments Painter preview

instead of this:

No CodeRush XML Doc Comments enabled

If you want to edit an XML doc comment, just move the editor caret inside of it, so the original comment become visible.

You can quickly toggle the availability of the feature on the DXCore Visualize Toolbar:

CodeRush XML Doc Comments on the DXCore Visualize Toolbar

The feature is open source from the CodeRush Shared Source Solution, so you can tweak it, according to your preference. There are numerous options available for you on the Editor | Painting | XML Doc Comments options page in the Options Dialog:

CodeRush XML Doc Comments options page

The Enabled check box toggles the feature on or off. The most important part of the Options page is the Tag list, where you can choose a cell (Name, Details, Remarks, Other) of a drawn table, and tweak the following options:

Option Name


Background Color The background color of the left column.
Font The font name used for a text in a left or right column.
Style The style of the font: Regular, Bold or Italic.
Color The color of the font for the selected tag.

The bottom part of the Options page has a Preview box where you can see the current changes you’ve made to the feature, for example:

CodeRush XML Doc Comments options preview

You can also bind a key to toggle functionality of the XML Doc Comments Painter, using the ToggleXMLDocComments action name.

Products: CodeRush Pro
Versions: 10.2 and up
VS IDEs: any
Updated: Jun/02/2011
ID: C102

Similar Posts:

  1. Robert Leahey
    January 3rd, 2012 at 12:37 | #1

    Hi Alex, this is more of a DXCore question, unrelated to this post, but it does tie-in… 😉
    One of my plug-ins parses out xml comments and displays them in a SuperToolTip; I have to go through a lot of effort in my parsing (removing whitespace while concatenating specific tags’ text, stripping -tags, etc.). Your post here about the comments painter makes me think that perhaps you already have some methods or a service in DXCore that could help me deal with XML Doc Comment texts. Can you recommend such a service/methods?

  2. January 6th, 2012 at 08:32 | #2

    @ Robert Leahey
    Hi Robert. Unfortunately, there are no concrete services or methods that deal with XML Doc Comments. In the XML Doc Painter plug-in we simply use the same techniques such as trimming and splitting text without using specific DXCore XML APIs. You might want to take a look at the source code for this plug-in because it is shipped as an open source plug-in.