Posted 20 years ago by GMilano
I'm going to implement Code Snippets similar to the whidbey. For example when I write foreach I would like to replace for

foreach ( $Type$ $Var$ in $Collection$)

After replacing the $Type$ should be selected, press tab and $Var$ should be selected (all that seems not dificult) but my problem is now because when I'm modifing the text of $Var$ the text before the ToString (I mean the text before ToString is $Var$ too) should be modified to because is the same reference.
I'm new using SyntaxEditor , I would like to know if there is some feature that help me in order to implement this last point.

I would like to implement this in a easy way like:

suppose that I'm already processed the other things and in some spans variable have all text spans

TextSpans spans = GetSpans("$Var");

OnKeyDown(char c)
InsertTextOnSpans(c, spans); // This should do the work of insert the character in a couple of text spans


Comments (1)

Posted 20 years ago by Actipro Software Support - Cleveland, OH, USA
We haven't gotten into adding support for that new feature yet although it is one we plan on doing. You might be able to use the UndoableXXX methods to manually insert text where you want.

Actipro Software Support

The latest build of this product (v24.1.0) was released 4 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.