Get function parameters and function name on ViewMouseHover

SyntaxEditor for Windows Forms Forum

Posted 6 years ago by Hilton Law
Version: 18.1.0671
Avatar

Hi,

 

Is it possible to retrieve the parameters types of a function, along with the function name on a SyntaxEditor.ViewMouseHover event, when the mouse is over a function identifier? I'd need all the types and the function name to be fully qualified.

 

Thanks,

Hilton

Comments (6)

Posted 6 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Hilton,

Which syntax language are you using for this question?


Actipro Software Support

Posted 6 years ago by Hilton Law
Avatar

I'm using VB and C#.

Posted 6 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Hilton,

If you mean the premium C#/VB languages in our .NET Languages Add-on, our CSharpQuickInfoProvider effectively does this kind of thing:

var context = new CSharpContextFactory().CreateContext(new TextSnapshotOffset(view.CurrentSnapshot, offset));
var resultSet = dotNetContext.Resolve();

Then we look at the top result in the result set, which could be an INamespaceResolverResult, ITypeResolverResult, ITypeMemberResolverResult, IParameterResolverResult, or IVariableResolverResult.  The type references in those various results should be fully-qualified if we were able to resolve the type names.


Actipro Software Support

Posted 6 years ago by Hilton Law
Avatar

Thank you! I will try it.

Posted 6 years ago by Hilton Law
Avatar

My bad, I meant to post this in the SyntaxEditor Winforms forums. Could this be moved? And is my original question possible in the Winforms version?

Posted 6 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hello,

I moved the thread to the WinForms SyntaxEditor forum instead.

In the WinForms .NET Languages Add-on, you can call the language's GetContext method to get some contextual information.  Then the DotNetProjectResolver.GetQuickInfo method uses that context to build up the quick info.  Note that the older WinForms version's contextual data isn't as robust as what you find in the WPF version's code we provided above.


Actipro Software Support

The latest build of this product (v24.1.1) was released 26 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.