[gnome-builder] vala-pack: port to new code indexer API changes



commit 3e9c88126a275ce46556f6c8668229462e6bfa41
Author: Christian Hergert <chergert redhat com>
Date:   Wed Jan 17 17:37:35 2018 -0800

    vala-pack: port to new code indexer API changes

 src/plugins/vala-pack/ide-vala-code-indexer.vala | 14 ++++----------
 1 file changed, 4 insertions(+), 10 deletions(-)
---
diff --git a/src/plugins/vala-pack/ide-vala-code-indexer.vala 
b/src/plugins/vala-pack/ide-vala-code-indexer.vala
index 33aa7ffc5..ccea51742 100644
--- a/src/plugins/vala-pack/ide-vala-code-indexer.vala
+++ b/src/plugins/vala-pack/ide-vala-code-indexer.vala
@@ -28,10 +28,9 @@ namespace Ide
 
        public class ValaCodeIndexer : Ide.Object, Ide.CodeIndexer
        {
-               /* Note: This runs in a thread */
-               public Ide.CodeIndexEntries index_file (GLib.File file,
-                                                       string[]? build_flags,
-                                                       GLib.Cancellable? cancellable)
+               public async Ide.CodeIndexEntries index_file_async (GLib.File file,
+                                                                   string[]? build_flags,
+                                                                   GLib.Cancellable? cancellable)
                        throws GLib.Error
                {
                        var context = this.get_context ();
@@ -39,12 +38,7 @@ namespace Ide
                        var index = service.index;
                        var tree = index.get_symbol_tree_sync (file, cancellable);
 
-                       Ide.ValaCodeIndexEntries? ret = null;
-
-                       index.do_locked (_ => {
-                               ret = new Ide.ValaCodeIndexEntries (tree as Ide.ValaSymbolTree);
-                       });
-
+                       var ret = new Ide.ValaCodeIndexEntries (tree as Ide.ValaSymbolTree);
                        if (ret == null)
                                throw new GLib.IOError.FAILED ("failed to build entries");
 


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