Commit 3e9c8812 authored by Christian Hergert's avatar Christian Hergert
Browse files

vala-pack: port to new code indexer API changes

parent e196faa9
...@@ -28,10 +28,9 @@ namespace Ide ...@@ -28,10 +28,9 @@ namespace Ide
public class ValaCodeIndexer : Ide.Object, Ide.CodeIndexer public class ValaCodeIndexer : Ide.Object, Ide.CodeIndexer
{ {
/* Note: This runs in a thread */ public async Ide.CodeIndexEntries index_file_async (GLib.File file,
public Ide.CodeIndexEntries index_file (GLib.File file, string[]? build_flags,
string[]? build_flags, GLib.Cancellable? cancellable)
GLib.Cancellable? cancellable)
throws GLib.Error throws GLib.Error
{ {
var context = this.get_context (); var context = this.get_context ();
...@@ -39,12 +38,7 @@ namespace Ide ...@@ -39,12 +38,7 @@ namespace Ide
var index = service.index; var index = service.index;
var tree = index.get_symbol_tree_sync (file, cancellable); var tree = index.get_symbol_tree_sync (file, cancellable);
Ide.ValaCodeIndexEntries? ret = null; var ret = new Ide.ValaCodeIndexEntries (tree as Ide.ValaSymbolTree);
index.do_locked (_ => {
ret = new Ide.ValaCodeIndexEntries (tree as Ide.ValaSymbolTree);
});
if (ret == null) if (ret == null)
throw new GLib.IOError.FAILED ("failed to build entries"); throw new GLib.IOError.FAILED ("failed to build entries");
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment