Top | ![]() |
![]() |
![]() |
![]() |
gboolean | ide_build_manager_get_busy () |
gboolean | ide_build_manager_get_can_build () |
gchar * | ide_build_manager_get_message () |
GDateTime * | ide_build_manager_get_last_build_time () |
GTimeSpan | ide_build_manager_get_running_time () |
void | ide_build_manager_cancel () |
IdeBuildPipeline * | ide_build_manager_get_pipeline () |
void | ide_build_manager_rebuild_async () |
gboolean | ide_build_manager_rebuild_finish () |
void | ide_build_manager_execute_async () |
gboolean | ide_build_manager_execute_finish () |
void | ide_build_manager_clean_async () |
gboolean | ide_build_manager_clean_finish () |
gboolean | busy | Read |
gboolean | can-build | Read |
guint | error-count | Read |
gboolean | has-diagnostics | Read |
GDateTime * | last-build-time | Read |
gchar * | message | Read |
IdeBuildPipeline * | pipeline | Read |
gint64 | running-time | Read |
guint | warning-count | Read |
The IdeBuildManager is responsible for managing the active build pipeline as well as providing common high-level actions to plugins.
You can use various async operations such as
ide_build_manager_execute_async()
, ide_build_manager_clean_async()
, or
ide_build_manager_rebuild_async()
to build, clean, and rebuild respectively
without needing to track the build pipeline.
The IdeBuildPipeline is used to specify how and when build operations should occur. Plugins attach build stages to the pipeline to perform build actions.
gboolean
ide_build_manager_get_busy (IdeBuildManager *self
);
Gets if the IdeBuildManager is currently busy building the project.
See “busy” for more information.
Since: 3.22
gboolean
ide_build_manager_get_can_build (IdeBuildManager *self
);
Checks if the current pipeline is ready to build.
Since: 3.22
gchar *
ide_build_manager_get_message (IdeBuildManager *self
);
This function returns the current build message as a string.
See “message” for more information.
Since: 3.22
GDateTime *
ide_build_manager_get_last_build_time (IdeBuildManager *self
);
This function returns a GDateTime of the last build request. If
there has not yet been a build request, this will return NULL
.
See “last-build-time” for more information.
Since: 3.22
GTimeSpan
ide_build_manager_get_running_time (IdeBuildManager *self
);
Gets the amount of elapsed time of the current build as a GTimeSpan.
Since: 3.22
void
ide_build_manager_cancel (IdeBuildManager *self
);
This function will cancel any in-flight builds.
You may also activate this using the "cancel" GAction provided by the GActionGroup interface.
Since: 3.22
IdeBuildPipeline *
ide_build_manager_get_pipeline (IdeBuildManager *self
);
This function gets the current build pipeline. The pipeline will be reloaded as build configurations change.
Since: 3.22
void ide_build_manager_rebuild_async (IdeBuildManager *self
,IdeBuildPhase phase
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
Asynchronously requests that the build pipeline clean and rebuild up to the given phase. This may involve discarding previous build artifacts to allow for the rebuild process.
See ide_build_pipeline_rebuild_async()
for more information.
self |
||
phase |
the build phase to rebuild to |
|
cancellable |
a GCancellable or |
[nullable] |
callback |
a callback to execute upon completion, or |
[nullable] |
user_data |
closure data for |
Since: 3.22
gboolean ide_build_manager_rebuild_finish (IdeBuildManager *self
,GAsyncResult *result
,GError **error
);
Completes an asynchronous request to ide_build_manager_rebuild_async()
.
Since: 3.22
void ide_build_manager_execute_async (IdeBuildManager *self
,IdeBuildPhase phase
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
This function will request that phase
is completed in the underlying
build pipeline and execute a build. Upon completion, callback
will be
executed and it can determine the success or failure of the operation
using ide_build_manager_execute_finish()
.
self |
||
phase |
An IdeBuildPhase or 0 |
|
cancellable |
a GCancellable or |
[nullable] |
callback |
A callback to execute upon completion |
|
user_data |
user data for |
Since: 3.22
gboolean ide_build_manager_execute_finish (IdeBuildManager *self
,GAsyncResult *result
,GError **error
);
Completes a request to ide_build_manager_execute_async()
.
Since: 3.22
void ide_build_manager_clean_async (IdeBuildManager *self
,IdeBuildPhase phase
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
Asynchronously requests that the build pipeline clean up to phase
.
See ide_build_pipeline_clean_async()
for more information.
self |
||
phase |
the build phase to clean |
|
cancellable |
a GCancellable or |
[nullable] |
callback |
a callback to execute upon completion, or |
[nullable] |
user_data |
closure data for |
Since: 3.22
gboolean ide_build_manager_clean_finish (IdeBuildManager *self
,GAsyncResult *result
,GError **error
);
Completes an asynchronous request to ide_build_manager_clean_async()
.
Since: 3.22
“busy”
property “busy” gboolean
The "busy" property indicates if there is currently a build executing. This can be bound to UI elements to display to the user that a build is active (and therefore other builds cannot be activated at the moment).
Flags: Read
Default value: FALSE
Since: 3.22
“can-build”
property “can-build” gboolean
Gets if the build manager can queue a build request.
This might be false if the required runtime is not available or other errors in setting up the build pipeline.
Flags: Read
Default value: FALSE
Since: 3.22
“error-count”
property “error-count” guint
The number of errors discovered during the build process.
Flags: Read
Default value: 0
Since: 3.22
“has-diagnostics”
property “has-diagnostics” gboolean
The "has-diagnostics" property indicates that there have been diagnostics found during the last execution of the build pipeline.
Flags: Read
Default value: FALSE
Since: 3.22
“last-build-time”
property “last-build-time” GDateTime *
The "last-build-time" property contains a GDateTime of the time the last build request was submitted.
Flags: Read
Since: 3.22
“message”
property “message” gchar *
The "message" property contains a string message describing the current state of the build process. This may be bound to UI elements to notify the user of the buid progress.
Flags: Read
Default value: NULL
Since: 3.22
“pipeline”
property“pipeline” IdeBuildPipeline *
The "pipeline" property is the build pipeline that the build manager is currently managing.
Flags: Read
Since: 3.22
“running-time”
property “running-time” gint64
The "running-time" property can be bound by UI elements that
want to track how long the current build has taken. g_object_notify()
is called on a regular interval during the build so that the UI
elements may automatically update.
The value of this property is a GTimeSpan, which are 64-bit signed
integers with microsecond precision. See G_USEC_PER_SEC
for a constant
to tranform this to seconds.
Flags: Read
Allowed values: >= 0
Default value: 0
Since: 3.22
“build-failed”
signalvoid user_function (IdeBuildManager *self, IdeBuildPipeline *pipeline, gpointer user_data)
The "build-failed" signal is emitted when a build that was previously notified via “build-started” has failed to complete successfully.
Contrast this with “build-finished” for a successful build.
Flags: Run Last
Since: 3.22
“build-finished”
signalvoid user_function (IdeBuildManager *self, IdeBuildPipeline *pipeline, gpointer user_data)
The "build-finished" signal is emitted when a build completed successfully.
Flags: Run Last
Since: 3.22
“build-started”
signalvoid user_function (IdeBuildManager *self, IdeBuildPipeline *pipeline, gpointer user_data)
The "build-started" signal is emitted when a new build has started.
The build may be an incremental build. The pipeline
instance is
the build pipeline which is being executed.
Flags: Run Last
Since: 3.22