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:
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.
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.