In This Article

PythonQuickInfoProvider Class

Provides IntelliPrompt quick info data for the Python language.

public class PythonQuickInfoProvider : QuickInfoProviderBase, IQuickInfoProvider, IEditorViewPointerInputEventSink, IOrderable, IKeyedObject
Inheritance:
object QuickInfoProviderBase object
Implements:
IQuickInfoProvider IEditorViewPointerInputEventSink IOrderable IKeyedObject

Constructors

PythonQuickInfoProvider()

Initializes an instance of the class.

public PythonQuickInfoProvider()

Properties

ContextTypes

The context Type objects that are supported by this provider, which are the list of custom types that are possibly returned by the GetContext(IHitTestResult) methods.

protected override IEnumerable<Type> ContextTypes { get; }

Property Value

IEnumerable<Type>

Remarks

Base class and interface types are supported as they will match any derived classes.

DocstringDisplayMode

A PythonDocstringDisplayMode that indicates the docstring display mode within quick info.

public PythonDocstringDisplayMode DocstringDisplayMode { get; set; }

Property Value

PythonDocstringDisplayMode

IncludeSourceLocation

Indicates whether to include source location information (e.g., module path) within quick info tips.

public bool IncludeSourceLocation { get; set; }

Property Value

bool

Methods

GetContext(IEditorView, int)

Returns an object describing the quick info context for the specified text offset or null if no context is available.

public override object? GetContext(IEditorView view, int offset)
Parameter Type Description
view IEditorView

The IEditorView in which the offset is located.

offset int

The text offset to examine.

Returns

object

Remarks

This method is called in response to keyboard events.

OnSessionOpening(IQuickInfoSession)

Allows an inheritor to modify, filter and sort automatically-generated items before the specified IQuickInfoSession is opened and displayed to the end user. The session may also be cancelled.

protected virtual bool OnSessionOpening(IQuickInfoSession session)
Parameter Type Description
session IQuickInfoSession

The IQuickInfoSession about to be opened.

Returns

bool:

true if the session is allowed to open; otherwise, false.

RequestSession(IEditorView, object)

Requests that an IQuickInfoSession be opened for the specified IEditorView.

protected override bool RequestSession(IEditorView view, object context)
Parameter Type Description
view IEditorView

The IEditorView that will host the session.

context object

A context object returned by GetContext(IHitTestResult).

Returns

bool:

true if a session was opened; otherwise, false.

Inherited Members

Extension Methods