IdeRenameProvider: Builder SDK Reference

## IdeRenameProvider IdeRenameProvider |

## Functions

void | ide_rename_provider_load ()
void | ide_rename_provider_rename_async ()
gboolean | ide_rename_provider_rename_finish ()

## Properties

IdeBuffer * | buffer | Write

## Types and Values

#define | IDE_TYPE_RENAME_PROVIDER
struct | IdeRenameProviderInterface
| IdeRenameProvider

## Object Hierarchy

        GInterface
        ╰── IdeRenameProvider

## Prerequisites

IdeRenameProvider requires IdeObject.

## Known Implementations

IdeRenameProvider is implemented by IdeLangservRenameProvider.

## Description

## Functions

### ide_rename_provider_load ()

    void
    ide_rename_provider_load (IdeRenameProvider *self);

### ide_rename_provider_rename_async ()

    void
    ide_rename_provider_rename_async (IdeRenameProvider *self,
                                      IdeSourceLocation *location,
                                      const gchar *new_name,
                                      GCancellable *cancellable,
                                      GAsyncReadyCallback callback,
                                      gpointer user_data);

This requests the provider to determine the edits that must be made to the project to perform the renaming of a symbol found at `location` .

Use `ide_rename_provider_rename_finish()` to get the results.

#### Parameters

self | An IdeRenameProvider |
location | An IdeSourceLocation |
new_name | The replacement name for the symbol |
cancellable | a GCancellable or `NULL`. | [nullable]
callback | a callback to complete the request |
user_data | user data for `callback` |

### ide_rename_provider_rename_finish ()

    gboolean
    ide_rename_provider_rename_finish (IdeRenameProvider *self,
                                       GAsyncResult *result,
                                       GPtrArray **edits,
                                       GError **error);

Completes a request to `ide_rename_provider_rename_async()`.

You can use the resulting GPtrArray of IdeProjectEdit instances to edit the project to complete the symbol rename.

#### Parameters

self | An IdeRenameProvider |
result | a GAsyncResult |
edits | A location for a GPtrArray of IdeProjectEdit instances. | [out][transfer full][element-type Ide.ProjectEdit][optional]
error | a location for a GError, or `NULL`. |

#### Returns

`TRUE` if successful and `edits` is set. Otherwise `FALSE` and `error` is set.

## Types and Values

### IDE_TYPE_RENAME_PROVIDER

    #define IDE_TYPE_RENAME_PROVIDER (ide_rename_provider_get_type())

### struct IdeRenameProviderInterface

    struct IdeRenameProviderInterface {
      GTypeInterface parent_iface;

      void     (*rename_async)  (IdeRenameProvider    *self,
                                 IdeSourceLocation    *location,
                                 const gchar          *new_name,
                                 GCancellable         *cancellable,
                                 GAsyncReadyCallback   callback,
                                 gpointer              user_data);
      gboolean (*rename_finish) (IdeRenameProvider    *self,
                                 GAsyncResult         *result,
                                 GPtrArray           **edits,
                                 GError              **error);
      void     (*load)          (IdeRenameProvider    *self);
    };

### IdeRenameProvider

    typedef struct _IdeRenameProvider IdeRenameProvider;

## Property Details

### The `“buffer”` property

      “buffer”                   IdeBuffer *

Buffer.

Flags: Write