Foundry.DiagnosticManager

g Foundry.Contextual Foundry.Contextual Foundry.Service Foundry.Service Foundry.Contextual->Foundry.Service Foundry.DiagnosticManager Foundry.DiagnosticManager Foundry.Service->Foundry.DiagnosticManager 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.Service (8), Foundry.Contextual (4), GObject.Object (37), Json.Serializable (8)

Structs:

Foundry.ServiceClass (3), GObject.ObjectClass (5)

diagnose (file, contents, language)

diagnose_file (file)

diagnose_files (files)

list_all ()

Virtual Methods

Inherited:

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

Properties

Inherited:

Foundry.Contextual (1)

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Class Details

class Foundry.DiagnosticManager(**kwargs)
Bases:

Foundry.Service

Abstract:

No

Structure:

Foundry.DiagnosticManagerClass

Manages diagnostic information and error reporting.

Foundry.DiagnosticManager coordinates diagnostic providers and aggregates diagnostic information from various sources such as compilers, linters, and language servers. It provides a unified interface for error reporting and maintains diagnostic state.

diagnose(file, contents, language)
Parameters:
Returns:

a [class`Dex`.Future] that resolves to a [iface`Gio`.ListModel] of [class`Foundry`.Diagnostic].

Return type:

Dex.Future

Diagnoses file using the loaded diagnostic providers and produces a Dex.Future that will resolve to a [iface`Gio`.ListModel] of [class`Foundry`.Diagnostic].

The resulting [iface`Gio`.ListModel] may be awaited for population to complete using [func`Foundry`.list_model_await].

diagnose_file(file)
Parameters:

file (Gio.File) – a [iface`Gio`.File]

Returns:

a [class`Dex`.Future] that resolves to a [iface`Gio`.ListModel] which may be awaited on for final completion of all diagnostics using [func`Foundry`.list_model_await].

Return type:

Dex.Future

diagnose_files(files)
Parameters:

files ([Gio.File]) – an array of [iface`Gio`.File]

Returns:

a [class`Dex`.Future] that resolves to a [iface`Gio`.ListModel] or None

Return type:

Dex.Future

list_all()
Returns:

a [class`Dex`.Future] that resolves to a [iface`Gio`.ListModel] of [class`Foundry`.Diagnostic].

Return type:

Dex.Future

Lists all known diagnostics from all providers.

This will call [method`Foundry`.DiagnosticProvider.list_all] for every available diagnostic provider.

The list may update after the future resolves if providers implement live updating of models.