Posted 19 years ago by billb - Software Craftsman, Yye Software
Avatar
I'm using the editor for C# and VB.NET code editing. Is there a simple way to have this control behave like Microsoft's. Let me be more specific ... All of the framework libraries are in Intelliprompt and also, user code as it is written becomes part of the IntelliPrompt library as well. I looked at the example program and it only seemed to support a very limited number of namespaces. I tried to use the AddReflectionForAssemblyNamespacesAndTypes with a list of system assemblies and that didn't seem to work for me either.

This is something that I thought would be quite simple, so now I get the feeling I might be missing something very fundamental. Sample code would be helpful.

Thank you.

Comments (17)

Posted 19 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Bill... if having full IntelliPrompt support for C# and VB.NET was even of moderate difficulty, we'd have it implemented already. Frankly, doing it right is extremely complex. That why you don't see many editor apps out there that can do it.

What we've done so far is created a number of methods that let you populate the member list with types/namespaces/members based on criteria that you come up with. So right now you do have to provide the backend logic of what to show and when to show it. Some customers such as CodeSmith have started working on implementing IntelliPrompt support in their apps.

We do plan on creating add-ons that will support language-specific prompting such as for C# and VB.NET however in the editor control itself, we must keep all the features language-neutral though since any language may be used in the editor. However once we have an add-on ready, you'll be able to attach that to the editor control and have support for prompting.

I hope that explains things clearly.

The sample project does show how to use some of the methods for reflection-based population of the list. If you have further questions after looking at that, please post them here.


Actipro Software Support

Posted 19 years ago by billb - Software Craftsman, Yye Software
Avatar
Fair enough. I'll dig through the example a little more. I just figured that using reflection, I should be able to load up any assembly and get enough Intelliprompt information.

Thanks for the response.
Posted 19 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
You should be able to get all the general reflection information for member lists. For instance, IntelliPromptMemberList.GetItemReflectionForAssemblyNamespacesAndTypes takes an array of Assemblies that you'd like to reflect from. It's a very handy routine.


Actipro Software Support

Posted 19 years ago by billb - Software Craftsman, Yye Software
Avatar
Quote:
<font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Actipro Software Support:
You should be able to get all the general reflection information for member lists. For instance, IntelliPromptMemberList.GetItemReflectionForAssemblyNamespacesAndTypes takes an array of Assemblies that you'd like to reflect from. It's a very handy routine.<HR>


Yes, I was looking at that. I have only been successful at getting types and static functions working. Will this function support member lists?

Meaning something like:
string s = "";
s.

(and as soon as I hit the period, I'd like to see functions for string)

If this is supported, what am I missing?

Thanks for the help.
Posted 19 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Yes that is supported. The reflection methods are very robust but they only operate based on what you pass into them. Our sample only shows how to get static members. Use the IntelliPromptTypeMemberFlags.Instance flag instead of IntelliPromptTypeMemberFlags.Static to get instance members, which is what you want for your example.


Actipro Software Support

Posted 19 years ago by AdrianRitchie - Guernsey, UK
Avatar
I may be missing something, but I can't figure out how to use the IntelliPromptTypeMemberFlags.Instance flag to display a list of members for "s" in the given example.

Am I required to store the Type of "s" and then feed that into the Actipro member list reflectot, or is the SyntaxEditor able to handle that.

Also, does anyone have an example of how to store the data Type of a variable?
Posted 19 years ago by billb - Software Craftsman, Yye Software
Avatar
Don't feel bad, I'm missing it too. However, I didn't have time to spend on it at the moment, so I chalked it up to something I was missing and moved on for the time being. If you have any luck getting it to work, I'd be grateful for a follow up.

Thanks.

Quote:
<font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by AdrianRitchie:
I may be missing something, but I can't figure out how to use the IntelliPromptTypeMemberFlags.Instance flag to display a list of members for "s" in the given example.

Am I required to store the Type of "s" and then feed that into the Actipro member list reflectot, or is the SyntaxEditor able to handle that.

Also, does anyone have an example of how to store the data Type of a variable?
<HR>
Posted 19 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Yes, you need to semantically parse to find the Type of the variable "s". Then provide that type (System.String) to the member list methods.

In another recent post we gave some information on some of the parsing enhancements we're doing coming soon. That will help you be able to store data in tokens and see what has changed so you can update your token data appropriately.

We're very excited to see customers starting to take advantage of these sort of features and will probably gear the next features towards enhancing parsing capabilities.


Actipro Software Support

Posted 19 years ago by Oliver Mellet
Avatar
I've actually written a VB.Net and C# parser to implement intellisense in the product that I'm working on, and I'm using SyntaxEditor for the highlighting, member list popup, squigglies, etc. It's very much more difficult than I would have thought, and it's taken me about 1 1/2 years to get it working as well as Visual Studio. So no, it's not an easy thing.
Posted 19 years ago by Nolan Woods - Programmer, University of Alberta
Avatar
Hi,

I'm wondering if there's any news on the subject of language-specific add-ons or updates for VB.NET (or C#). Any reasonable hope for such support in the next release? Or ETA for such a release?

Thanks,
Nolan
Posted 19 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Right now we're trying to finish up the 3.0 version. 3.0 has a lot of great new features and some big speed improvements. For the SQL language (a language with a lot of keywords), we've seen lexical parsing speed increases of 6 times as fast as what they are in 2.5. 3.0 also has a Perl language, with a ton of keywords and it processes very fast with the 3.0 enhancements we've made so far.

We've currently got the regular expression engine torn apart to see if we can improve its speed even more. We plan on having 3.0 out in the next month or two.

After that, we're going to start working on 4.0 design. The 4.0 version will focus primarily on building a faster parsing model so that semantic parsing can either occur based off of an idle timer or on a separate thread. We might also expose a way for you to create code-based lexical parsers so that you can write your own. This will also be the version that targets language-specific parsing functionality. A lot of the new things in 3.0 will help support this goal.


Actipro Software Support

Posted 18 years ago by billb - Software Craftsman, Yye Software
Avatar
It looks like we're going to be getting back to this project in the next month or two. In 3.1, is doing C# and VB.NET intelliprompt simple, or does anyone have a sample? Do I still have to implement my own parser to accomplish Visual Studio style intellisense?

Thanks for any help/suggestions.
Posted 18 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Bill,

3.1 is not much different than 3.0, however it adds some major new feature areas like code snippets, column guides, and content divider enhancements. But the core parser framework is still the same.


Actipro Software Support

Posted 18 years ago by billb - Software Craftsman, Yye Software
Avatar
I've been away for awhile, we actually only have 2.x at this point.
Posted 18 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Well, we have several methods to auto-populate the member list but you have to determine when to call them and what parameters to pass to them. However they are extremely powerful and use reflection to figure out the appropriate items to add to the list.

For the future 4.0 version we are going to be working on implementing advanced language-specific parsers.


Actipro Software Support

Posted 18 years ago by billb - Software Craftsman, Yye Software
Avatar
Ok, but to get to the point where if I declare a string (i.e. string s;) and as soon as I hit "s." I'd like a list of members that pertain to string, that still requires writing a parser?

I just want to make sure I'm not reinventing the wheel.

Thanks for the quick responses.
Posted 18 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
In that scenario you'd have to determine that you need to display a member list for a string. Once you know that, you use our reflection helper method and our code will populate the member list with all the string members by using reflection.


Actipro Software Support

The latest build of this product (v24.1.0) was released 1 month ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.