[gnome-builder] rename-provider: add IdeRenameProvider
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] rename-provider: add IdeRenameProvider
- Date: Wed, 26 Oct 2016 06:04:53 +0000 (UTC)
commit 2e88da9125bfd708103d7f840806732134952c75
Author: Christian Hergert <chergert redhat com>
Date: Tue Oct 25 22:59:20 2016 -0700
rename-provider: add IdeRenameProvider
This provides the abstraction for plugins to provide an IdeRenameProvider
to return all the locations where a string needs to be replaced. This
can be used to perform "semantic rename" in a project.
libide/Makefile.am | 5 +
libide/ide-types.h | 4 +
libide/ide.h | 2 +
libide/projects/ide-project-edit-private.h | 34 ++++
libide/projects/ide-project-edit.c | 247 ++++++++++++++++++++++++++++
libide/projects/ide-project-edit.h | 52 ++++++
libide/rename/ide-rename-provider.c | 143 ++++++++++++++++
libide/rename/ide-rename-provider.h | 61 +++++++
8 files changed, 548 insertions(+), 0 deletions(-)
---
diff --git a/libide/Makefile.am b/libide/Makefile.am
index 2e41442..3a9a408 100644
--- a/libide/Makefile.am
+++ b/libide/Makefile.am
@@ -90,6 +90,7 @@ libide_1_0_la_public_headers = \
preferences/ide-preferences-spin-button.h \
preferences/ide-preferences-switch.h \
preferences/ide-preferences.h \
+ projects/ide-project-edit.h \
projects/ide-project-file.h \
projects/ide-project-files.h \
projects/ide-project-info.h \
@@ -97,6 +98,7 @@ libide_1_0_la_public_headers = \
projects/ide-project-miner.h \
projects/ide-project.h \
projects/ide-recent-projects.h \
+ rename/ide-rename-provider.h \
runner/ide-run-button.h \
runner/ide-run-manager.h \
runner/ide-runner.h \
@@ -266,6 +268,7 @@ libide_1_0_la_public_sources = \
preferences/ide-preferences-spin-button.c \
preferences/ide-preferences-switch.c \
preferences/ide-preferences.c \
+ projects/ide-project-edit.c \
projects/ide-project-file.c \
projects/ide-project-files.c \
projects/ide-project-info.c \
@@ -273,6 +276,7 @@ libide_1_0_la_public_sources = \
projects/ide-project-miner.c \
projects/ide-project.c \
projects/ide-recent-projects.c \
+ rename/ide-rename-provider.c \
runner/ide-run-button.c \
runner/ide-run-manager.c \
runner/ide-runner.c \
@@ -405,6 +409,7 @@ libide_1_0_la_SOURCES = \
modelines/modeline-parser.h \
plugins/ide-extension-util.c \
plugins/ide-extension-util.h \
+ projects/ide-project-edit-private.h \
preferences/ide-preferences-bin-private.h \
preferences/ide-preferences-bin.c \
preferences/ide-preferences-builtin.c \
diff --git a/libide/ide-types.h b/libide/ide-types.h
index b4aee57..c0ebd79 100644
--- a/libide/ide-types.h
+++ b/libide/ide-types.h
@@ -81,10 +81,14 @@ typedef struct _IdeProject IdeProject;
typedef struct _IdeProjectItem IdeProjectItem;
+typedef struct _IdeProjectEdit IdeProjectEdit;
+
typedef struct _IdeProjectFile IdeProjectFile;
typedef struct _IdeProjectFiles IdeProjectFiles;
+typedef struct _IdeRenameProvider IdeRenameProvider;
+
typedef struct _IdeRunner IdeRunner;
typedef struct _IdeRunManager IdeRunManager;
diff --git a/libide/ide.h b/libide/ide.h
index 7fd8e52..bc1e952 100644
--- a/libide/ide.h
+++ b/libide/ide.h
@@ -85,12 +85,14 @@ G_BEGIN_DECLS
#include "logging/ide-log.h"
#include "preferences/ide-preferences-addin.h"
#include "preferences/ide-preferences.h"
+#include "projects/ide-project-edit.h"
#include "projects/ide-project-file.h"
#include "projects/ide-project-files.h"
#include "projects/ide-project-item.h"
#include "projects/ide-project-miner.h"
#include "projects/ide-project.h"
#include "projects/ide-recent-projects.h"
+#include "rename/ide-rename-provider.h"
#include "runner/ide-run-manager.h"
#include "runner/ide-runner.h"
#include "runner/ide-runner-addin.h"
diff --git a/libide/projects/ide-project-edit-private.h b/libide/projects/ide-project-edit-private.h
new file mode 100644
index 0000000..716d600
--- /dev/null
+++ b/libide/projects/ide-project-edit-private.h
@@ -0,0 +1,34 @@
+/* ide-project-edit-private.h
+ *
+ * Copyright (C) 2016 Christian Hergert <chergert redhat com>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef IDE_PROJECT_EDIT_PRIVATE_H
+#define IDE_PROJECT_EDIT_PRIVATE_H
+
+#include "buffers/ide-buffer.h"
+#include "projects/ide-project-edit.h"
+
+G_BEGIN_DECLS
+
+void _ide_project_edit_prepare (IdeProjectEdit *self,
+ IdeBuffer *buffer);
+void _ide_project_edit_apply (IdeProjectEdit *self,
+ IdeBuffer *buffer);
+
+G_END_DECLS
+
+#endif /* IDE_PROJECT_EDIT_PRIVATE_H */
diff --git a/libide/projects/ide-project-edit.c b/libide/projects/ide-project-edit.c
new file mode 100644
index 0000000..a32678c
--- /dev/null
+++ b/libide/projects/ide-project-edit.c
@@ -0,0 +1,247 @@
+/* ide-project-edit.c
+ *
+ * Copyright (C) 2016 Christian Hergert <chergert redhat com>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#define G_LOG_DOMAIN "ide-project-edit"
+
+#include "projects/ide-project-edit.h"
+#include "projects/ide-project-edit-private.h"
+
+typedef struct
+{
+ IdeSourceRange *range;
+ gchar *replacement;
+
+ /* No references, cleared in apply */
+ GtkTextMark *begin_mark;
+ GtkTextMark *end_mark;
+} IdeProjectEditPrivate;
+
+enum {
+ PROP_0,
+ PROP_RANGE,
+ PROP_REPLACEMENT,
+ N_PROPS
+};
+
+G_DEFINE_TYPE_WITH_PRIVATE (IdeProjectEdit, ide_project_edit, G_TYPE_OBJECT)
+
+static GParamSpec *properties [N_PROPS];
+
+static void
+ide_project_edit_finalize (GObject *object)
+{
+ IdeProjectEdit *self = (IdeProjectEdit *)object;
+ IdeProjectEditPrivate *priv = ide_project_edit_get_instance_private (self);
+
+ g_clear_pointer (&priv->range, ide_source_range_unref);
+ g_clear_pointer (&priv->replacement, g_free);
+
+ G_OBJECT_CLASS (ide_project_edit_parent_class)->finalize (object);
+}
+
+static void
+ide_project_edit_get_property (GObject *object,
+ guint prop_id,
+ GValue *value,
+ GParamSpec *pspec)
+{
+ IdeProjectEdit *self = (IdeProjectEdit *)object;
+
+ switch (prop_id)
+ {
+ case PROP_RANGE:
+ g_value_set_boxed (value, ide_project_edit_get_range (self));
+ break;
+
+ case PROP_REPLACEMENT:
+ g_value_set_string (value, ide_project_edit_get_replacement (self));
+ break;
+
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ }
+}
+
+static void
+ide_project_edit_set_property (GObject *object,
+ guint prop_id,
+ const GValue *value,
+ GParamSpec *pspec)
+{
+ IdeProjectEdit *self = (IdeProjectEdit *)object;
+
+ switch (prop_id)
+ {
+ case PROP_RANGE:
+ ide_project_edit_set_range (self, g_value_get_boxed (value));
+ break;
+
+ case PROP_REPLACEMENT:
+ ide_project_edit_set_replacement (self, g_value_get_string (value));
+ break;
+
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ }
+}
+
+static void
+ide_project_edit_class_init (IdeProjectEditClass *klass)
+{
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
+
+ object_class->finalize = ide_project_edit_finalize;
+ object_class->get_property = ide_project_edit_get_property;
+ object_class->set_property = ide_project_edit_set_property;
+
+ properties [PROP_RANGE] =
+ g_param_spec_boxed ("range",
+ "Range",
+ "The range of the source to replace",
+ IDE_TYPE_SOURCE_RANGE,
+ (G_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY | G_PARAM_STATIC_STRINGS));
+
+ properties [PROP_REPLACEMENT] =
+ g_param_spec_string ("replacement",
+ "Replacement",
+ "The replacement text to be applied.",
+ NULL,
+ (G_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY | G_PARAM_STATIC_STRINGS));
+
+ g_object_class_install_properties (object_class, N_PROPS, properties);
+}
+
+static void
+ide_project_edit_init (IdeProjectEdit *self)
+{
+}
+
+IdeProjectEdit *
+ide_project_edit_new (void)
+{
+ return g_object_new (IDE_TYPE_PROJECT_EDIT, NULL);
+}
+
+/**
+ * ide_project_edit_get_range:
+ *
+ * Returns the range for the edit.
+ *
+ * Returns: (nullable) (transfer none): An #IdeSourceRange
+ */
+IdeSourceRange *
+ide_project_edit_get_range (IdeProjectEdit *self)
+{
+ IdeProjectEditPrivate *priv = ide_project_edit_get_instance_private (self);
+
+ g_return_val_if_fail (IDE_IS_PROJECT_EDIT (self), NULL);
+
+ return priv->range;
+}
+
+void
+ide_project_edit_set_range (IdeProjectEdit *self,
+ IdeSourceRange *range)
+{
+ IdeProjectEditPrivate *priv = ide_project_edit_get_instance_private (self);
+
+ g_return_if_fail (IDE_IS_PROJECT_EDIT (self));
+ g_return_if_fail (range != NULL);
+
+ if (priv->range != range)
+ {
+ g_clear_pointer (&priv->range, ide_source_range_unref);
+ priv->range = ide_source_range_ref (range);
+ g_object_notify_by_pspec (G_OBJECT (self), properties [PROP_RANGE]);
+ }
+}
+
+const gchar *
+ide_project_edit_get_replacement (IdeProjectEdit *self)
+{
+ IdeProjectEditPrivate *priv = ide_project_edit_get_instance_private (self);
+
+ g_return_val_if_fail (IDE_IS_PROJECT_EDIT (self), NULL);
+
+ return priv->replacement;
+}
+
+void
+ide_project_edit_set_replacement (IdeProjectEdit *self,
+ const gchar *replacement)
+{
+ IdeProjectEditPrivate *priv = ide_project_edit_get_instance_private (self);
+
+ g_return_if_fail (IDE_IS_PROJECT_EDIT (self));
+
+ if (g_strcmp0 (priv->replacement, replacement) != 0)
+ {
+ g_free (priv->replacement);
+ priv->replacement = g_strdup (replacement);
+ g_object_notify_by_pspec (G_OBJECT (self), properties [PROP_REPLACEMENT]);
+ }
+}
+
+void
+_ide_project_edit_prepare (IdeProjectEdit *self,
+ IdeBuffer *buffer)
+{
+ IdeProjectEditPrivate *priv = ide_project_edit_get_instance_private (self);
+ IdeSourceLocation *begin;
+ IdeSourceLocation *end;
+ GtkTextIter begin_iter;
+ GtkTextIter end_iter;
+
+ g_assert (IDE_IS_PROJECT_EDIT (self));
+ g_assert (IDE_IS_BUFFER (buffer));
+
+ begin = ide_source_range_get_begin (priv->range);
+ end = ide_source_range_get_end (priv->range);
+
+ ide_buffer_get_iter_at_source_location (buffer, &begin_iter, begin);
+ ide_buffer_get_iter_at_source_location (buffer, &end_iter, end);
+
+ priv->begin_mark = gtk_text_buffer_create_mark (GTK_TEXT_BUFFER (buffer),
+ NULL,
+ &begin_iter,
+ TRUE);
+
+ priv->end_mark = gtk_text_buffer_create_mark (GTK_TEXT_BUFFER (buffer),
+ NULL,
+ &end_iter,
+ FALSE);
+}
+
+void
+_ide_project_edit_apply (IdeProjectEdit *self,
+ IdeBuffer *buffer)
+{
+ IdeProjectEditPrivate *priv = ide_project_edit_get_instance_private (self);
+ GtkTextIter begin;
+ GtkTextIter end;
+
+ g_assert (IDE_IS_PROJECT_EDIT (self));
+ g_assert (IDE_IS_BUFFER (buffer));
+
+ gtk_text_buffer_get_iter_at_mark (GTK_TEXT_BUFFER (buffer), &begin, priv->begin_mark);
+ gtk_text_buffer_get_iter_at_mark (GTK_TEXT_BUFFER (buffer), &end, priv->end_mark);
+ gtk_text_buffer_delete (GTK_TEXT_BUFFER (buffer), &begin, &end);
+ gtk_text_buffer_insert (GTK_TEXT_BUFFER (buffer), &begin, priv->replacement, -1);
+ gtk_text_buffer_delete_mark (GTK_TEXT_BUFFER (buffer), priv->begin_mark);
+ gtk_text_buffer_delete_mark (GTK_TEXT_BUFFER (buffer), priv->end_mark);
+}
diff --git a/libide/projects/ide-project-edit.h b/libide/projects/ide-project-edit.h
new file mode 100644
index 0000000..14c63ca
--- /dev/null
+++ b/libide/projects/ide-project-edit.h
@@ -0,0 +1,52 @@
+/* ide-project-edit.h
+ *
+ * Copyright (C) 2016 Christian Hergert <chergert redhat com>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef IDE_PROJECT_EDIT_H
+#define IDE_PROJECT_EDIT_H
+
+#include <glib-object.h>
+
+#include "diagnostics/ide-source-range.h"
+
+G_BEGIN_DECLS
+
+#define IDE_TYPE_PROJECT_EDIT (ide_project_edit_get_type())
+
+G_DECLARE_DERIVABLE_TYPE (IdeProjectEdit, ide_project_edit, IDE, PROJECT_EDIT, GObject)
+
+struct _IdeProjectEditClass
+{
+ GObjectClass parent_instance;
+
+ gpointer _reserved1;
+ gpointer _reserved2;
+ gpointer _reserved3;
+ gpointer _reserved4;
+};
+
+IdeProjectEdit *ide_project_edit_new (void);
+IdeSourceRange *ide_project_edit_get_range (IdeProjectEdit *self);
+void ide_project_edit_set_range (IdeProjectEdit *self,
+ IdeSourceRange *range);
+const gchar *ide_project_edit_get_replacement (IdeProjectEdit *self);
+void ide_project_edit_set_replacement (IdeProjectEdit *self,
+ const gchar *replacement);
+
+G_END_DECLS
+
+#endif /* IDE_PROJECT_EDIT_H */
diff --git a/libide/rename/ide-rename-provider.c b/libide/rename/ide-rename-provider.c
new file mode 100644
index 0000000..9e237d8
--- /dev/null
+++ b/libide/rename/ide-rename-provider.c
@@ -0,0 +1,143 @@
+/* ide-rename-provider.c
+ *
+ * Copyright (C) 2016 Christian Hergert <chergert redhat com>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#define G_LOG_DOMAIN "ide-rename-provider.h"
+
+#include "ide-context.h"
+#include "ide-debug.h"
+
+#include "rename/ide-rename-provider.h"
+
+G_DEFINE_INTERFACE (IdeRenameProvider, ide_rename_provider, IDE_TYPE_OBJECT)
+
+static void
+ide_rename_provider_real_rename_async (IdeRenameProvider *self,
+ IdeSourceLocation *location,
+ const gchar *new_name,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
+{
+ g_autoptr(GTask) task = NULL;
+
+ g_assert (IDE_IS_RENAME_PROVIDER (self));
+ g_assert (location != NULL);
+ g_assert (new_name != NULL);
+ g_assert (!cancellable || G_IS_CANCELLABLE (cancellable));
+
+ task = g_task_new (self, cancellable, callback, user_data);
+ g_task_set_source_tag (task, ide_rename_provider_real_rename_async);
+
+ g_task_return_new_error (task,
+ G_IO_ERROR,
+ G_IO_ERROR_NOT_SUPPORTED,
+ "%s has not implemented rename_async",
+ G_OBJECT_TYPE_NAME (self));
+}
+
+static gboolean
+ide_rename_provider_real_rename_finish (IdeRenameProvider *self,
+ GAsyncResult *result,
+ GPtrArray **edits,
+ GError **error)
+{
+ g_assert (G_IS_TASK (result));
+
+ return g_task_propagate_boolean (G_TASK (result), error);
+}
+
+static void
+ide_rename_provider_default_init (IdeRenameProviderInterface *iface)
+{
+ iface->rename_async = ide_rename_provider_real_rename_async;
+ iface->rename_finish = ide_rename_provider_real_rename_finish;
+
+ g_object_interface_install_property (iface,
+ g_param_spec_object ("context",
+ "Context",
+ "The context for the IdeObject",
+ IDE_TYPE_CONTEXT,
+ (G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY |
G_PARAM_STATIC_STRINGS)));
+}
+
+/**
+ * ide_rename_provider_rename_async:
+ * @self: An #IdeRenameProvider
+ * @location: An #IdeSourceLocation
+ * @new_name: The replacement name for the symbol
+ * @cancellable: (nullable): A #GCancellable or %NULL
+ * @callback: a callback to complete the request
+ * @user_data: user data for @callback
+ *
+ * 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.
+ */
+void
+ide_rename_provider_rename_async (IdeRenameProvider *self,
+ IdeSourceLocation *location,
+ const gchar *new_name,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
+{
+ IDE_ENTRY;
+
+ g_return_if_fail (IDE_IS_RENAME_PROVIDER (self));
+ g_return_if_fail (location != NULL);
+ g_return_if_fail (new_name != NULL);
+ g_return_if_fail (!cancellable || G_IS_CANCELLABLE (cancellable));
+
+ IDE_RENAME_PROVIDER_GET_IFACE (self)->rename_async (self, location, new_name, cancellable, callback,
user_data);
+
+ IDE_EXIT;
+}
+
+/**
+ * ide_rename_provider_rename_finish:
+ * @self: An #IdeRenameProvider
+ * @result: A #GAsyncResult
+ * @edits: (out) (transfer container) (element-type Ide.ProjectEdit) (nullable): A location
+ * for a #GPtrArray of #IdeProjectEdit instances.
+ * @error: a location for a #GError, or %NULL.
+ *
+ * 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.
+ *
+ * Returns: %TRUE if successful and @edits is set. Otherwise %FALSE and @error is set.
+ */
+gboolean
+ide_rename_provider_rename_finish (IdeRenameProvider *self,
+ GAsyncResult *result,
+ GPtrArray **edits,
+ GError **error)
+{
+ gboolean ret;
+
+ IDE_ENTRY;
+
+ g_return_val_if_fail (G_IS_TASK (result), FALSE);
+ g_return_val_if_fail (G_IS_ASYNC_RESULT (result), FALSE);
+
+ ret = IDE_RENAME_PROVIDER_GET_IFACE (self)->rename_finish (self, result, edits, error);
+
+ IDE_RETURN (ret);
+}
diff --git a/libide/rename/ide-rename-provider.h b/libide/rename/ide-rename-provider.h
new file mode 100644
index 0000000..b42d594
--- /dev/null
+++ b/libide/rename/ide-rename-provider.h
@@ -0,0 +1,61 @@
+/* ide-rename-provider.h
+ *
+ * Copyright (C) 2016 Christian Hergert <chergert redhat com>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef IDE_RENAME_PROVIDER_H
+#define IDE_RENAME_PROVIDER_H
+
+#include "ide-object.h"
+
+#include "projects/ide-project-edit.h"
+
+G_BEGIN_DECLS
+
+#define IDE_TYPE_RENAME_PROVIDER (ide_rename_provider_get_type())
+
+G_DECLARE_INTERFACE (IdeRenameProvider, ide_rename_provider, IDE, RENAME_PROVIDER, IdeObject)
+
+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 ide_rename_provider_rename_async (IdeRenameProvider *self,
+ IdeSourceLocation *location,
+ const gchar *new_name,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data);
+gboolean ide_rename_provider_rename_finish (IdeRenameProvider *self,
+ GAsyncResult *result,
+ GPtrArray **edits,
+ GError **error);
+
+G_END_DECLS
+
+#endif /* IDE_RENAME_PROVIDER_H */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]