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
 Technical Support
 Question about newlines in document method
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

MrDoomMaster
Tomato Guru

251 Posts

Posted - May 28 2013 :  3:52:45 PM  Show Profile  Reply with Quote
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.

Edited by - MrDoomMaster on May 28 2013 3:54:01 PM

feline
Whole Tomato Software

United Kingdom
16778 Posts

Posted - May 28 2013 :  7:15:57 PM  Show Profile  Reply with Quote
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$ ?

zen is the art of being at one with the two'ness
Go to Top of Page

MrDoomMaster
Tomato Guru

251 Posts

Posted - May 28 2013 :  7:23:14 PM  Show Profile  Reply with Quote
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$.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
16778 Posts

Posted - May 29 2013 :  11:27:21 PM  Show Profile  Reply with Quote
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

zen is the art of being at one with the two'ness
Go to Top of Page

UweR
New Member

Germany
2 Posts

Posted - Jul 09 2020 :  05:21:59 AM  Show Profile  Reply with Quote
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?

Best regards,
UweR
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
16778 Posts

Posted - Jul 09 2020 :  07:08:31 AM  Show Profile  Reply with Quote
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.

zen is the art of being at one with the two'ness
Go to Top of Page

UweR
New Member

Germany
2 Posts

Posted - Jul 10 2020 :  04:02:04 AM  Show Profile  Reply with Quote
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...

Best regards,
UweR
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
16778 Posts

Posted - Jul 10 2020 :  06:16:05 AM  Show Profile  Reply with Quote
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.

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:
© 2019 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000