[gnome-builder] gjs_symbols: Simplify getting runtime
- From: Patrick Griffis <pgriffis src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] gjs_symbols: Simplify getting runtime
- Date: Wed, 8 Nov 2017 17:24:39 +0000 (UTC)
commit 3eb7e0188373ae3f13926e83c9379084b2cf7515
Author: Patrick Griffis <tingping tingping se>
Date: Wed Nov 8 12:23:59 2017 -0500
gjs_symbols: Simplify getting runtime
This previous method would sometimes fail
src/plugins/gjs-symbols/gjs_symbols.py | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/src/plugins/gjs-symbols/gjs_symbols.py b/src/plugins/gjs-symbols/gjs_symbols.py
index ba5be2e..ddd59e5 100644
--- a/src/plugins/gjs-symbols/gjs_symbols.py
+++ b/src/plugins/gjs-symbols/gjs_symbols.py
@@ -215,12 +215,10 @@ class GjsSymbolProvider(Ide.Object, Ide.SymbolResolver):
@staticmethod
def _get_launcher(context, file_):
file_path = file_.get_path()
- script = JS_SCRIPT %file_path
+ script = JS_SCRIPT % file_path
unsaved_file = context.get_unsaved_files().get_unsaved_file(file_)
- pipeline = context.get_build_manager().get_pipeline()
- runtime = pipeline.get_configuration().get_runtime()
-
+ runtime = context.get_configuration_manager().get_current().get_runtime()
launcher = runtime.create_launcher()
launcher.set_flags(Gio.SubprocessFlags.STDOUT_PIPE | Gio.SubprocessFlags.STDERR_SILENCE)
launcher.push_args(('gjs', '-c', script))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]