Overwrite quick info description

SyntaxEditor Python Language Add-on for WPF Forum

Posted 10 months ago by Tobias Lingemann - Software Devolpment Engineer, Vector Informatik GmbH
Version: 21.1.3
Avatar

Hi,

is there a way to overwrite the description of the quick info?

In my case I want to hide the file path of the source file. Some files are generated and the names may be irritating.


Best regards, Tobias Lingemann.

Comments (3)

Posted 10 months ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Tobias,

Yes, to alter the quick info, you can do these steps:

  • Unregister the PythonQuickInfoProvider service from the syntax language.
  • Create a new class MyQuickInfoProvider that inherits PythonQuickInfoProvider.
  • Override its OnSessionOpening method and update the session.Content property appropriately.  It should be a TextBlock.
  • Register MyQuickInfoProvider as a service on the syntax language.


Actipro Software Support

Posted 7 months ago by Tobias Lingemann - Software Devolpment Engineer, Vector Informatik GmbH
Avatar

Hi,

thanks for the help, but I just realized this only changes the tooltip when I move the mouse in the editor.

How can I change the tooltip for intelli prompt sessions as well? I already have a class that inherits from PythonCompletionProvider, but I cannot find the corresponding text block. The session has a list of all items, but I don't want to go over all of them each time.

I also tried to override PythonParameterInfoProvider, but it looks like this is used for something else.


Best regards, Tobias Lingemann.

Answer - Posted 7 months ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hello,

Completion providers have an OnSessionOpening method that you can override and examine the session.Items.  Each item is an ICompletionItem implementation that has a DescriptionProvider property on it.  The IContentProvider returned by that property builds the description tip content when one is needed.  Maybe wrap our default with a custom IContentProvider that removes the filenames.

Parameter info providers (used for invocation help) also have an OnSessionOpening method that you can override and can examine the session.Items.  Each item is an ISignatureItem implementation that has a ContentProvider property on it, that is the same concept as the ICompletionItem.DescriptionProvider.


Actipro Software Support

The latest build of this product (v22.1.4) was released 19 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.