Posted 12 years ago by Leif Zars
Avatar
With the following
.....
Private Sub b(X As Subcontracted)

End Sub
Public Enum Subcontracted
A
B
C
End Enum

i would like to automatically show the intellisense for the enum Subcontracted after the following have been typed.

b(
Dim X as Subcontracted =


Basically as an auto suggest. Would you point me in the proper direction for handling this.

Thank you

Leif Zars

[Modified at 10/03/2007 01:49 AM]

Comments (1)

Posted 12 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Perhaps you could use a TextStream to determine the type name from the text when an = character is typed (in the KeyTyped event). Once you have "Subcontracted" as the type name, get a VBContext (by calling VBContext.GetContextAtOffset), and call the DotNetProjectResolver's GetType method using that info. If you find it and it is an enumeration type, then build and show a member list with the items in the enumeration. The IDomType returned by GetType will give you access to the members (fields) of the enumeration.


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.