Posted 16 years ago by Avalon - TX
I am wondering exactly how easy it is going to be to add support for something like T-SQL.

I am wanting to be able to supplement lots of values.
For example when you type SELECT * FROM I would like to be able to detect that and then be able to pop up a list of tables. The list of tables would be changing and thus i would need to be able to add that.

Is it safe to assume that this is going to be extremely easy. Any pointers on what to read and other tips so I can jump in and start working on this?

Comments (1)

Posted 16 years ago by Actipro Software Support - Cleveland, OH, USA
Sure, it's pretty easy. You would make a key-press trigger probably for a character like space. Add that to your SQL language definition. Then handle the SyntaxEditor.Trigger event and when that key-press trigger occurs, maybe call EditorView.GetPreviousToken and see if its text is "FROM". If that method is not returning the correct thing, you can get a TextStream or TokenStream from the Document (GetTextStream or GetTokenStream methods) and iterate backwards.

So essentially if you find a FROM then you would show a member list with the tables. We have examples in the sample project on showing all of this.

Actipro Software Support

The latest build of this product (v2020.1 build 0403) was released 14 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.