Introduction
While writing a project I got into many difficulties related to commenting. I solved these using the morefast add-In tool after implementing a little file/function commenting functionality. So I have made this little but useful add-in to help people who want to organize their code. I want to extend this add-in and have many ideas but due to time problems (which everyone has) I am posting only this three featured add-in.
There are three files.
- CppCWiz.dll
- Macro.txt
- CommTemp.txt
Extract these files in one directory.
How you can make a new macro:
- First #@ sign.
- Macroname Covered With $.
- then = YOURSTRING
- Last @#.
e.g.
#@ $UD_COMPANYNAME$ = Sahajanand Software Private Ltd. @#
#@ $MyName$ = Manish Pansiniya @#
How can you make changes to the template:
//
// Default Template For File Comment Look Like This Look Like This.
//
[FILE COMMENT]
/*******************************************************************
* $FILENAME$
*******************************************************************
* AUTHOR : $AUTHOR$
* PROJECT : $PROJECT$
* DESCRIPTION : $ASKTOUSERDESCRIPTION$
* ----------------------------------------------------------------
* Revision History :
* $DATE$ $USERNAME$ Initial Version.
*
* ----------------------------------------------------------------
* Copyright (c) 2002 $UD_COMPANYNAME$
******************************************************************/
[~FILE COMMENT]
Now, you can see the macro with $ signs. These macros are defined in
macro.txt. We saw that in the previous section.
$FILENAME$
is my internal macro which you can't change. Internal fixed macros:
"$FILENAMEWPATH$" - FileName With Path
"$FILENAME$" - FileName
"$SELECTION$" - Current Selection In Workspace.
"$PROJECT$" - Project Name.
"$AUTHOR$" - Author Name. You must provide this in macro.txt.
"$DATE$" - Today's Date.
So you can't use these macros except author. You must define author macro in
macro.txt file. Next macro is
$ASKTOUSERDESCRIPTION$
. If you want to ask any information from the user, then define
ASKTOUSER
and then your description,
e.g. $ASKTOUSERFUNCTION
$ASKTOUSERCHANGELOG etc.
Add-In Buttons Descriptions (AddIn Utilities)
FileComment Button :- This button is file comment. File comment template is stored in CommTemp.txt file. You can change the file comment by changing the file comment template in the CommTemp.txt file.
FunctionComment Button :- This button is the function comment. The function comment template is stored in the CommTemp.txt file. You can change the function comment by changing the function comment template in the CommTemp.txt file.
ChangeLog Button :- This button is the ChangeLog comment. The ChangeLog comment template is stored in CommTemp.txt. You can change the ChangeLog comment by changing the function comment template in the CommTemp.txt file.
Option :- Options are not yet fully implemented but you can open macro.txt and the Commtemp.txt file using Explorer, and you can see online your macros.