IdeSymbolResolver: Builder SDK Reference

## IdeSymbolResolver IdeSymbolResolver |

## Functions

void | ide_symbol_resolver_load ()
void | ide_symbol_resolver_unload ()
void | ide_symbol_resolver_lookup_symbol_async ()
IdeSymbol * | ide_symbol_resolver_lookup_symbol_finish ()
void | ide_symbol_resolver_get_symbol_tree_async ()
IdeSymbolTree * | ide_symbol_resolver_get_symbol_tree_finish ()
void | ide_symbol_resolver_find_references_async ()
GPtrArray * | ide_symbol_resolver_find_references_finish ()
void | ide_symbol_resolver_find_nearest_scope_async ()
IdeSymbol * | ide_symbol_resolver_find_nearest_scope_finish ()

## Types and Values

#define | IDE_TYPE_SYMBOL_RESOLVER
struct | IdeSymbolResolverInterface
| IdeSymbolResolver

## Object Hierarchy

        GInterface
        ╰── IdeSymbolResolver

## Prerequisites

IdeSymbolResolver requires IdeObject.

## Known Implementations

IdeSymbolResolver is implemented by IdeLangservSymbolResolver.

## Description

## Functions

### ide_symbol_resolver_load ()

    void
    ide_symbol_resolver_load (IdeSymbolResolver *self);

### ide_symbol_resolver_unload ()

    void
    ide_symbol_resolver_unload (IdeSymbolResolver *self);

### ide_symbol_resolver_lookup_symbol_async ()

    void
    ide_symbol_resolver_lookup_symbol_async
                                   (IdeSymbolResolver *self,
                                    IdeSourceLocation *location,
                                    GCancellable *cancellable,
                                    GAsyncReadyCallback callback,
                                    gpointer user_data);

Asynchronously requests that `self` determine the symbol existing at the source location denoted by `self` . `callback` should call `ide_symbol_resolver_lookup_symbol_finish()` to retrieve the result.

#### Parameters

self | An IdeSymbolResolver. |
location | An IdeSourceLocation. |
cancellable | a GCancellable or `NULL`. | [allow-none]
callback | A callback to execute upon completion. |
user_data | user data for `callback` . |

### ide_symbol_resolver_lookup_symbol_finish ()

    IdeSymbol *
    ide_symbol_resolver_lookup_symbol_finish
                                   (IdeSymbolResolver *self,
                                    GAsyncResult *result,
                                    GError **error);

Completes an asynchronous call to lookup a symbol using `ide_symbol_resolver_lookup_symbol_async()`.

#### Parameters

self | An IdeSymbolResolver. |
result | a GAsyncResult provided to the callback. |
error | A location for an `error` or `NULL`. | [out]

#### Returns

An IdeSymbol if successful; otherwise `NULL`.

[transfer full][nullable]

### ide_symbol_resolver_get_symbol_tree_async ()

    void
    ide_symbol_resolver_get_symbol_tree_async
                                   (IdeSymbolResolver *self,
                                    GFile *file,
                                    IdeBuffer *buffer,
                                    GCancellable *cancellable,
                                    GAsyncReadyCallback callback,
                                    gpointer user_data);

Asynchronously fetch an up to date symbol tree for `file` .

#### Parameters

self | An IdeSymbolResolver |
file | a GFile |
buffer | an IdeBuffer or `NULL` |
cancellable | a GCancellable or `NULL`. | [allow-none]
callback | a callback to execute upon completion. | [allow-none]
user_data | user data for `callback` |

### ide_symbol_resolver_get_symbol_tree_finish ()

    IdeSymbolTree *
    ide_symbol_resolver_get_symbol_tree_finish
                                   (IdeSymbolResolver *self,
                                    GAsyncResult *result,
                                    GError **error);

Completes an asynchronous request to get the symbol tree for the requested file.

#### Returns

An IdeSymbolTree; otherwise `NULL` and `error` is set.

[nullable][transfer full]

### ide_symbol_resolver_find_references_async ()

    void
    ide_symbol_resolver_find_references_async
                                   (IdeSymbolResolver *self,
                                    IdeSourceLocation *location,
                                    GCancellable *cancellable,
                                    GAsyncReadyCallback callback,
                                    gpointer user_data);

### ide_symbol_resolver_find_references_finish ()

    GPtrArray *
    ide_symbol_resolver_find_references_finish
                                   (IdeSymbolResolver *self,
                                    GAsyncResult *result,
                                    GError **error);

Completes an asynchronous request to `ide_symbol_resolver_find_references_async()`.

#### Parameters

self | a IdeSymbolResolver |
result | a GAsyncResult |
error | a GError or `NULL` |

#### Returns

a GPtrArray of IdeSourceRange if successful; otherwise `NULL` and `error` is set.

[transfer full][element-type Ide.SourceRange]

### ide_symbol_resolver_find_nearest_scope_async ()

    void
    ide_symbol_resolver_find_nearest_scope_async
                                   (IdeSymbolResolver *self,
                                    IdeSourceLocation *location,
                                    GCancellable *cancellable,
                                    GAsyncReadyCallback callback,
                                    gpointer user_data);

This function asynchronously requests to locate the containing scope for a given source location.

See `ide_symbol_resolver_find_nearest_scope_finish()` for how to complete the operation.

#### Parameters

self | a IdeSymbolResolver |
location | an IdeSourceLocation |
cancellable | a GCancellable or `NULL`. | [nullable]
callback | an async callback. | [scope async][closure user_data]
user_data | user data for `callback` |

Since: 3.26

### ide_symbol_resolver_find_nearest_scope_finish ()

    IdeSymbol *
    ide_symbol_resolver_find_nearest_scope_finish
                                   (IdeSymbolResolver *self,
                                    GAsyncResult *result,
                                    GError **error);

This function completes an asynchronous operation to locate the containing scope for a given source location.

See `ide_symbol_resolver_find_nearest_scope_async()` for more information.

#### Parameters

self | a IdeSymbolResolver |
result | a GAsyncResult |
error | a location for a GError or `NULL` |

#### Returns

An IdeSymbol or `NULL`.

[transfer full][nullable]

Since: 3.26

## Types and Values

### IDE_TYPE_SYMBOL_RESOLVER

    #define IDE_TYPE_SYMBOL_RESOLVER (ide_symbol_resolver_get_type())

### struct IdeSymbolResolverInterface

    struct IdeSymbolResolverInterface {
      GTypeInterface parent_interface;

      void           (*lookup_symbol_async)      (IdeSymbolResolver    *self,
                                                  IdeSourceLocation    *location,
                                                  GCancellable         *cancellable,
                                                  GAsyncReadyCallback   callback,
                                                  gpointer              user_data);
      IdeSymbol     *(*lookup_symbol_finish)     (IdeSymbolResolver    *self,
                                                  GAsyncResult         *result,
                                                  GError              **error);
      void           (*get_symbol_tree_async)    (IdeSymbolResolver    *self,
                                                  GFile                *file,
                                                  IdeBuffer            *buffer,
                                                  GCancellable         *cancellable,
                                                  GAsyncReadyCallback   callback,
                                                  gpointer              user_data);
      IdeSymbolTree *(*get_symbol_tree_finish)   (IdeSymbolResolver    *self,
                                                  GAsyncResult         *result,
                                                  GError              **error);
      void           (*load)                     (IdeSymbolResolver    *self);
      void           (*find_references_async)    (IdeSymbolResolver    *self,
                                                  IdeSourceLocation    *location,
                                                  GCancellable         *cancellable,
                                                  GAsyncReadyCallback   callback,
                                                  gpointer              user_data);
      GPtrArray     *(*find_references_finish)   (IdeSymbolResolver    *self,
                                                  GAsyncResult         *result,
                                                  GError              **error);
      void           (*find_nearest_scope_async) (IdeSymbolResolver    *self,
                                                  IdeSourceLocation    *location,
                                                  GCancellable         *cancellable,
                                                  GAsyncReadyCallback   callback,
                                                  gpointer              user_data);
      IdeSymbol     *(*find_nearest_scope_finish) (IdeSymbolResolver    *self,
                                                  GAsyncResult         *result,
                                                  GError              **error);
      void           (*unload)                   (IdeSymbolResolver    *self);
    };

### IdeSymbolResolver

    typedef struct _IdeSymbolResolver IdeSymbolResolver;