T O P I C R E V I E W |
MrDoomMaster |
Posted - May 28 2013 : 3:52:45 PM I am currently using the following for my document method snippet:
/**
* BRIEF
*
* @param $MethodArgName$
*/
After $MethodArgName$ I want to add a NEWLINE followed by some spaces. This allows me to have something like this when I document a method:
/**
* BRIEF
*
* @param Arg1
* Documentation for Arg1
* @param Arg2
* Documentation for Arg2
*/
When each parameter is generated, it only considers the line it is on. So if I add a newline & spaces below it in my snippet, those aren't duplicated for each argument. If there were some variables for whitespace characters this might work:
$newline$ - Newline (\\r\\n) $tab$ - Tab character (\\t) $tabspace$ - Tab, but spaces instead
Then I could setup my snippet like so:
/**
* BRIEF
*
* @param $MethodArgName$$newline$ *$tabspace$Documentation for $MethodArgName$
*/
If I can't currently do something like this, please make it a feature request. |
7 L A T E S T R E P L I E S (Newest First) |
feline |
Posted - Jul 10 2020 : 06:16:05 AM It hasn't been rejected, it just hasn't been done yet. We have many outstanding bug reports and feature requests, as is normal for any complex software, and somehow we need to prioritise these, and work through them in a sensible manor.
Unfortunately this isn't something that many users are reporting interest in, and it hasn't currently made it to the top of the pile.
As for the regular expression find and replace, do you have any tools on hand that would make it easy to automate this? In older versions of Visual Studio, while they still contained VBScript macro support, I wrote an IDE macro to do a regular expression find and replace, and the macro stored your current find settings before doing the regular expression find and replace, and then restored your find settings afterwards.
Obviously that solution no longer works since IDE macros were removed, since hardly anyone used them, but there are IDE extensions to enable macros once more. |
UweR |
Posted - Jul 10 2020 : 04:02:04 AM quote: Originally posted by feline
Unfortunately no progress on this yet.
That's a great pity. 
quote:
But, if you want to try a work around,
But this only works if I activate the regex mode in VS2019 in "search and replace". And since we still have to act manually here, this is not what my colleagues and I are looking for. We would like to have a fully automated solution. Why did the developers reject Ticket 74596?
Due to a limitation of the line length in our team it is not possible for us to insert a meaningful description of a parameter "behind" the parameter itself. For the description we need a new line. Is there really no other solution? Ticket 74596 would help... |
feline |
Posted - Jul 09 2020 : 07:08:31 AM Unfortunately no progress on this yet.
But, if you want to try a work around, you could try placing a marker, e.g. "DOC_METHOD_NEW_LINE" into your Document Method snippet. You could then run a search and replace to replace the marker with a \n and the appropriate comment marker and white space, to convert all of the comment blocks to the desired format in a single find and replace. |
UweR |
Posted - Jul 09 2020 : 05:21:59 AM quote: Originally posted by feline
I have now put in the feature request, to see what our developers make of it:
case=74596
I have the same requirements as MrDoomMaster. Is there a solution for this meanwhile? |
feline |
Posted - May 29 2013 : 11:27:21 PM That makes sense, I just wanted to make sure that I understood correctly before putting in a feature request. I have now put in the feature request, to see what our developers make of it:
case=74596 |
MrDoomMaster |
Posted - May 28 2013 : 7:23:14 PM quote: Originally posted by feline
As you have worked out, you cannot currently do this. This is a good solution, nice and simple, I like it 
I am not sure what you mean about $tabspace$ though. For tabs and spaces why not simply place them into the snippet directly, so you only need the one new token $newline$ ?
Oh I didn't think about that, for some reason I thought tabs couldn't be placed in the snippet editor. Sorry about that :)
So in that case we just need a $newline$. |
feline |
Posted - May 28 2013 : 7:15:57 PM As you have worked out, you cannot currently do this. This is a good solution, nice and simple, I like it 
I am not sure what you mean about $tabspace$ though. For tabs and spaces why not simply place them into the snippet directly, so you only need the one new token $newline$ ? |
|
|