Using CompletionList inside Code Snippet Template

SyntaxEditor for Windows Forms Forum

The latest build of this product (v22.1.0) was released 1 month ago, which was before this thread was created.
Posted 1 month ago by Muhammad Mujtaba
Version: 21.1.0
Avatar

Can we open completion session in between CodeSnippet Template session

For E.g:

Select * from <table>;

here when the user selects this code snippet the cursor is on the literal the intellisense for all the tables inside the database should be show to the user. 

Comments (1)

Posted 1 month ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hello,

Yes SyntaxEditor is capable of showing a completion list while a code snippet template session is active.  If you run our SDI Code Editor demo, choose "IntelliPrompt / Insert Snippet" and select the "for" snippet, then go and change "index" field to "foo", and press Ctrl+Space, you'll see the completion list show.

As long as you set up a completion provider language service for your language, it should function fine while within a code snippet template session.  Your completion provider's RequestSession method implementation would be responsible for determining its context within the language (generally by looking at surrounding tokens or at an AST from parse data) and if it detects it's a place database tables should be listed, then you'd need to make a completion session that has items for each database table and then open the session.  The Getting Started #10 QuickStart shows the basics of building a completion provider.


Actipro Software Support

Add Comment

Please log in to a validated account to post comments.