I need some help with a macro implemenation in ReSharper 8 (not 7, only 8)
Goal: I want to template code commentary seperator blocks that look like this. The second line is a repeated character (the char is actually U2500, not Minus) and shall have the same length as the comment above.
// CODE SEPERATOR COMMENT
so I'm creating a life template ...
... and now $commentline$ shall call a macro with 2 parameters; first one is the character ('-', '=', '~') to repeat, second one is the reference to $comment$.
That was the easy part. Now, how do I define parameters in the macro implementation? If there's no way to label or describe or something these parameters in Template Explorer (just having 2 "silent" fields stacked to each other) then I got this part working. But how do I access the value of these parameters in string EvaluateQuickResult(IHotspotContext context)? There's no more IList<> in the method's signature, so I assume I have to extract it from the 7 gazillion properties and fields in "context".
string paramCharacter = ...;
string paramComment = ...;
return new string(paramCharacter, paramComment.Length);
Now, the bogus question. Is there a way to keep or modify $comment$ UPPERCASED while typing? Only interested if it's simple and can be realized in less than 10 code lines (without adding another bunch of classes).