This VB procedure helps any developer to easily add comments to his/her code. The comments including some function details like function name, input parameter and return value. Also, the date when the function was written and the author name. All are retrieived automatically and it saves the developer time.
How does it work?
- The developer marks the function she wants to remark.
- The code parses the selected text and gets all of the relevant data from the function (i.e. name,input and return value)
- The description should be filled by the author
- Date is written as the current date
- Author is taken by the Windows login name
How can you use it?
-
- Open VC
- Go to Tools->Customize->Commands->Macros
- On the right pane click on the function AddFunctionDescription (should be the 1'st one), then drag it to the toolbar.
- You should see this function in the toolbar
-
- Go to Tools->Macors->Macro explorer
- In the tree, open Samples->DevStudio6Editor
- Right Click on AddFunctionDescription and choose Edit
- Replace the current code of this procedure with the one you have in the attached zip file.
- Save all the changes in all of the IDEs
-
- Select any function you have in the code (select the whole row)
- Click on the AddFunctionDescription button in the toolbar
- You will see the proper remark
-
- Sample: Supposed that you have the function void Foo(int bar) written by a guy
- named Henry. This macro will add the next lines just below you selected
- function.
- // ********************************************************************
- // Function name : Foo
- // Description :
- // Return type : void
- // Argument : bar
- //
- // Date : 1:10PM 12/13/2002
- // Author : henry
- // ********************************************************************