Some questions about IntelliPrompt(MemberList,ParameterInfo)

SyntaxEditor .NET Languages Add-on for Windows Forms Forum

Posted 11 years ago by BorodaAlex
Version: 4.0.0274
Avatar
Hi, All.
1) I am populating a context.SyntaxEditor.IntelliPrompt.MemberList with methods and operators. I am adding a methods in the first place, then operators is added.
But in the result promt pop-up window operators are in the first place, then methods.
I suppose that it's made by some internal sorting. How can I display the items in the order I add. Below is the code I use:

context.SyntaxEditor.IntelliPrompt.MemberList.Clear();
                foreach (Function function in Functions)
                    context.SyntaxEditor.IntelliPrompt.MemberList.Add(
                        new IntelliPromptMemberListItem(function.Name, (int) IconResource.PublicMethod,
                                                        function.Description));

                foreach (Operator operator in Operators)
                    context.SyntaxEditor.IntelliPrompt.MemberList.Add(
                        new IntelliPromptMemberListItem(operator.Name, (int)IconResource.Operator,
                                                        operator.Description));

                
                context.SyntaxEditor.IntelliPrompt.MemberList.ImageList = SyntaxEditor.ReflectionImageList;
                context.SyntaxEditor.IntelliPrompt.MemberList.Show(); 
2) I show the editor.IntelliPrompt.ParameterInfo when a symbol '(' have just been typed. I populate this window with the corresponding signature. There are no problem with that.
But I need to have some facilities in ParameterInfo window shown. How can I activate/diactivate parameters subject to caret location. If caret locates before symbol ',' that parameter with its type that are also before symbol ',' should be bold. The same
behaviour should be if caret location is after ','.
For instance it's default behaviour in Visual Studio. Is it possible to achieve for ParameterInfo window?

Thanks in advance, Alex.

Comments (2)

Posted 11 years ago by BorodaAlex
Avatar
-Solution for the first question has been found:
context.SyntaxEditor.IntelliPrompt.MemberList.Sorted = false;

- The second question still needs to be answered.

Thanks in advance, Alex.
Posted 11 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Yes there are some options for doing that via the IntelliPromptParameterInfo class. You can use the ParameterDelimiterCharacter and VisibleTextRange properties for some semi-automated assistance with updating ParameterIndex.

Then handle events like SyntaxEditorIntelliPromptParameterInfoParameterIndexChanged to update the markup to bold the appropriate parameter indicated by ParameterIndex.

The SimpleSyntaxLanguage sample in the test project shows an example of all this.


Actipro Software Support

The latest build of this product (v2018.1 build 0341) was released 6 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.