Intellisense in memory database

SyntaxEditor for WPF Forum

Posted 15 years ago by svb70
I'm very new to using the syntax editor and have all that I need implemented except full intellisense support.

I can show lists at will and now have come to the point where I need to construct the in-memory database that drives the completionlist population based on caret context. I could not find any help on standard ways of doing this. I have my own idea of how to do it, but don't want to re-invent the wheel if it has already been done.

I saw mention in some thread on here about looking at semanticparser, but couldn't find it in the help file.

So I would be greatful if anyone has experience of implementing this.

I'm interested in the wpf c# add on stuff, but again couldn't find any help on exactly what this gives me. using the add-on exactly what would I need to do to turn c# intellisense on as it is apparently automatic. Many thanks.

Comments (3)

Posted 15 years ago by Actipro Software Support - Cleveland, OH, USA
Thanks for writing. Right now, since SyntaxEditor is in public beta (although it is plenty stable for use and production release), we don't yet have the semantic parsing feature implemented. That is something that is in our WinForms version and will be ported over in the coming weeks. Since we don't have that yet, our .NET Languages Add-on in WPF pretty much does nothing yet other than provide a fast lexical parser. That will also be enhanced in the coming weeks/months.

As for determining context, the best way to do that generally is via token scanning (like with an ITextSnapshotReader) and with examination of an AST, which you need semantic parsing to generate. If you or anyone else would like to throw out ideas on what you'd like to see in terms of these feature areas, please do so now. It's a perfect time to be brainstorming, before we start work on the features.

Actipro Software Support

Posted 15 years ago by svb70
Ok thanks. I'll watch this space. I haven't played with the winforms version, but it looks like replicating that functionality in the wpf control would be excellent.

Will the wpf version support intellisense on variables? It seems refelction or static AST examination would not support this.

The help project is really professional and comprehensive. I still think that for newbies, like me, an overview of the big picture would greatly aid understanding general concepts.

Take intellisense in the help as an example. The overview dives straight in with all the components (Sessions, Quick Info etc.) First off I say to myself "I don't know what a session is" so I click on the "Sessions" link. After reading through everything here I'm none the wiser as most links take me to the huge class library (which is good), but there are no code examples.

All I really wanted to know before looking at the help is "what steps are involved to implement intellisense".
1. I need to Hook into Syntax Editor events. Info on the events of interest would be good as well as the best way of managing hooking and un-hooking events.
2. I need to define sessions and for each session I need to add items. best practice for managing sessions and real world examples of how various session types may interact.
3. I need to show pop ups based on context. All the example use a button to show a pop up and say "in the real world you need to display a list based on caret context". A real world example of how to do this is required here. There are examples in other parts of the help that show how to track context, but nothing on best practice for retrieving list items.

So after a huge amount of reading and a bit of frustration the user will get there in the end, but it's pretty painful. Don't get me wrong it's a fantastic product.
Posted 15 years ago by Actipro Software Support - Cleveland, OH, USA
Which particular language are you looking to edit with the control? Please provide some detail as that will help frame the context of your questions.

Thanks for your comments. We are trying to improve the ways to get to basic information for features and I will write down to make the IntelliPrompt overview topic better.

An IntelliPrompt session is "open" while some sort of IntelliPrompt UI is displayed. So for instance, while a completion list is displayed, you could say a completion session is open. The session is basically a controller for the related UI.

1) We just added a ton of features for this sort of thing in the build that came out last week, with updated samples on showing completion lists in response to typed characters and documentation on this. Although as a note, we had a report come in over the weekend that a trick we did in this latest build to allow extension methods to be used in .NET 3.0 code is causing a compilation issue in a certain scenario so we will likely have a follow up build this week to address that.

2) Showing real world samples of building IntelliPrompt sessions on the fly is difficult right now since we don't have semantic parsing yet. We'll be able to do more complex samples on that once we get those advanced features implemented. We do currently have samples on how to open completion list (with description tips) and quick info sessions though.

3) We agree, but again we need to have semantic parsing data available to really show anything more complex in our samples. You can do some additional scanning of tokens via an ITextSnapshotReader to build some contextual info but it probably won't be as robust as using that data with examination of an AST.

Hang in there, we are going to continue plugging forward on getting more features like semantic parsing added in the coming weeks/months.

Actipro Software Support

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

Add Comment

Please log in to a validated account to post comments.