How to get selected signature in ParameterInfo session ?

SyntaxEditor for WPF Forum

Posted 8 years ago by Fouques
Version: 15.1.0624

Hi !

I currently use syntax editor with a proprietary language, and have successfully done completion and parameter info with different signatures of our instructions.

As I'd like to give user a completion list for parameters of our instructions (for example var or const, hardware resource...), I need to get the selected signature in parameter info provider, but I can figure out how I can do this ? I always have the first instruction signature in session.Selection.ContentProvider.


Any advice or code sample is welcome !!





Comments (2)

Posted 8 years ago by Fouques

OK, got it, my mistake !!! The selected signature is rightly updated and also the selected index property.. Had a error in my static var management... Closed :)

Answer - Posted 8 years ago by Actipro Software Support - Cleveland, OH, USA

Hi Stephane,

I'm glad you figured it out.  Yes, the IParameterInfoSession.Selection returns the actual selected ISignatureItem.  The IParameterInfoSession.DisplaySelectedIndex tells you the index of that ISignatureItem within the IParameterInfoSession.Items collection.  The Selection property should be getting updated properly as you cycle through signatures.

Each ISignatureItem has a Tag property that can be used to store custom data to identify that signature.  For instance in our .NET Languages Add-on we often store things like a related ITypeMemberResolverResult instances in the Tag.  I recommend you make use of that Tag property to help you sort out what each ISignatureItem is for.

Actipro Software Support

The latest build of this product (v24.1.2) was released 3 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.