Foundry.FileSearchProvider

g Foundry.Contextual Foundry.Contextual Foundry.FileSearchProvider Foundry.FileSearchProvider Foundry.Contextual->Foundry.FileSearchProvider 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 ()

search (options, operation)

Virtual Methods

Inherited:

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

do_search (options, operation)

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.FileSearchProvider(**kwargs)
Bases:

Foundry.Contextual

Abstract:

Yes

Structure:

Foundry.FileSearchProviderClass

A pluggable file search provider.

The FoundryFileSearchProvider class allows precise implementation over how file searches are performed. Plugins can provide an alternate implementation to the default grep based search provider by implementing this class at a higher priority than the grep provider.

New in version 1.1.

dup_plugin_info()
Return type:

Peas.PluginInfo or None

New in version 1.1.

search(options, operation)
Parameters:
Returns:

a [class`Dex`.Future] that resolves to a [iface`Gio`.ListModel] of [class`Foundry`.FileSearchMatch] or rejects with error.

Return type:

Dex.Future

Performs the requested search.

It is expected that the implementation returns a [iface`Gio`.ListModel] as early as convenient and asynchronously populate the results after that.

Callers should use [func`Foundry`.list_model_await] to wait for completion of the entire result set.

If the provider is missing dependencies (such as a missing search tool in the users path) this method should reject with G_IO_ERROR_NOT_SUPPORTED so that the next implementation may be used.

New in version 1.1.

Parameters:
Returns:

a [class`Dex`.Future] that resolves to a [iface`Gio`.ListModel] of [class`Foundry`.FileSearchMatch] or rejects with error.

Return type:

Dex.Future

Performs the requested search.

It is expected that the implementation returns a [iface`Gio`.ListModel] as early as convenient and asynchronously populate the results after that.

Callers should use [func`Foundry`.list_model_await] to wait for completion of the entire result set.

If the provider is missing dependencies (such as a missing search tool in the users path) this method should reject with G_IO_ERROR_NOT_SUPPORTED so that the next implementation may be used.

New in version 1.1.

Property Details

Foundry.FileSearchProvider.props.plugin_info
Name:

plugin-info

Type:

Peas.PluginInfo

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

New in version 1.1.