
When i write : SyntaxEditor.ActiveView.IntelliPrompt.RequestSurroundWithSession();
It writes in a pop-uo "Surround with" but it's simply a session of insert.
How can i do for use a SURROUND session snippet ?
When i write : SyntaxEditor.ActiveView.IntelliPrompt.RequestSurroundWithSession();
It writes in a pop-uo "Surround with" but it's simply a session of insert.
How can i do for use a SURROUND session snippet ?
Hello, it will only show code snippets that have the "SurroundsWith" snippet type specified in the snippet's XML. You can see this in our SDI Editor demo if you have our C# add-on language loaded and do "Insert Snippet" (via Edit/IntelliPrompt menu). You'll see "for" and "switch" snippets show. Then do "Surrounds With" and you'll only see "for" show up. "switch" didn't show since its XML definition didn't have that flag specified.
The only other thing to be aware of is that if no snippet types are specified in the XML and there is a $selected$ tag present in a snippet, it will auto-set "SurroundsWith".
Your sample SDI Editor doesn't work as Visual Studio. I thought that selecting some code and pressing "SurroundWith-For" the selected code will be surrounded by the for snippet but the editor replace my code and insert the for snippet.
There's a problem in your sample demo or this is the only way to use Surround With?
Thanks
Thanks for reporting this, it is indeed a bug. The code snippet selection session was marking the resulting template session as being from a shortcut when it shouldn't have been. The selected text only gets included when the template session is not from a shortcut.
We've fixed this for the upcoming maintenance release.
Please log in to a validated account to post comments.