Using CompletionList inside Code Snippet Template

SyntaxEditor for Windows Forms Forum

Posted 2 years ago by Muhammad Mujtaba
Version: 21.1.0

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 2 years ago by Actipro Software Support - Cleveland, OH, USA


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

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.