Update or add Help Builder Topic from Source Code Block

Help Builder allows to import a class, method, field, property, event or class header into Help Builder including its XML Comment information from C# and VB.NET methods.

This is useful if you have previously imported a .Net class into Help Builder and want to now update the class with new comments you've made to existing members or if you've added new members to the class after you've made changes to the original class import. This allows two way movement of documentation between Source Code and Help Builder depending on where you like to create your primary documentation.

Note for VB.NET users
VB.NET 2003 doesn't support XML Comments natively, but if you use a third party product that uses the VB.NET Whidbey style syntax (triple single quotes) Help Builder can read and write XML Comments in this format. The following examples show C# code, but the procedure for VB.NET code is identical.

To import a member start this process by selecting a method, property, field or event that has an XML Comment associated with it and Right Click and select Update Help Builder Topic from an XML Comment:

This brings up one of two dialogs that allows either importing a new topic or updating an existing topic. Let's start with a new topic which allows you to specify the name the of the topic and the topic under which to attach it.

When you click the Import button the topic gets imported into Help Builder and the result looks like this:

Note that Help Builder actually pops up the new topic in Edit Mode rather than in preview mode as the image shown above. This is so you can go ahead and edit the topic as needed at this point. The Import operation imports all information available about the method including name, scope, return type, static status as well as any information available in the XML Comment section of the method.

Updating existing topics from an XML Comment

You can also update an existing topic from an XML comment. Every member imported into Help Builder is associated with a signature that describes the namespace, name and in the case of methods the parameters and return type which allows Help Builder to tell if a member was previously imported (as long as the signature is not changed). When you import a topic that already has a matching signature in the help file you get an Update dialog instead of the Import dialog:

You can choose to only import data that is new leaving anything that already has data filled into field in Help Builder with the existing values. Alternately you can choose to simply overwrite the entire topic with the content of the import member data.

Importing a new Class Header

If you highlight a class of an existing class, Help Builder will update the class header of this class only using the same functionality described above. However, if the class does not yet exist Help Builder will pop up a rather large MessageBox asking whether you want to rather import the class as a full .Net Type Import from an assembly. A full class import is much more powerful than importing just the class header, which merely pulls in the class's definition and a few pieces of information about the class itself, but not the actual class details.

Using the full class import provides the full features of the .Net meta data and imports both the class header and all the members of the class itself with much richer information. It's recommended that you use the latter approach, and if you click Yes on the dialog displayed you are directly whisked to the Import .Net Class Wizard. Note that you first will have to build your project in order to have binary assembly against which you can run the Class Wizard to choose a DLL or EXE file to import. For best results turn on XML Documentation for your build to have .Net generate the XML documentation file along with the assembly - Help Builder will use any comment information you have previously typed in.


  Last Updated: 8/8/2004 | © West Wind Techologies, 2007