Codesnippets for non.Net languages

SyntaxEditor for Windows Forms Forum

Posted 11 years ago by Martin de Jong - Statistics Netherlands
Version: 4.0.0277
Avatar
I am trying to figure out where to insert snippets code to my project. I cant find much about this subject in the documentation:(. Some of my questions are:

Which way do i have to extract the snippets from disk; using CodeSnippetFolder?

Do i have to use LanguageData in some way to store the snippets? Can i store there a collection of snippets?

I hope you get me back on track here:)

Regards
Martin

Comments (1)

Posted 11 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Martin,

Code snippets can be loaded from disk via static methods on CodeSnippet or CodeSnippetFolder. The CodeSnippet version loads a single snippet. The CodeSnippetFolder version loads multiple.

We have a special place for our snippets in the DotNetProjectResolver when they are used in the .NET Languages Add-on. But ordinarily you can store them however you wish.

When using them for a custom language, you should follow the documentation on using ShowInsertSnippetPopup. There just pass in the CodeSnippetFolder that you pre-loaded in your application and you are good to go.


Actipro Software Support

The latest build of this product (v2018.1 build 0341) was released 8 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.