Click here to Skip to main content
Licence 
First Posted 11 Dec 2002
Views 126,460
Bookmarked 14 times

Code usability

By | 16 Dec 2002 | Article
Macro to add description to any function written by developers.

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
    • // ********************************************************************

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

About the Author

oferudi



Israel Israel

Member



Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board. (secure sign-in)
 
Search this forum  
 FAQ
    Noise  Layout  Per page   
  Refresh
GeneralIt doesn't work PinmemberMikeTheProgrammer1:36 21 Sep '03  
GeneralC#.NET already has automatic comment ability... PinmemberMarc Clifton1:14 17 Dec '02  
GeneralRe: C#.NET already has automatic comment ability... PinmemberMichael P Butler0:04 19 Dec '02  
GeneralRe: C#.NET already has automatic comment ability... PinmemberLennybacon10:09 23 Dec '02  
GeneralRe: C#.NET already has automatic comment ability... PinmemberHades5k7:29 20 Sep '07  
GeneralA revision history might be useful PinmemberMarc Clifton0:57 17 Dec '02  
QuestionWhere is a StripTabs? Pinmember_Samael_1:39 16 Dec '02  
Generalsuggestions PinmemberHenry Jacobs7:41 13 Dec '02  
GeneralRe: suggestions Pinmemberoferudi19:42 16 Dec '02  
GeneralRe: suggestions Pinmemberjhwurmbach21:39 16 Dec '02  
GeneralNot being picky PinmemberNorm Almond21:11 12 Dec '02  
GeneralRe: Not being picky PinmemberDavid Stone7:56 14 Dec '02  
GeneralPlease reformat the text of your article PinmemberMatthias Mann2:29 12 Dec '02  
GeneralRe: Please reformat the text of your article Pinmemberleppie8:10 12 Dec '02  
GeneralRe: Please reformat the text of your article PinsitebuilderUwe Keim20:08 12 Dec '02  
GeneralRe: Please reformat the text of your article PinmemberNorm Almond21:13 12 Dec '02  

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Mobile
Web01 | 2.5.120517.1 | Last Updated 17 Dec 2002
Article Copyright 2002 by oferudi
Everything else Copyright © CodeProject, 1999-2012
Terms of Use
Layout: fixed | fluid