Code Snippets - Creation

SyntaxEditor for Windows Forms Forum

Posted 19 years ago by tobias weltner
Avatar
Code Snippets are great!
However, I did not find a way to create a new snippet entirely without XML, just by using the object model.
I can create a new CodeSnippet instance, but important pieces such as declarations seem to be read-only collections. I cannot for example create a new CodeSnippetDeclaration instance to add it to the snippet.

Am I doing something wrong here, or is this currently not supported?
Other than that, Code Snippets work beautifully for me. Great addition!

Comments (1)

Posted 19 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Whoops... never replied to this because I replied in e-mail instead. Anyhow, you can create code snippets in code. The collections are not read-only. However CodeSnippetDeclaration is abstract so you must create either a CodeSnippetLiteral or CodeSnippetObject (which both inherit from it).


Actipro Software Support

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

Add Comment

Please log in to a validated account to post comments.