IntelliPrompt member list and class alias support in VB

SyntaxEditor .NET Languages Add-on for Windows Forms Forum

Posted 17 years ago by Dan Brown - Head of Development, Oppono Ltd
Version: 4.0.0252
Environment: Windows XP (32-bit)
Avatar
Hi ActiPro Support

Thanks for looking at previous problems so quickly! I have another one, the Intelliprompt member list does not seem to support class aliases. The same code below in VS invokes the member list.

An example:

Imports MathAlias = System.Math

Namespace TestNS
    Public Class TestClass
        Public Sub Test
            MathAlias. ' no menber list on .
            System.Math. ' member list on .
        End Sub
    End Class
End Namespace
We have used aliases to simplify the API for our scripter's since a fair bit of our object model are serializable classes generated from xsd.exe and based on nested XSD schemas. So instead of having a tool generated class name which might be "ApplicantsPersonalDetailsAddressHistoryMortgages" we have aliased as follows and added to the Document.HeaderText:

Imports Mortgage = Namespace.ApplicantsPersonalDetailsAddressHistoryMortgages
Would be great if the .Net languages add-on supported this.

Thanks for any help.

Regards
Dan

Comments (6)

Posted 17 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Dan,

Namespace aliases do work but I think the problem here is that you have "Namespace." before your namespace.

For instance if I load our SDI editor and change this line:
Imports g = System.Collections.Generic
Then I can go into a method and type "g." and get the types in that namespace.


Actipro Software Support

Posted 17 years ago by Dan Brown - Head of Development, Oppono Ltd
Avatar
Thanks for the quick response. Sorry about my "namespace" (second) code snippet it was for illustrative purposes as opposed to real code.

I still cant get this to work though, but i thinks its because i am trying to do a a class/type imports alias as opposed to a namespace imports alias.

Example below demonstrates (I had to modify yours as i only have .NET 1.1 installed):

Imports d = System.Collections.DictionaryEntry ' class/type alias
Imports c = System.Collections ' namespace alias

Public Class TestClass
    Public Sub Test()
        c. ' agree i get types in that menber list
        d. ' still no shared members on class alias should get .Equals etc

        Dim objd As d = New d
        objd. ' no members either should get .Key, .Value etc

    End Sub
End Class
Posted 17 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Ahh, my apologies, I read your post wrong. Yes you are correct, it currently will work for namespaces but not types yet. That is an item we have on our TODO list.


Actipro Software Support

Posted 15 years ago by Dan Brown - Head of Development, Oppono Ltd
Avatar
Hi Actipro Support

Were now on version v4.0.0277 and this issue is still causing us major problems. I was wondering whether this was any closer to completion?

Failing that we have an unreliable workaround that I wonder whether you might be able to help with?

We have managed to hack the IntelliPromptMemberList contents using SyntaxEditorIntelliPromptMemberListPreFilter and doing a lookup on dotNetProjectResolver.GetType(..) and then dotNetProjectResolver.GetMembers(..) this works sometimes and not others presumably down to the e.Context we are passing into GetType.

Is there a different more reliable way we can get the IDomMember’s from a type perhaps via the full type name? e.g. full.namespace.actualclassname

Thanks for any help.
Posted 15 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Dan,

Sorry no progress on that item yet. For your workaround, what if you use the DotNetProjectResolver.GetType overload that takes an IDomType, string[], string, and DomBindingFlags? With that one you can pass null and null for the first type parameters. Then just pass the full type name and flags and it should work.


Actipro Software Support

Posted 15 years ago by Dan Brown - Head of Development, Oppono Ltd
Avatar
Simple as, works too, thanks for that!
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.