Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
User name:
Password:
Save Password
Forgot your password?

 All Forums
 Visual Assist
 Feature Requests
 [AutoText] Macro's or 'Smart' Text
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

AviCharlie
New Member

USA
8 Posts

Posted - Jul 23 2007 :  11:26:14 AM  Show Profile  Reply with Quote
I did not find this type of feature in the documentation so if it already exists I must have missed it. This is not a bug report - just a suggesting for a new feature.

It would be great to get some kind of macro implementation in the Refactor auto text functionality. This would help out greatly when documenting code to a specific code standard or when using doxygen style tags for function headers.

For example, lets say the following template is used for documenting function headers...

//
// Function: ClassName::FunctionName
///
/// A description of the function goes here
///
/// \\param[in/out/both] param name
/// Description of the parameter here
///
/// \\return
/// Description of what the function returns here
///

If you have a function that returns void then you omit the \\return line and all those below it. If you have multiple parameters then you would have a \\param[] line and the description below it for each one and a line containing /// between each one.

What I am currently using for auto text for the Refactor document method is as follows:

//
// Function: $SymbolContext$
///
/// $end$
///
/// \\param[] $MethodArgName$
///
///
/// \\return
///
///

This is OK but has the following problems (at least for me - may be fine for other code standards):

1. The $SymbolContext$ adds the namespace as well as the class name.
2. If the function has more than one parameter it puts them on consecutive lines with no /// lines in between.
3. If the function returns void the \\return line and all those below it still appear.

I am sure from this you can see what I am getting at. If there were a way to do something along the lines of $If ($ReturnType$ != void) { ///\\return \\n /// \\n /// \\n }$ then those bottom lines will not appear when the return type is void. Another addition to the auto text special characters could be something along the lines of $SymbolContextMini$ that would only give you ClassName::FunctionName instead of NameSpace::ClassName::FunctionName.

Thanks.

AviCharlie
New Member

USA
8 Posts

Posted - Jul 23 2007 :  11:35:41 AM  Show Profile  Reply with Quote
In addition... when a constructor is implemented with (void) the auto text will generate a line in the function documentation for void using $MethodArgName$. It would be great if there was a way to make it not see void as an argument.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19024 Posts

Posted - Jul 23 2007 :  1:34:15 PM  Show Profile  Reply with Quote
You are basically talking about providing autotext with a programming language. This is discussed in this thread:

http://forum.wholetomato.com/forum/topic.asp?TOPIC_ID=6428

The problem of "void" being reported as a parameter is a bug and I have put in a bug report for this:

case=7840

zen is the art of being at one with the two'ness
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000