Default Property IntelliPrompt on Open Parenthesis Trigger

SyntaxEditor .NET Languages Add-on for Windows Forms Forum

Posted 14 years ago by Richard Kisic
Version: 4.0.0282
Avatar
Hello,

I am beginning a set of modifications to the Visual Basic .Net Add-on language in hopes of conforming it to a custom language specification. While I will be reading on and familiarizing myself with the syntax editor, any input/feedback on this work item would surely prove beneficial. For reference, we do not have the blueprint license (i.e. source code). Below is the first task I am attempting to tackle:

As you are probably aware, IntelliSense in Visual Studio provides information regarding the default property of a VB.Net class when the open parenthesis '(' key is pressed. For an example, Class2 as implemented here: MSDN Default Property Example

If, in a block of code, I try the following:

    Sub MySub()
        Dim dpTestObj As New Class2
        dpTestObj( // <----trigger
    End Sub
Then the '(' trigger causes IntelliSense to open with the text:
Quote:
Prop1 (Index As Integer) As String


Having the same functionality through IntelliPrompt in our editor would be ideal; providing the name of the custom property and its type would suffice. Some initial questions are 1.) "How do I ensure this trigger activates?" and 2.) "How do I subscribe to this trigger?"

Thank you,
Rich

Comments (3)

Posted 14 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Rich,

The VBSyntaxLanguage.OnSyntaxEditorKeyTyped method currently looks for characters like '(' and calls ShowIntelliPromptParameterInfoCore (an internal method) to show parameter info. The problem here seems to be that that call isn't properly aware of if the ( is for an indexer call or not and ShowIntelliPromptParameterInfoCore has varying logic on whether it's for an indexer. Unfortunately I'm not sure this is something you could tweak without having the source code.

I'll add an item to our TODO list to look further into indexers and default property support.


Actipro Software Support

Posted 14 years ago by Richard Kisic
Avatar
I checked with our purchasing department, and it turns out we do have the source code (just not for the editor itself). With respect to your reply, feel free to offer any tweaks. I will also be investigating this further.

Thanks
Posted 14 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
We've gone ahead and done the updates ourself for the next maintenance release so that indexers in VB should work properly.


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.