Foundry.DocumentationProvider

g Foundry.Contextual Foundry.Contextual Foundry.DocumentationProvider Foundry.DocumentationProvider Foundry.Contextual->Foundry.DocumentationProvider GObject.GInterface GObject.GInterface Json.Serializable Json.Serializable GObject.GInterface->Json.Serializable GObject.Object GObject.Object GObject.Object->Foundry.Contextual Json.Serializable->Foundry.Contextual

Subclasses:

None

Methods

Inherited:

Foundry.Contextual (4), GObject.Object (37), Json.Serializable (8)

Structs:

GObject.ObjectClass (5)

dup_plugin_info ()

find_by_uri (uri)

index (roots)

list_bundles ()

list_children (parent)

list_roots ()

query (query, matches)

Virtual Methods

Inherited:

GObject.Object (7), Json.Serializable (5)

do_find_by_uri (uri)

do_index (roots)

do_list_bundles ()

do_list_children (parent)

do_list_roots ()

do_query (query, matches)

Properties

Inherited:

Foundry.Contextual (1)

Name

Type

Flags

Short Description

plugin-info

Peas.PluginInfo

r/w/co

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent_instance

Foundry.Contextual

r

Class Details

class Foundry.DocumentationProvider(**kwargs)
Bases:

Foundry.Contextual

Abstract:

Yes

Structure:

Foundry.DocumentationProviderClass

Abstract base class for plugins to provide documentation.

dup_plugin_info()
Returns:

a [class`Peas`.PluginInfo] or None

Return type:

Peas.PluginInfo

Gets the plugin the provider belongs to.

find_by_uri(uri)
Parameters:

uri (str) –

Returns:

a [class`Dex`.Future] that will resolve to a [class`Foundry`.Documentation] or reject with error.

Return type:

Dex.Future

index(roots)
Parameters:

roots (Gio.ListModel) – a [iface`Gio`.ListModel] of [class`Foundry`.DocumentationRoot]

Returns:

a [class`Dex`.Future] that resolves to any value or rejects with error.

Return type:

Dex.Future

This method is called when the documentation provider should rescan the provided roots for changes.

list_bundles()
Returns:

a [class`Dex`.Future] that will resolve to a [iface`Gio`.ListModel] of [class`Foundry`.DocumentationBundle] or reject with error.

Return type:

Dex.Future

list_children(parent)
Parameters:

parent (Foundry.Documentation) –

Returns:

a [class`Dex`.Future] that will resolve to a [iface`Gio`.ListModel] or reject with error.

Return type:

Dex.Future

list_roots()
Returns:

a [iface`Gio`.ListModel] of [class`Foundry`.DocumentationRoot] containing information about discovering documentation.

Return type:

Gio.ListModel

Returns a list of [class`Foundry`.DocumentationRoot] that may contain documentation to be discovered and ingested. This allows plugins for SDKs to provide information about where documentation is located.

It is expected that this list model will be updated when there are changes to the underlying file-system which will require re-parsing content for updates.

query(query, matches)
Parameters:
Returns:

a [class`Dex`.Future] that resolves to a any value or rejects with error.

Return type:

Dex.Future

Providers are expected to add their search sections to matches using [method`Foundry`.DocumentationMatches.add_section].

do_find_by_uri(uri) virtual
Parameters:

uri (str) –

Returns:

a [class`Dex`.Future] that will resolve to a [class`Foundry`.Documentation] or reject with error.

Return type:

Dex.Future

do_index(roots) virtual
Parameters:

roots (Gio.ListModel) – a [iface`Gio`.ListModel] of [class`Foundry`.DocumentationRoot]

Returns:

a [class`Dex`.Future] that resolves to any value or rejects with error.

Return type:

Dex.Future

This method is called when the documentation provider should rescan the provided roots for changes.

do_list_bundles() virtual
Returns:

a [class`Dex`.Future] that will resolve to a [iface`Gio`.ListModel] of [class`Foundry`.DocumentationBundle] or reject with error.

Return type:

Dex.Future

do_list_children(parent) virtual
Parameters:

parent (Foundry.Documentation) –

Returns:

a [class`Dex`.Future] that will resolve to a [iface`Gio`.ListModel] or reject with error.

Return type:

Dex.Future

do_list_roots() virtual
Returns:

a [iface`Gio`.ListModel] of [class`Foundry`.DocumentationRoot] containing information about discovering documentation.

Return type:

Gio.ListModel

Returns a list of [class`Foundry`.DocumentationRoot] that may contain documentation to be discovered and ingested. This allows plugins for SDKs to provide information about where documentation is located.

It is expected that this list model will be updated when there are changes to the underlying file-system which will require re-parsing content for updates.

do_query(query, matches) virtual
Parameters:
Returns:

a [class`Dex`.Future] that resolves to a any value or rejects with error.

Return type:

Dex.Future

Providers are expected to add their search sections to matches using [method`Foundry`.DocumentationMatches.add_section].

Property Details

Foundry.DocumentationProvider.props.plugin_info
Name:

plugin-info

Type:

Peas.PluginInfo

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY