Posted 8 years ago by Piero Quintavalle
Avatar
Dear Staff,

I was right now working with arrays, using the SyntaxEditor v4.0.0289 in evaluation and I have encountered a problem. Here is my code:

Public Sub MySub()
    Dim s As String() = New String(){"s1", "s2"}
    s(0). 'here no intellisense is shown

    Dim e As String = String. 'as well as here
    
    Dim a As String
    a. 'and here
End Sub
Is this the expected behaviour or is it an issue to be fixed?

Thanks in advance

Comments (5)

Posted 8 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Piero,

If you surround the Sub with a Class you should be seeing member lists in those places. Make sure you have MsCorLib referenced in your project resolver too.


Actipro Software Support

Posted 8 years ago by Piero Quintavalle
Avatar
Thanks for the quick reply. The code I have posted is only a part of the code written in the editor; what I actually did has been a copy of the code written in one of your examples. In the Class of your code I added that additional Sub to test the aspects which interest me more.

I copy here my whole code anyway:

' The automated VB IntelliPrompt features demoed here
' are part of the .NET Languages add-on, sold 
' separately from SyntaxEditor

' Hover over any identifier to get quick info
Imports System
Imports System.Collections.Generic
Imports System.Windows.Forms

Namespace ActiproSoftware.SyntaxEditor

    ''' <summary>
    ''' Start typing anywhere in the code to get
    ''' automated IntelliPrompt support like member
    ''' lists, complete word (Ctrl+Space), and
    ''' parameter info tips.
    ''' </summary>
    Public Class TestClass
        Inherits Control
        
        Public Sub MySub()
            Dim s As Integer() = New Integer(){"s1", "s2"}
            s(0). 'here no intellisense is shown
            'S.

            Dim e As String = String. 'as well as here
            Dim a As String
            a.
        End Sub

        ''' <summary>
        ''' Doubles the specified number.
        ''' </summary>
        ''' <param name="x">The number to double.</param>
        ''' <returns>The result.</returns>
        Public Function [Double](ByVal x As Integer) As Integer
            ' Type Me. to see a member list and then
            ' Add( to see a parameter info tip
            
            Return Me.Add(x, x)
        End Function
 
        ''' <summary>
        ''' Adds two numbers together.
        ''' </summary>
        ''' <param name="x">The first number.</param>
        ''' <param name="y">The second number.</param>
        ''' <returns>The result.</returns>
        Public Function Add(ByVal x As Integer, ByVal y As Integer) As Integer
            Dim result As Integer = x + y 
            Return result
        End Function

        ''' <summary>
        ''' Adds three number together.
        ''' </summary>
        ''' <param name="x">The first number.</param>
        ''' <param name="y">The second number.</param>
        ''' <param name="z">The third number.</param>
        ''' <returns>The result.</returns>
        Public Function Add(ByVal x As Integer, ByVal y As Integer, ByVal z As Integer) As Integer
            Dim result As Integer = x + y + z 
            Return result
        End Function

        ' Type ''' on the next line to see method
        ' XML documentation comment auto-complete

        Public Function Subtract(ByVal x As Integer, ByVal y As Integer) As Integer
            Dim result As Integer = x - y 
            Return result
        End Function
    End Class
End Namespace

Posted 8 years ago by Piero Quintavalle
Avatar
Sorry if I continue my post in another one but I have forgotten to write about the following statement:

    Dim e As String = String.
To be sure of the absence of lexical errors i surrounded the statement as followes:

Public Class TestClass
        
    Public Sub MySub()
        Dim e As String = String.
    End Sub

End Class
From the "String." statement I expect an Intelliprompt about the "String" class to be shown but nothing appears.

Regards
Posted 8 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Piero,

If you paste that entire code snippet into our SDI Editor sample you can see the IntelliPrompt showing up ok. So my guess is that you missed one of the steps for setting things up properly when doing it in your own app.

Make sure you read through the add-on's main documentation topic. There is a "key steps for getting started" section there. If you miss any of those, it won't work correctly.


Actipro Software Support

Posted 8 years ago by Piero Quintavalle
Avatar
Studying the documentation I could solve all the problems I had.

Thank you very much for the support.
The latest build of this product (v2018.1 build 0342) was released 10 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.