[gnome-builder] libide-foundry: add helper to get commands from context



commit c727740aa3f6611edfe0fa18bc485444b2b14cb3
Author: Christian Hergert <chergert redhat com>
Date:   Mon Jul 11 21:09:36 2022 -0700

    libide-foundry: add helper to get commands from context

 src/libide/foundry/ide-foundry-compat.c | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
---
diff --git a/src/libide/foundry/ide-foundry-compat.c b/src/libide/foundry/ide-foundry-compat.c
index b6a3746c7..b72fd2d9b 100644
--- a/src/libide/foundry/ide-foundry-compat.c
+++ b/src/libide/foundry/ide-foundry-compat.c
@@ -27,6 +27,7 @@
 #include "ide-device-manager.h"
 #include "ide-config-manager.h"
 #include "ide-foundry-compat.h"
+#include "ide-run-commands.h"
 #include "ide-run-manager.h"
 #include "ide-runtime-manager.h"
 #include "ide-test-manager.h"
@@ -216,3 +217,19 @@ ide_test_manager_from_context (IdeContext *context)
 
   return ensure_child_typed_borrowed (context, IDE_TYPE_TEST_MANAGER);
 }
+
+/**
+ * ide_run_commands_from_context:
+ * @context: an #IdeContext
+ *
+ * Gets the default #IdeRunCommands instance for @context.
+ *
+ * Returns: (transfer none): an #IdeRunCommands
+ */
+IdeRunCommands *
+ide_run_commands_from_context (IdeContext *context)
+{
+  g_return_val_if_fail (IDE_IS_CONTEXT (context), NULL);
+
+  return ensure_child_typed_borrowed (context, IDE_TYPE_RUN_COMMANDS);
+}


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]