Foundry.Context¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
class |
|
class |
|
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
Name |
Type |
Flags |
Short Description |
|---|---|---|---|
r |
|||
r |
|||
r |
|||
r |
|||
r |
|||
r |
|||
r |
|||
r |
|||
r |
|||
r |
|||
r |
|||
r |
|||
r |
|||
r |
|||
r |
|||
r |
|||
r |
|||
r |
|||
r |
|||
r |
|||
r |
|||
r |
|||
r |
|||
r |
|||
r |
|||
r |
|||
r/w/en |
|||
r |
|||
r |
Signals¶
- Inherited:
Fields¶
- Inherited:
Class Details¶
- class Foundry.Context(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
The central object representing an open project.
Foundry.Contextserves as the main coordinator for all Foundry services and provides access to managers for files, builds, debugging, and other development tools. It maintains the application state and facilitates communication between different components of the development environment.- classmethod discover(path, cancellable)¶
- Parameters:
path (
str) – the starting pathcancellable (
Dex.CancellableorNone) – an optional cancellable
- Returns:
a
Dex.Futurethat resolves to a path in the file system encoding.- Return type:
Attempts to locate the nearest .foundry directory starting from path.
- classmethod new(foundry_dir, project_dir, flags, cancellable)¶
- Parameters:
foundry_dir (
str) – the “.foundry” directoryflags (
Foundry.ContextFlags) – flags for how to create the contextcancellable (
Dex.CancellableorNone) – optional cancellable to use when awaiting to propagate work cancellation
- Returns:
a
Dex.Futurewhich will resolve to aFoundry.Context.- Return type:
Creates a new context.
If flags has
Foundry.ContextFlags.CREATEset then it will create the “.foundry” directory first.If project_dir is not set, the current directory is used unless it was previously stored in the context state.
- classmethod new_for_user(cancellable)¶
- Parameters:
cancellable (
Dex.CancellableorNone) – optional cancellable to use when awaiting to propagate work cancellation- Return type:
- dup_action_group()¶
- Returns:
a [iface`Gio`.ActionGroup]
- Return type:
Gets a [iface`Gio`.ActionGroup] that contains various actions for the context.
Actions may be provided by subclassing
Foundry.Serviceand implementing the [iface`Gio`.ActionGroup] interface.
- dup_build_manager()¶
- Returns:
- Return type:
Gets the
Foundry.BuildManagerinstance.
- dup_build_system()¶
-
Gets the name of the build system to use.
First the settings are checked. If set, that is preferred. After that, the configuration is checked to see if it specifies a build system.
Otherwise,
Noneis returned.Build addins can also affect which build system is used and you may check what the build pipeline thinks should be the build system (which checks this value) by using [property`Foundry`.BuildPipeline:build-system].
- dup_command_manager()¶
- Returns:
- Return type:
Gets the
Foundry.CommandManagerinstance.
- dup_config_manager()¶
- Returns:
- Return type:
Gets the
Foundry.ConfigManagerinstance.
- dup_dbus_service()¶
- Returns:
- Return type:
Gets the
Foundry.DBusServiceinstance.
- dup_debugger_manager()¶
- Returns:
- Return type:
Gets the
Foundry.DebuggerManagerinstance.
- dup_default_license()¶
- Return type:
- dup_dependency_manager()¶
- Returns:
- Return type:
Gets the
Foundry.DependencyManagerinstance.
- dup_device_manager()¶
- Returns:
- Return type:
Gets the
Foundry.DeviceManagerinstance.
- dup_diagnostic_manager()¶
- Returns:
- Return type:
Gets the
Foundry.DiagnosticManagerinstance.
- dup_doap_service()¶
- Returns:
- Return type:
Gets the
Foundry.DoapServiceinstance.New in version 1.1.
- dup_documentation_manager()¶
- Returns:
- Return type:
Gets the
Foundry.DocumentationManagerinstance.
- dup_file_manager()¶
- Returns:
- Return type:
Gets the
Foundry.FileManagerinstance.
- dup_forge_manager()¶
- Returns:
- Return type:
Gets the
Foundry.ForgeManagerinstance.
- dup_intent_manager()¶
- Returns:
- Return type:
Gets the
Foundry.IntentManagerinstance.
- dup_llm_manager()¶
- Returns:
- Return type:
Gets the
Foundry.LlmManagerinstance.
- dup_log_manager()¶
- Returns:
- Return type:
Gets the
Foundry.LogManagerinstance.
- dup_lsp_manager()¶
- Returns:
- Return type:
Gets the
Foundry.LspManagerinstance.
- dup_operation_manager()¶
- Returns:
- Return type:
Gets the
Foundry.OperationManagerinstance.
- dup_project_directory()¶
-
Gets the
Foundry.Context:project-directory.
- dup_run_manager()¶
- Returns:
- Return type:
Gets the
Foundry.RunManagerinstance.
- dup_sdk_manager()¶
- Returns:
- Return type:
Gets the
Foundry.SdkManagerinstance.
- dup_search_manager()¶
- Returns:
- Return type:
Gets the
Foundry.SearchManagerinstance.
- dup_secret_service()¶
- Returns:
- Return type:
Gets the
Foundry.SecretServiceinstance.
- dup_service_typed(service_type)¶
- Parameters:
service_type (
GObject.GType) –- Return type:
- dup_state_directory()¶
-
Gets the
Foundry.Context:state-directory.
- dup_terminal_service()¶
- Returns:
- Return type:
Gets the
Foundry.TerminalServiceinstance.
- dup_test_manager()¶
- Returns:
- Return type:
Gets the
Foundry.TestManagerinstance.
- dup_text_manager()¶
- Returns:
- Return type:
Gets the
Foundry.TextManagerinstance.
- dup_tweak_manager()¶
- Returns:
- Return type:
Gets the
Foundry.TweakManagerinstance.
- dup_vcs_manager()¶
- Returns:
- Return type:
Gets the
Foundry.VcsManagerinstance.
- Return type:
- list_services()¶
- Returns:
a [iface`Gio`.ListModel] of [class`Foundry`.Service]
- Return type:
- load_project_settings()¶
- Returns:
a [class`Foundry`.Settings]
- Return type:
This function is functionally equivalent to calling [method`Foundry`.Context.load_settings] with the “org.gnome.foundry.project” gsettings schema id.
- load_settings(schema_id, schema_path)¶
- Parameters:
- Returns:
a [class`Foundry`.Settings]
- Return type:
Loads layered [class`Gio`.Settings] as a [class`Foundry`.Settings].
The [class`Foundry`.Settings] allows for settings to come from multiple layers such as user-defaults, project-defaults, and user-overrides.
- network_allowed()¶
-
Checks if network is currently allowed.
This checks if data is allowed on metered connections and if the current network connection is metered.
- save(cancellable)¶
- Parameters:
cancellable (
Dex.Cancellable) –- Returns:
A
Dex.Futurethat will resolve to a boolean.- Return type:
Save the foundry state to the
Foundry.Context:directory.
- shutdown()¶
- Returns:
a
Dex.Futurethat resolves when the context has shutdown.- Return type:
Requests that the context shutdown and cleanup state.
Property Details¶
- Foundry.Context.props.build_manager¶
- Name:
build-manager- Type:
- Default Value:
- Flags:
- Foundry.Context.props.build_system¶
- Foundry.Context.props.command_manager¶
- Name:
command-manager- Type:
- Default Value:
- Flags:
- Foundry.Context.props.config_manager¶
- Name:
config-manager- Type:
- Default Value:
- Flags:
- Foundry.Context.props.debugger_manager¶
- Name:
debugger-manager- Type:
- Default Value:
- Flags:
- Foundry.Context.props.dependency_manager¶
- Name:
dependency-manager- Type:
- Default Value:
- Flags:
- Foundry.Context.props.device_manager¶
- Name:
device-manager- Type:
- Default Value:
- Flags:
- Foundry.Context.props.diagnostic_manager¶
- Name:
diagnostic-manager- Type:
- Default Value:
- Flags:
- Foundry.Context.props.doap_service¶
- Name:
doap-service- Type:
- Default Value:
- Flags:
New in version 1.1.
- Foundry.Context.props.documentation_manager¶
- Name:
documentation-manager- Type:
- Default Value:
- Flags:
- Foundry.Context.props.file_manager¶
- Name:
file-manager- Type:
- Default Value:
- Flags:
- Foundry.Context.props.forge_manager¶
- Name:
forge-manager- Type:
- Default Value:
- Flags:
New in version 1.1.
- Foundry.Context.props.intent_manager¶
- Name:
intent-manager- Type:
- Default Value:
- Flags:
- Foundry.Context.props.llm_manager¶
- Name:
llm-manager- Type:
- Default Value:
- Flags:
- Foundry.Context.props.log_manager¶
- Name:
log-manager- Type:
- Default Value:
- Flags:
- Foundry.Context.props.lsp_manager¶
- Name:
lsp-manager- Type:
- Default Value:
- Flags:
- Foundry.Context.props.operation_manager¶
- Name:
operation-manager- Type:
- Default Value:
- Flags:
- Foundry.Context.props.project_directory¶
-
The directory containing the project.
This is generally the directory which contains “.git” and “.foundry”.
- Foundry.Context.props.run_manager¶
- Name:
run-manager- Type:
- Default Value:
- Flags:
- Foundry.Context.props.sdk_manager¶
- Name:
sdk-manager- Type:
- Default Value:
- Flags:
- Foundry.Context.props.search_manager¶
- Name:
search-manager- Type:
- Default Value:
- Flags:
- Foundry.Context.props.secret_service¶
- Name:
secret-service- Type:
- Default Value:
- Flags:
- Foundry.Context.props.state_directory¶
-
The directory of the context, which is typically “.foundry” within the
Foundry.Context:project-directory.
- Foundry.Context.props.terminal_service¶
- Name:
terminal-service- Type:
- Default Value:
- Flags:
- Foundry.Context.props.test_manager¶
- Name:
test-manager- Type:
- Default Value:
- Flags:
- Foundry.Context.props.text_manager¶
- Name:
text-manager- Type:
- Default Value:
- Flags:
- Foundry.Context.props.title¶
- Name:
title- Type:
- Default Value:
- Flags:
- Foundry.Context.props.tweak_manager¶
- Name:
tweak-manager- Type:
- Default Value:
- Flags:
- Foundry.Context.props.vcs_manager¶
- Name:
vcs-manager- Type:
- Default Value:
- Flags: