Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Feature Requests
 [AutoText] Macro's or 'Smart' Text

You must be registered to post a reply.
Click here to register.

Screensize:
UserName:
Password:
Format: BoldItalicizeUnderlineStrikethrough Align leftCenterAlign right Insert horizontal ruleUpload and insert imageInsert hyperlinkInsert email addressInsert codeInsert quoted textInsert listInsert Emoji
   
Message:

Forum code is on.
Html is off.

 
Check to subscribe to this topic.
   

T O P I C    R E V I E W
AviCharlie Posted - Jul 23 2007 : 11:26:14 AM
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.
2   L A T E S T    R E P L I E S    (Newest First)
feline Posted - Jul 23 2007 : 1:34:15 PM
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
AviCharlie Posted - Jul 23 2007 : 11:35:41 AM
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.

© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000