[gnome-builder: 122/139] spellcheck: port plugin to libide-editor and libide-gui



commit 109168ff3d5aa16fa2e1801be5582b3084a7c87e
Author: Christian Hergert <chergert redhat com>
Date:   Wed Jan 9 17:38:13 2019 -0800

    spellcheck: port plugin to libide-editor and libide-gui

 src/plugins/spellcheck/gbp-spell-buffer-addin.c    |   8 +-
 src/plugins/spellcheck/gbp-spell-buffer-addin.h    |   2 +-
 src/plugins/spellcheck/gbp-spell-dict.c            |   4 +-
 src/plugins/spellcheck/gbp-spell-editor-addin.c    |  42 +++----
 src/plugins/spellcheck/gbp-spell-editor-addin.h    |   2 +-
 ...-view-addin.c => gbp-spell-editor-page-addin.c} | 130 ++++++++++-----------
 ...-view-addin.h => gbp-spell-editor-page-addin.h} |  20 ++--
 .../spellcheck/gbp-spell-language-popover.c        |   8 +-
 src/plugins/spellcheck/gbp-spell-navigator.c       |   4 +-
 src/plugins/spellcheck/gbp-spell-private.h         |  14 +--
 src/plugins/spellcheck/gbp-spell-widget-actions.c  |  14 +--
 src/plugins/spellcheck/gbp-spell-widget.c          | 106 ++++++++---------
 src/plugins/spellcheck/gbp-spell-widget.h          |   8 +-
 src/plugins/spellcheck/meson.build                 |  37 +++---
 src/plugins/spellcheck/spellcheck-plugin.c         |  22 ++--
 src/plugins/spellcheck/spellcheck.gresource.xml    |  10 +-
 src/plugins/spellcheck/spellcheck.plugin           |  13 ++-
 17 files changed, 219 insertions(+), 225 deletions(-)
---
diff --git a/src/plugins/spellcheck/gbp-spell-buffer-addin.c b/src/plugins/spellcheck/gbp-spell-buffer-addin.c
index 2ea126315..c5a8bb6e7 100644
--- a/src/plugins/spellcheck/gbp-spell-buffer-addin.c
+++ b/src/plugins/spellcheck/gbp-spell-buffer-addin.c
@@ -251,7 +251,7 @@ gbp_spell_buffer_addin_init (GbpSpellBufferAddin *self)
  *
  * Returns: (transfer none): a #GspellChecker
  *
- * Since: 3.32
+ * Since: 3.26
  */
 GspellChecker *
 gbp_spell_buffer_addin_get_checker (GbpSpellBufferAddin *self)
@@ -273,7 +273,7 @@ gbp_spell_buffer_addin_get_checker (GbpSpellBufferAddin *self)
  * to complete the process. If no more views are active, spellchecking
  * may be disabled on the buffer.
  *
- * Since: 3.32
+ * Since: 3.26
  */
 void
 gbp_spell_buffer_addin_begin_checking (GbpSpellBufferAddin *self)
@@ -301,8 +301,6 @@ gbp_spell_buffer_addin_begin_checking (GbpSpellBufferAddin *self)
  *
  * Completes a spellcheck operation. The buffer will return to it's original
  * state. Thay may mean inline checking is disabled.
- *
- * Since: 3.32
  */
 void
 gbp_spell_buffer_addin_end_checking (GbpSpellBufferAddin *self)
@@ -331,8 +329,6 @@ gbp_spell_buffer_addin_end_checking (GbpSpellBufferAddin *self)
  * Gets the tag to use for the current misspelled word.
  *
  * Returns: (nullable) (transfer none): a #GtkTextTag or %NULL.
- *
- * Since: 3.32
  */
 GtkTextTag *
 gbp_spell_buffer_addin_get_misspelled_tag (GbpSpellBufferAddin *self)
diff --git a/src/plugins/spellcheck/gbp-spell-buffer-addin.h b/src/plugins/spellcheck/gbp-spell-buffer-addin.h
index 8d08f0d69..37a3fbad7 100644
--- a/src/plugins/spellcheck/gbp-spell-buffer-addin.h
+++ b/src/plugins/spellcheck/gbp-spell-buffer-addin.h
@@ -20,7 +20,7 @@
 
 #pragma once
 
-#include <ide.h>
+#include <libide-editor.h>
 #include <gspell/gspell.h>
 
 G_BEGIN_DECLS
diff --git a/src/plugins/spellcheck/gbp-spell-dict.c b/src/plugins/spellcheck/gbp-spell-dict.c
index 459ab5081..c56497a86 100644
--- a/src/plugins/spellcheck/gbp-spell-dict.c
+++ b/src/plugins/spellcheck/gbp-spell-dict.c
@@ -24,7 +24,7 @@
 #include <enchant.h>
 #include <gspell/gspell.h>
 
-#include <ide.h>
+#include <libide-editor.h>
 
 typedef enum {
   INIT_NONE,
@@ -544,8 +544,6 @@ gbp_spell_dict_class_init (GbpSpellDictClass *klass)
    *
    * This signal is emitted when the dictionary is fully initialised.
    * (for now, personal dictionary loaded)
-   *
-   * Since: 3.32
    */
   signals [LOADED] =
     g_signal_new_class_handler ("loaded",
diff --git a/src/plugins/spellcheck/gbp-spell-editor-addin.c b/src/plugins/spellcheck/gbp-spell-editor-addin.c
index dcc536256..8e0ef541b 100644
--- a/src/plugins/spellcheck/gbp-spell-editor-addin.c
+++ b/src/plugins/spellcheck/gbp-spell-editor-addin.c
@@ -29,7 +29,7 @@ struct _GbpSpellEditorAddin
 {
   GObject               parent_instance;
 
-  IdeEditorPerspective *editor;
+  IdeEditorSurface *editor;
 
   DzlDockWidget        *dock;
   GbpSpellWidget       *widget;
@@ -37,17 +37,17 @@ struct _GbpSpellEditorAddin
 
 static void
 gbp_spell_editor_addin_load (IdeEditorAddin       *addin,
-                             IdeEditorPerspective *editor)
+                             IdeEditorSurface *editor)
 {
   GbpSpellEditorAddin *self = (GbpSpellEditorAddin *)addin;
-  IdeLayoutTransientSidebar *sidebar;
+  IdeTransientSidebar *sidebar;
 
   g_assert (GBP_IS_SPELL_EDITOR_ADDIN (self));
-  g_assert (IDE_IS_EDITOR_PERSPECTIVE (editor));
+  g_assert (IDE_IS_EDITOR_SURFACE (editor));
 
   self->editor = editor;
 
-  sidebar = ide_editor_perspective_get_transient_sidebar (editor);
+  sidebar = ide_editor_surface_get_transient_sidebar (editor);
 
   self->dock = g_object_new (DZL_TYPE_DOCK_WIDGET,
                              "title", _("Spelling"),
@@ -72,12 +72,12 @@ gbp_spell_editor_addin_load (IdeEditorAddin       *addin,
 
 static void
 gbp_spell_editor_addin_unload (IdeEditorAddin       *addin,
-                               IdeEditorPerspective *editor)
+                               IdeEditorSurface *editor)
 {
   GbpSpellEditorAddin *self = (GbpSpellEditorAddin *)addin;
 
   g_assert (GBP_IS_SPELL_EDITOR_ADDIN (self));
-  g_assert (IDE_IS_EDITOR_PERSPECTIVE (editor));
+  g_assert (IDE_IS_EDITOR_SURFACE (editor));
 
   if (self->dock != NULL)
     gtk_widget_destroy (GTK_WIDGET (self->dock));
@@ -89,14 +89,14 @@ gbp_spell_editor_addin_unload (IdeEditorAddin       *addin,
 }
 
 static void
-gbp_spell_editor_addin_view_set (IdeEditorAddin *addin,
-                                 IdeLayoutView  *view)
+gbp_spell_editor_addin_page_set (IdeEditorAddin *addin,
+                                 IdePage  *view)
 {
   GbpSpellEditorAddin *self = (GbpSpellEditorAddin *)addin;
-  IdeEditorView *current;
+  IdeEditorPage *current;
 
   g_assert (GBP_IS_SPELL_EDITOR_ADDIN (self));
-  g_assert (!view || IDE_IS_LAYOUT_VIEW (view));
+  g_assert (!view || IDE_IS_PAGE (view));
 
   /* If there is currently a view attached, and this is
    * a new view, then we want to unset it so that the
@@ -107,7 +107,7 @@ gbp_spell_editor_addin_view_set (IdeEditorAddin *addin,
 
   if (current != NULL)
     {
-      if (view == IDE_LAYOUT_VIEW (current))
+      if (view == IDE_PAGE (current))
         return;
 
       gbp_spell_widget_set_editor (self->widget, NULL);
@@ -125,7 +125,7 @@ editor_addin_iface_init (IdeEditorAddinInterface *iface)
 {
   iface->load = gbp_spell_editor_addin_load;
   iface->unload = gbp_spell_editor_addin_unload;
-  iface->view_set = gbp_spell_editor_addin_view_set;
+  iface->page_set = gbp_spell_editor_addin_page_set;
 }
 
 G_DEFINE_TYPE_WITH_CODE (GbpSpellEditorAddin, gbp_spell_editor_addin, G_TYPE_OBJECT,
@@ -143,18 +143,18 @@ gbp_spell_editor_addin_init (GbpSpellEditorAddin *self)
 
 void
 _gbp_spell_editor_addin_begin (GbpSpellEditorAddin *self,
-                               IdeEditorView       *view)
+                               IdeEditorPage       *view)
 {
-  IdeLayoutTransientSidebar *sidebar;
+  IdeTransientSidebar *sidebar;
 
   g_return_if_fail (GBP_IS_SPELL_EDITOR_ADDIN (self));
-  g_return_if_fail (IDE_IS_EDITOR_VIEW (view));
+  g_return_if_fail (IDE_IS_EDITOR_PAGE (view));
 
   gbp_spell_widget_set_editor (self->widget, view);
 
-  sidebar = ide_editor_perspective_get_transient_sidebar (self->editor);
-  ide_layout_transient_sidebar_set_view (sidebar, IDE_LAYOUT_VIEW (view));
-  ide_layout_transient_sidebar_set_panel (sidebar, GTK_WIDGET (self->dock));
+  sidebar = ide_editor_surface_get_transient_sidebar (self->editor);
+  ide_transient_sidebar_set_page (sidebar, IDE_PAGE (view));
+  ide_transient_sidebar_set_panel (sidebar, GTK_WIDGET (self->dock));
 
   /* TODO: This needs API via transient sidebar panel */
   g_object_set (self->editor, "right-visible", TRUE, NULL);
@@ -162,10 +162,10 @@ _gbp_spell_editor_addin_begin (GbpSpellEditorAddin *self,
 
 void
 _gbp_spell_editor_addin_cancel (GbpSpellEditorAddin *self,
-                                IdeEditorView       *view)
+                                IdeEditorPage       *view)
 {
   g_return_if_fail (GBP_IS_SPELL_EDITOR_ADDIN (self));
-  g_return_if_fail (IDE_IS_EDITOR_VIEW (view));
+  g_return_if_fail (IDE_IS_EDITOR_PAGE (view));
 
   gbp_spell_widget_set_editor (self->widget, NULL);
 
diff --git a/src/plugins/spellcheck/gbp-spell-editor-addin.h b/src/plugins/spellcheck/gbp-spell-editor-addin.h
index 4a28a2470..7d260ce9e 100644
--- a/src/plugins/spellcheck/gbp-spell-editor-addin.h
+++ b/src/plugins/spellcheck/gbp-spell-editor-addin.h
@@ -20,7 +20,7 @@
 
 #pragma once
 
-#include <ide.h>
+#include <libide-editor.h>
 
 G_BEGIN_DECLS
 
diff --git a/src/plugins/spellcheck/gbp-spell-editor-view-addin.c 
b/src/plugins/spellcheck/gbp-spell-editor-page-addin.c
similarity index 74%
rename from src/plugins/spellcheck/gbp-spell-editor-view-addin.c
rename to src/plugins/spellcheck/gbp-spell-editor-page-addin.c
index d49c5bd5e..d28eaaed8 100644
--- a/src/plugins/spellcheck/gbp-spell-editor-view-addin.c
+++ b/src/plugins/spellcheck/gbp-spell-editor-page-addin.c
@@ -1,4 +1,4 @@
-/* gbp-spell-editor-view-addin.c
+/* gbp-spell-editor-page-addin.c
  *
  * Copyright 2016 Sebastien Lafargue <slafargue gnome org>
  * Copyright 2017-2019 Christian Hergert <chergert redhat com>
@@ -19,7 +19,7 @@
  * SPDX-License-Identifier: GPL-3.0-or-later
  */
 
-#define G_LOG_DOMAIN "gbp-spell-editor-view-addin"
+#define G_LOG_DOMAIN "gbp-spell-editor-page-addin"
 
 #include "config.h"
 
@@ -30,7 +30,7 @@
 
 #include "gbp-spell-buffer-addin.h"
 #include "gbp-spell-editor-addin.h"
-#include "gbp-spell-editor-view-addin.h"
+#include "gbp-spell-editor-page-addin.h"
 #include "gbp-spell-navigator.h"
 #include "gbp-spell-private.h"
 #include "gbp-spell-utils.h"
@@ -39,12 +39,12 @@
 
 #define I_(s) g_intern_static_string(s)
 
-struct _GbpSpellEditorViewAddin
+struct _GbpSpellEditorPageAddin
 {
   GObject          parent_instance;
 
   /* Borrowed references */
-  IdeEditorView   *view;
+  IdeEditorPage   *view;
   GtkTextMark     *word_begin;
   GtkTextMark     *word_end;
   GtkTextMark     *start_boundary;
@@ -58,46 +58,46 @@ struct _GbpSpellEditorViewAddin
 };
 
 static void
-gbp_spell_editor_view_addin_begin (GSimpleAction *action,
+gbp_spell_editor_page_addin_begin (GSimpleAction *action,
                                    GVariant      *variant,
                                    gpointer       user_data)
 {
-  GbpSpellEditorViewAddin *self = user_data;
+  GbpSpellEditorPageAddin *self = user_data;
   IdeEditorAddin *addin;
   GtkWidget *editor;
 
   g_assert (G_IS_SIMPLE_ACTION (action));
-  g_assert (GBP_IS_SPELL_EDITOR_VIEW_ADDIN (self));
+  g_assert (GBP_IS_SPELL_EDITOR_PAGE_ADDIN (self));
 
-  editor = gtk_widget_get_ancestor (GTK_WIDGET (self->view), IDE_TYPE_EDITOR_PERSPECTIVE);
-  addin = ide_editor_addin_find_by_module_name (IDE_EDITOR_PERSPECTIVE (editor), "spellcheck-plugin");
+  editor = gtk_widget_get_ancestor (GTK_WIDGET (self->view), IDE_TYPE_EDITOR_SURFACE);
+  addin = ide_editor_addin_find_by_module_name (IDE_EDITOR_SURFACE (editor), "spellcheck");
   _gbp_spell_editor_addin_begin (GBP_SPELL_EDITOR_ADDIN (addin), self->view);
 }
 
 static void
-gbp_spell_editor_view_addin_cancel (GSimpleAction *action,
+gbp_spell_editor_page_addin_cancel (GSimpleAction *action,
                                     GVariant      *variant,
                                     gpointer       user_data)
 {
-  GbpSpellEditorViewAddin *self = user_data;
+  GbpSpellEditorPageAddin *self = user_data;
   IdeEditorAddin *addin;
   GtkWidget *editor;
 
   g_assert (G_IS_SIMPLE_ACTION (action));
-  g_assert (GBP_IS_SPELL_EDITOR_VIEW_ADDIN (self));
+  g_assert (GBP_IS_SPELL_EDITOR_PAGE_ADDIN (self));
 
-  editor = gtk_widget_get_ancestor (GTK_WIDGET (self->view), IDE_TYPE_EDITOR_PERSPECTIVE);
-  addin = ide_editor_addin_find_by_module_name (IDE_EDITOR_PERSPECTIVE (editor), "spellcheck-plugin");
+  editor = gtk_widget_get_ancestor (GTK_WIDGET (self->view), IDE_TYPE_EDITOR_SURFACE);
+  addin = ide_editor_addin_find_by_module_name (IDE_EDITOR_SURFACE (editor), "spellcheck");
   _gbp_spell_editor_addin_cancel (GBP_SPELL_EDITOR_ADDIN (addin), self->view);
 }
 
 static const GActionEntry actions[] = {
-  { "spellcheck", gbp_spell_editor_view_addin_begin },
-  { "cancel-spellcheck", gbp_spell_editor_view_addin_cancel },
+  { "spellcheck", gbp_spell_editor_page_addin_begin },
+  { "cancel-spellcheck", gbp_spell_editor_page_addin_cancel },
 };
 
   static const DzlShortcutEntry spellchecker_shortcut_entry[] = {
-    { "org.gnome.builder.editor-view.spellchecker",
+    { "org.gnome.builder.editor-page.spellchecker",
       0, NULL,
       NC_("shortcut window", "Editor shortcuts"),
       NC_("shortcut window", "Editing"),
@@ -105,10 +105,10 @@ static const GActionEntry actions[] = {
   };
 
 static void
-gbp_spell_editor_view_addin_load (IdeEditorViewAddin *addin,
-                                  IdeEditorView      *view)
+gbp_spell_editor_page_addin_load (IdeEditorPageAddin *addin,
+                                  IdeEditorPage      *view)
 {
-  GbpSpellEditorViewAddin *self = (GbpSpellEditorViewAddin *)addin;
+  GbpSpellEditorPageAddin *self = (GbpSpellEditorPageAddin *)addin;
   g_autoptr(GSimpleActionGroup) group = NULL;
   g_autoptr(GPropertyAction) enabled_action = NULL;
   DzlShortcutController *controller;
@@ -117,20 +117,20 @@ gbp_spell_editor_view_addin_load (IdeEditorViewAddin *addin,
   IdeSourceView *source_view;
   IdeBuffer *buffer;
 
-  g_assert (GBP_IS_SPELL_EDITOR_VIEW_ADDIN (self));
-  g_assert (IDE_IS_EDITOR_VIEW (view));
+  g_assert (GBP_IS_SPELL_EDITOR_PAGE_ADDIN (self));
+  g_assert (IDE_IS_EDITOR_PAGE (view));
 
   self->view = view;
 
-  source_view = ide_editor_view_get_view (view);
+  source_view = ide_editor_page_get_view (view);
   g_assert (source_view != NULL);
   g_assert (IDE_IS_SOURCE_VIEW (source_view));
 
-  buffer = ide_editor_view_get_buffer (view);
+  buffer = ide_editor_page_get_buffer (view);
   g_assert (buffer != NULL);
   g_assert (IDE_IS_BUFFER (buffer));
 
-  buffer_addin = ide_buffer_addin_find_by_module_name (buffer, "spellcheck-plugin");
+  buffer_addin = ide_buffer_addin_find_by_module_name (buffer, "spellcheck");
 
   if (!GBP_IS_SPELL_BUFFER_ADDIN (buffer_addin))
     {
@@ -163,7 +163,7 @@ gbp_spell_editor_view_addin_load (IdeEditorViewAddin *addin,
 
   controller = dzl_shortcut_controller_find (GTK_WIDGET (view));
   dzl_shortcut_controller_add_command_action (controller,
-                                              "org.gnome.builder.editor-view.spellchecker",
+                                              "org.gnome.builder.editor-page.spellchecker",
                                               I_("<shift>F7"),
                                               DZL_SHORTCUT_PHASE_CAPTURE,
                                               "spellcheck.spellcheck");
@@ -175,13 +175,13 @@ gbp_spell_editor_view_addin_load (IdeEditorViewAddin *addin,
 }
 
 static void
-gbp_spell_editor_view_addin_unload (IdeEditorViewAddin *addin,
-                                    IdeEditorView      *view)
+gbp_spell_editor_page_addin_unload (IdeEditorPageAddin *addin,
+                                    IdeEditorPage      *view)
 {
-  GbpSpellEditorViewAddin *self = (GbpSpellEditorViewAddin *)addin;
+  GbpSpellEditorPageAddin *self = (GbpSpellEditorPageAddin *)addin;
 
-  g_assert (GBP_IS_SPELL_EDITOR_VIEW_ADDIN (self));
-  g_assert (IDE_IS_EDITOR_VIEW (view));
+  g_assert (GBP_IS_SPELL_EDITOR_PAGE_ADDIN (self));
+  g_assert (IDE_IS_EDITOR_PAGE (view));
 
   gtk_widget_insert_action_group (GTK_WIDGET (view), "spellcheck", NULL);
 
@@ -197,45 +197,45 @@ gbp_spell_editor_view_addin_unload (IdeEditorViewAddin *addin,
 }
 
 static void
-editor_view_addin_iface_init (IdeEditorViewAddinInterface *iface)
+editor_page_addin_iface_init (IdeEditorPageAddinInterface *iface)
 {
-  iface->load = gbp_spell_editor_view_addin_load;
-  iface->unload = gbp_spell_editor_view_addin_unload;
+  iface->load = gbp_spell_editor_page_addin_load;
+  iface->unload = gbp_spell_editor_page_addin_unload;
 }
 
-G_DEFINE_TYPE_WITH_CODE (GbpSpellEditorViewAddin, gbp_spell_editor_view_addin, G_TYPE_OBJECT,
-                         G_IMPLEMENT_INTERFACE (IDE_TYPE_EDITOR_VIEW_ADDIN, editor_view_addin_iface_init))
+G_DEFINE_TYPE_WITH_CODE (GbpSpellEditorPageAddin, gbp_spell_editor_page_addin, G_TYPE_OBJECT,
+                         G_IMPLEMENT_INTERFACE (IDE_TYPE_EDITOR_PAGE_ADDIN, editor_page_addin_iface_init))
 
 static void
-gbp_spell_editor_view_addin_class_init (GbpSpellEditorViewAddinClass *klass)
+gbp_spell_editor_page_addin_class_init (GbpSpellEditorPageAddinClass *klass)
 {
 }
 
 static void
-gbp_spell_editor_view_addin_init (GbpSpellEditorViewAddin *self)
+gbp_spell_editor_page_addin_init (GbpSpellEditorPageAddin *self)
 {
 }
 
 /**
- * gbp_spell_editor_view_addin_begin_checking:
- * @self: a #GbpSpellEditorViewAddin
+ * gbp_spell_editor_page_addin_begin_checking:
+ * @self: a #GbpSpellEditorPageAddin
  *
  * This function should be called by the #GbpSpellWidget to enable
  * spellchecking on the textview and underlying buffer. Doing so allows the
  * inline-spellchecking and language-menu to be dynamically enabled even if
  * spellchecking is typically disabled in the buffer.
  *
- * The caller should call gbp_spell_editor_view_addin_end_checking() when they
+ * The caller should call gbp_spell_editor_page_addin_end_checking() when they
  * have completed the spellchecking process.
  *
- * Since: 3.32
+ * Since: 3.26
  */
 void
-gbp_spell_editor_view_addin_begin_checking (GbpSpellEditorViewAddin *self)
+gbp_spell_editor_page_addin_begin_checking (GbpSpellEditorPageAddin *self)
 {
   GObject *buffer_addin;
 
-  g_return_if_fail (GBP_IS_SPELL_EDITOR_VIEW_ADDIN (self));
+  g_return_if_fail (GBP_IS_SPELL_EDITOR_PAGE_ADDIN (self));
   g_return_if_fail (self->view != NULL);
   g_return_if_fail (self->checking_count >= 0);
 
@@ -258,7 +258,7 @@ gbp_spell_editor_view_addin_begin_checking (GbpSpellEditorViewAddin *self)
 
       gbp_spell_buffer_addin_begin_checking (GBP_SPELL_BUFFER_ADDIN (buffer_addin));
 
-      view = ide_editor_view_get_view (self->view);
+      view = ide_editor_page_get_view (self->view);
       buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (view));
 
       /* Use the selected range, otherwise whole buffer */
@@ -285,18 +285,18 @@ gbp_spell_editor_view_addin_begin_checking (GbpSpellEditorViewAddin *self)
 }
 
 /**
- * gbp_spell_editor_view_addin_end_checking:
- * @self: a #GbpSpellEditorViewAddin
+ * gbp_spell_editor_page_addin_end_checking:
+ * @self: a #GbpSpellEditorPageAddin
  *
  * Completes a spellcheck operation and potentially restores the buffer to
  * the visual state before spellchecking started.
  *
- * Since: 3.32
+ * Since: 3.26
  */
 void
-gbp_spell_editor_view_addin_end_checking (GbpSpellEditorViewAddin *self)
+gbp_spell_editor_page_addin_end_checking (GbpSpellEditorPageAddin *self)
 {
-  g_return_if_fail (GBP_IS_SPELL_EDITOR_VIEW_ADDIN (self));
+  g_return_if_fail (GBP_IS_SPELL_EDITOR_PAGE_ADDIN (self));
   g_return_if_fail (self->checking_count >= 0);
 
   self->checking_count--;
@@ -312,7 +312,7 @@ gbp_spell_editor_view_addin_end_checking (GbpSpellEditorViewAddin *self)
 
       if (self->view != NULL)
         {
-          IdeBuffer *buffer = ide_editor_view_get_buffer (self->view);
+          IdeBuffer *buffer = ide_editor_page_get_buffer (self->view);
 
           /*
            * We could be in disposal here, so its possible the buffer has
@@ -338,22 +338,22 @@ gbp_spell_editor_view_addin_end_checking (GbpSpellEditorViewAddin *self)
 }
 
 /**
- * gbp_spell_editor_view_addin_get_checker:
- * @self: a #GbpSpellEditorViewAddin
+ * gbp_spell_editor_page_addin_get_checker:
+ * @self: a #GbpSpellEditorPageAddin
  *
  * This function may return %NULL before
- * gbp_spell_editor_view_addin_begin_checking() has been called.
+ * gbp_spell_editor_page_addin_begin_checking() has been called.
  *
  * Returns: (nullable) (transfer none): a #GspellChecker or %NULL
  *
- * Since: 3.32
+ * Since: 3.26
  */
 GspellChecker *
-gbp_spell_editor_view_addin_get_checker (GbpSpellEditorViewAddin *self)
+gbp_spell_editor_page_addin_get_checker (GbpSpellEditorPageAddin *self)
 {
   GObject *buffer_addin;
 
-  g_return_val_if_fail (GBP_IS_SPELL_EDITOR_VIEW_ADDIN (self), NULL);
+  g_return_val_if_fail (GBP_IS_SPELL_EDITOR_PAGE_ADDIN (self), NULL);
 
   buffer_addin = dzl_binding_group_get_source (self->buffer_addin_bindings);
   if (GBP_IS_SPELL_BUFFER_ADDIN (buffer_addin))
@@ -363,26 +363,26 @@ gbp_spell_editor_view_addin_get_checker (GbpSpellEditorViewAddin *self)
 }
 
 /**
- * gbp_spell_editor_view_addin_get_navigator:
- * @self: a #GbpSpellEditorViewAddin
+ * gbp_spell_editor_page_addin_get_navigator:
+ * @self: a #GbpSpellEditorPageAddin
  *
  * This function may return %NULL before
- * gbp_spell_editor_view_addin_begin_checking() has been called.
+ * gbp_spell_editor_page_addin_begin_checking() has been called.
  *
  * Returns: (nullable) (transfer none): a #GspellNavigator or %NULL
  *
- * Since: 3.32
+ * Since: 3.26
  */
 GspellNavigator *
-gbp_spell_editor_view_addin_get_navigator (GbpSpellEditorViewAddin *self)
+gbp_spell_editor_page_addin_get_navigator (GbpSpellEditorPageAddin *self)
 {
-  g_return_val_if_fail (GBP_IS_SPELL_EDITOR_VIEW_ADDIN (self), NULL);
+  g_return_val_if_fail (GBP_IS_SPELL_EDITOR_PAGE_ADDIN (self), NULL);
 
   if (self->navigator == NULL)
     {
       if (self->view != NULL)
         {
-          IdeSourceView *view = ide_editor_view_get_view (self->view);
+          IdeSourceView *view = ide_editor_page_get_view (self->view);
 
           self->navigator = gbp_spell_navigator_new (GTK_TEXT_VIEW (view));
           if (self->navigator)
diff --git a/src/plugins/spellcheck/gbp-spell-editor-view-addin.h 
b/src/plugins/spellcheck/gbp-spell-editor-page-addin.h
similarity index 53%
rename from src/plugins/spellcheck/gbp-spell-editor-view-addin.h
rename to src/plugins/spellcheck/gbp-spell-editor-page-addin.h
index c4150e642..0ead81e51 100644
--- a/src/plugins/spellcheck/gbp-spell-editor-view-addin.h
+++ b/src/plugins/spellcheck/gbp-spell-editor-page-addin.h
@@ -1,4 +1,4 @@
-/* gbp-spell-editor-view-addin.h
+/* gbp-spell-editor-page-addin.h
  *
  * Copyright 2017-2019 Christian Hergert <chergert redhat com>
  *
@@ -21,20 +21,20 @@
 #pragma once
 
 #include <gspell/gspell.h>
-#include <ide.h>
+#include <libide-editor.h>
 
 G_BEGIN_DECLS
 
-#define GBP_TYPE_SPELL_EDITOR_VIEW_ADDIN (gbp_spell_editor_view_addin_get_type())
+#define GBP_TYPE_SPELL_EDITOR_PAGE_ADDIN (gbp_spell_editor_page_addin_get_type())
 
-G_DECLARE_FINAL_TYPE (GbpSpellEditorViewAddin, gbp_spell_editor_view_addin, GBP, SPELL_EDITOR_VIEW_ADDIN, 
GObject)
+G_DECLARE_FINAL_TYPE (GbpSpellEditorPageAddin, gbp_spell_editor_page_addin, GBP, SPELL_EDITOR_PAGE_ADDIN, 
GObject)
 
-void             gbp_spell_editor_view_addin_begin_checking     (GbpSpellEditorViewAddin *self);
-void             gbp_spell_editor_view_addin_end_checking       (GbpSpellEditorViewAddin *self);
-GspellChecker   *gbp_spell_editor_view_addin_get_checker        (GbpSpellEditorViewAddin *self);
-GspellNavigator *gbp_spell_editor_view_addin_get_navigator      (GbpSpellEditorViewAddin *self);
-guint            gbp_spell_editor_view_addin_get_count          (GbpSpellEditorViewAddin *self,
+void             gbp_spell_editor_page_addin_begin_checking     (GbpSpellEditorPageAddin *self);
+void             gbp_spell_editor_page_addin_end_checking       (GbpSpellEditorPageAddin *self);
+GspellChecker   *gbp_spell_editor_page_addin_get_checker        (GbpSpellEditorPageAddin *self);
+GspellNavigator *gbp_spell_editor_page_addin_get_navigator      (GbpSpellEditorPageAddin *self);
+guint            gbp_spell_editor_page_addin_get_count          (GbpSpellEditorPageAddin *self,
                                                                  const gchar             *word);
-gboolean         gbp_spell_editor_view_addin_move_to_word_start (GbpSpellEditorViewAddin *self);
+gboolean         gbp_spell_editor_page_addin_move_to_word_start (GbpSpellEditorPageAddin *self);
 
 G_END_DECLS
diff --git a/src/plugins/spellcheck/gbp-spell-language-popover.c 
b/src/plugins/spellcheck/gbp-spell-language-popover.c
index b09a7122b..32a83bf69 100644
--- a/src/plugins/spellcheck/gbp-spell-language-popover.c
+++ b/src/plugins/spellcheck/gbp-spell-language-popover.c
@@ -21,12 +21,14 @@
  * SPDX-License-Identifier: GPL-3.0-or-later
  */
 
-#include "gbp-spell-language-popover.h"
+#define G_LOG_DOMAIN "gbp-spell-language-popover"
+
+#include "config.h"
 
 #include <glib/gi18n.h>
+#include <libide-gui.h>
 
-#include "util/ide-gtk.h"
-#include "workbench/ide-workbench.h"
+#include "gbp-spell-language-popover.h"
 
 struct _GbpSpellLanguagePopover
 {
diff --git a/src/plugins/spellcheck/gbp-spell-navigator.c b/src/plugins/spellcheck/gbp-spell-navigator.c
index aecea2ad4..bf9bb80f9 100644
--- a/src/plugins/spellcheck/gbp-spell-navigator.c
+++ b/src/plugins/spellcheck/gbp-spell-navigator.c
@@ -22,7 +22,7 @@
  */
 
 #include <glib/gi18n.h>
-#include <ide.h>
+#include <libide-editor.h>
 
 #include "gbp-spell-buffer-addin.h"
 #include "gbp-spell-navigator.h"
@@ -86,7 +86,7 @@ get_misspelled_tag (GbpSpellNavigator *self)
   g_assert (self->buffer != NULL);
   g_assert (IDE_IS_BUFFER (self->buffer));
 
-  buffer_addin = ide_buffer_addin_find_by_module_name (IDE_BUFFER (self->buffer), "spellcheck-plugin");
+  buffer_addin = ide_buffer_addin_find_by_module_name (IDE_BUFFER (self->buffer), "spellcheck");
   if (buffer_addin != NULL)
     return gbp_spell_buffer_addin_get_misspelled_tag (GBP_SPELL_BUFFER_ADDIN (buffer_addin));
 
diff --git a/src/plugins/spellcheck/gbp-spell-private.h b/src/plugins/spellcheck/gbp-spell-private.h
index c714071e9..15d844af5 100644
--- a/src/plugins/spellcheck/gbp-spell-private.h
+++ b/src/plugins/spellcheck/gbp-spell-private.h
@@ -22,12 +22,12 @@
 #pragma once
 
 #include <gspell/gspell.h>
-#include <ide.h>
+#include <libide-editor.h>
 
 #include "gbp-spell-dict.h"
 #include "gbp-spell-widget.h"
 #include "gbp-spell-editor-addin.h"
-#include "gbp-spell-editor-view-addin.h"
+#include "gbp-spell-editor-page-addin.h"
 
 G_BEGIN_DECLS
 
@@ -43,9 +43,9 @@ struct _GbpSpellWidget
   GtkBin                   parent_instance;
 
   /* Owned references */
-  IdeEditorView           *editor;
-  GbpSpellEditorViewAddin *editor_view_addin;
-  DzlSignalGroup          *editor_view_addin_signals;
+  IdeEditorPage           *editor;
+  GbpSpellEditorPageAddin *editor_page_addin;
+  DzlSignalGroup          *editor_page_addin_signals;
   GPtrArray               *words_array;
   GbpSpellDict            *dict;
 
@@ -93,8 +93,8 @@ void       _gbp_spell_widget_change         (GbpSpellWidget *self,
                                              gboolean        change_all);
 
 void       _gbp_spell_editor_addin_begin    (GbpSpellEditorAddin *self,
-                                             IdeEditorView       *view);
+                                             IdeEditorPage       *view);
 void       _gbp_spell_editor_addin_cancel   (GbpSpellEditorAddin *self,
-                                             IdeEditorView       *view);
+                                             IdeEditorPage       *view);
 
 G_END_DECLS
diff --git a/src/plugins/spellcheck/gbp-spell-widget-actions.c 
b/src/plugins/spellcheck/gbp-spell-widget-actions.c
index a3341f808..16594cb48 100644
--- a/src/plugins/spellcheck/gbp-spell-widget-actions.c
+++ b/src/plugins/spellcheck/gbp-spell-widget-actions.c
@@ -74,12 +74,12 @@ gbp_spell_widget_actions_ignore_all (GSimpleAction *action,
   g_assert (G_IS_SIMPLE_ACTION (action));
   g_assert (GBP_IS_SPELL_WIDGET (self));
 
-  if (self->editor_view_addin != NULL)
+  if (self->editor_page_addin != NULL)
     {
       GspellChecker *checker;
       const gchar *word;
 
-      checker = gbp_spell_editor_view_addin_get_checker (self->editor_view_addin);
+      checker = gbp_spell_editor_page_addin_get_checker (self->editor_page_addin);
       word = gtk_label_get_text (self->word_label);
 
       if (!dzl_str_empty0 (word))
@@ -136,19 +136,19 @@ _gbp_spell_widget_update_actions (GbpSpellWidget *self)
 
   g_return_if_fail (GBP_IS_SPELL_WIDGET (self));
 
-  if (IDE_IS_EDITOR_VIEW (self->editor) &&
-      GBP_IS_SPELL_EDITOR_VIEW_ADDIN (self->editor_view_addin) &&
+  if (IDE_IS_EDITOR_PAGE (self->editor) &&
+      GBP_IS_SPELL_EDITOR_PAGE_ADDIN (self->editor_page_addin) &&
       self->spellchecking_status == TRUE)
     {
-      g_assert (IDE_IS_EDITOR_VIEW_ADDIN (self->editor_view_addin));
+      g_assert (IDE_IS_EDITOR_PAGE_ADDIN (self->editor_page_addin));
 
       can_change = TRUE;
       can_change_all = TRUE;
       can_move_next_word = TRUE;
 
-      if (self->editor_view_addin != NULL)
+      if (self->editor_page_addin != NULL)
         {
-          if (NULL != (navigator = gbp_spell_editor_view_addin_get_navigator (self->editor_view_addin)))
+          if (NULL != (navigator = gbp_spell_editor_page_addin_get_navigator (self->editor_page_addin)))
             word_counted = gbp_spell_navigator_get_is_words_counted (GBP_SPELL_NAVIGATOR (navigator));
         }
 
diff --git a/src/plugins/spellcheck/gbp-spell-widget.c b/src/plugins/spellcheck/gbp-spell-widget.c
index ead96a99d..117bec728 100644
--- a/src/plugins/spellcheck/gbp-spell-widget.c
+++ b/src/plugins/spellcheck/gbp-spell-widget.c
@@ -21,7 +21,7 @@
 #define G_LOG_DOMAIN "gbp-spell-widget"
 
 #include <dazzle.h>
-#include <ide.h>
+#include <libide-editor.h>
 #include <glib/gi18n.h>
 #include <gspell/gspell.h>
 
@@ -110,9 +110,9 @@ fill_suggestions_box (GbpSpellWidget  *self,
       return;
     }
 
-  if (self->editor_view_addin != NULL)
+  if (self->editor_page_addin != NULL)
     {
-      checker = gbp_spell_editor_view_addin_get_checker (self->editor_view_addin);
+      checker = gbp_spell_editor_page_addin_get_checker (self->editor_page_addin);
       suggestions = gspell_checker_get_suggestions (checker, word, -1);
     }
 
@@ -147,10 +147,10 @@ update_count_label (GbpSpellWidget *self)
 
   g_assert (GBP_IS_SPELL_WIDGET (self));
 
-  if (self->editor_view_addin == NULL)
+  if (self->editor_page_addin == NULL)
     return;
 
-  navigator = gbp_spell_editor_view_addin_get_navigator (self->editor_view_addin);
+  navigator = gbp_spell_editor_page_addin_get_navigator (self->editor_page_addin);
   word = gtk_label_get_text (self->word_label);
   count = gbp_spell_navigator_get_count (GBP_SPELL_NAVIGATOR (navigator), word);
 
@@ -186,10 +186,10 @@ _gbp_spell_widget_move_next_word (GbpSpellWidget *self)
 
   g_assert (GBP_IS_SPELL_WIDGET (self));
 
-  if (self->editor_view_addin == NULL)
+  if (self->editor_page_addin == NULL)
     return FALSE;
 
-  navigator = gbp_spell_editor_view_addin_get_navigator (self->editor_view_addin);
+  navigator = gbp_spell_editor_page_addin_get_navigator (self->editor_page_addin);
 
   if ((ret = gspell_navigator_goto_next (navigator, &word, NULL, &error)))
     {
@@ -230,9 +230,9 @@ check_word_timeout_cb (GbpSpellWidget *self)
   gboolean ret = TRUE;
 
   g_assert (GBP_IS_SPELL_WIDGET (self));
-  g_assert (self->editor_view_addin != NULL);
+  g_assert (self->editor_page_addin != NULL);
 
-  checker = gbp_spell_editor_view_addin_get_checker (self->editor_view_addin);
+  checker = gbp_spell_editor_page_addin_get_checker (self->editor_page_addin);
 
   self->check_word_state = CHECK_WORD_CHECKING;
 
@@ -310,7 +310,7 @@ gbp_spell_widget__word_entry_changed_cb (GbpSpellWidget *self,
 
   dzl_clear_source (&self->check_word_timeout_id);
 
-  if (self->editor_view_addin != NULL)
+  if (self->editor_page_addin != NULL)
     {
       self->check_word_timeout_id = g_timeout_add_full (G_PRIORITY_LOW,
                                                         CHECK_WORD_INTERVAL_MIN,
@@ -410,14 +410,14 @@ dict_check_word_timeout_cb (GbpSpellWidget *self)
 
   g_assert (GBP_IS_SPELL_WIDGET (self));
 
-  if (self->editor_view_addin == NULL)
+  if (self->editor_page_addin == NULL)
     {
       /* lost our chance */
       self->dict_check_word_timeout_id = 0;
       return G_SOURCE_REMOVE;
     }
 
-  checker = gbp_spell_editor_view_addin_get_checker (self->editor_view_addin);
+  checker = gbp_spell_editor_page_addin_get_checker (self->editor_page_addin);
 
   self->dict_check_word_state = CHECK_WORD_CHECKING;
 
@@ -611,7 +611,7 @@ check_dict_available (GbpSpellWidget *self)
 {
   g_assert (GBP_IS_SPELL_WIDGET (self));
 
-  return (self->editor_view_addin != NULL && self->language != NULL);
+  return (self->editor_page_addin != NULL && self->language != NULL);
 }
 
 static void
@@ -700,11 +700,11 @@ gbp_spell_widget__language_notify_cb (GbpSpellWidget *self,
   g_assert (GBP_IS_SPELL_WIDGET (self));
   g_assert (GTK_IS_BUTTON (language_chooser_button));
 
-  if (self->editor_view_addin == NULL)
+  if (self->editor_page_addin == NULL)
     return;
 
-  checker = gbp_spell_editor_view_addin_get_checker (self->editor_view_addin);
-  navigator = gbp_spell_editor_view_addin_get_navigator (self->editor_view_addin);
+  checker = gbp_spell_editor_page_addin_get_checker (self->editor_page_addin);
+  navigator = gbp_spell_editor_page_addin_get_navigator (self->editor_page_addin);
 
   current_language = gspell_checker_get_language (checker);
   spell_language = gspell_language_chooser_get_language (GSPELL_LANGUAGE_CHOOSER (language_chooser_button));
@@ -773,10 +773,10 @@ gbp_spell_widget__populate_popup_cb (GbpSpellWidget *self,
   g_assert (GTK_IS_WIDGET (popup));
   g_assert (GTK_IS_ENTRY (entry));
 
-  if (self->editor_view_addin == NULL)
+  if (self->editor_page_addin == NULL)
     return;
 
-  checker = gbp_spell_editor_view_addin_get_checker (self->editor_view_addin);
+  checker = gbp_spell_editor_page_addin_get_checker (self->editor_page_addin);
   text = gtk_entry_get_text (entry);
 
   if (!self->is_word_entry_valid && !dzl_str_empty0 (text))
@@ -922,21 +922,21 @@ gbp_spell_widget_constructed (GObject *object)
 
 static void
 gbp_spell_widget_bind_addin (GbpSpellWidget          *self,
-                             GbpSpellEditorViewAddin *editor_view_addin,
-                             DzlSignalGroup          *editor_view_addin_signals)
+                             GbpSpellEditorPageAddin *editor_page_addin,
+                             DzlSignalGroup          *editor_page_addin_signals)
 {
   GspellChecker *checker;
 
   g_assert (GBP_IS_SPELL_WIDGET (self));
-  g_assert (GBP_IS_SPELL_EDITOR_VIEW_ADDIN (editor_view_addin));
-  g_assert (DZL_IS_SIGNAL_GROUP (editor_view_addin_signals));
-  g_assert (self->editor_view_addin == NULL);
+  g_assert (GBP_IS_SPELL_EDITOR_PAGE_ADDIN (editor_page_addin));
+  g_assert (DZL_IS_SIGNAL_GROUP (editor_page_addin_signals));
+  g_assert (self->editor_page_addin == NULL);
 
-  self->editor_view_addin = g_object_ref (editor_view_addin);
+  self->editor_page_addin = g_object_ref (editor_page_addin);
 
-  gbp_spell_editor_view_addin_begin_checking (editor_view_addin);
+  gbp_spell_editor_page_addin_begin_checking (editor_page_addin);
 
-  checker = gbp_spell_editor_view_addin_get_checker (editor_view_addin);
+  checker = gbp_spell_editor_page_addin_get_checker (editor_page_addin);
   gbp_spell_dict_set_checker (self->dict, checker);
 
   self->language = gspell_checker_get_language (checker);
@@ -949,19 +949,19 @@ gbp_spell_widget_bind_addin (GbpSpellWidget          *self,
 
 static void
 gbp_spell_widget_unbind_addin (GbpSpellWidget *self,
-                               DzlSignalGroup *editor_view_addin_signals)
+                               DzlSignalGroup *editor_page_addin_signals)
 {
   g_assert (GBP_IS_SPELL_WIDGET (self));
-  g_assert (DZL_IS_SIGNAL_GROUP (editor_view_addin_signals));
+  g_assert (DZL_IS_SIGNAL_GROUP (editor_page_addin_signals));
 
-  if (self->editor_view_addin != NULL)
+  if (self->editor_page_addin != NULL)
     {
-      gbp_spell_editor_view_addin_end_checking (self->editor_view_addin);
+      gbp_spell_editor_page_addin_end_checking (self->editor_page_addin);
       gbp_spell_dict_set_checker (self->dict, NULL);
       self->language = NULL;
       gspell_language_chooser_set_language (GSPELL_LANGUAGE_CHOOSER (self->language_chooser_button), NULL);
 
-      g_clear_object (&self->editor_view_addin);
+      g_clear_object (&self->editor_page_addin);
 
       _gbp_spell_widget_update_actions (self);
     }
@@ -984,8 +984,8 @@ gbp_spell_widget_destroy (GtkWidget *widget)
 
   /* Ensure reference holding things are released */
   g_clear_object (&self->editor);
-  g_clear_object (&self->editor_view_addin);
-  g_clear_object (&self->editor_view_addin_signals);
+  g_clear_object (&self->editor_page_addin);
+  g_clear_object (&self->editor_page_addin_signals);
   g_clear_object (&self->dict);
   g_clear_pointer (&self->words_array, g_ptr_array_unref);
 
@@ -1044,12 +1044,12 @@ gbp_spell_widget_class_init (GbpSpellWidgetClass *klass)
 
   properties [PROP_EDITOR] =
     g_param_spec_object ("editor", NULL, NULL,
-                         IDE_TYPE_EDITOR_VIEW,
+                         IDE_TYPE_EDITOR_PAGE,
                          (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
 
   g_object_class_install_properties (object_class, N_PROPS, properties);
 
-  gtk_widget_class_set_template_from_resource (widget_class, 
"/org/gnome/builder/plugins/spellcheck-plugin/gbp-spell-widget.ui");
+  gtk_widget_class_set_template_from_resource (widget_class, "/plugins/spellcheck/gbp-spell-widget.ui");
 
   gtk_widget_class_bind_template_child (widget_class, GbpSpellWidget, word_label);
   gtk_widget_class_bind_template_child (widget_class, GbpSpellWidget, count_label);
@@ -1077,14 +1077,14 @@ gbp_spell_widget_init (GbpSpellWidget *self)
                             G_CALLBACK (dict_row_key_pressed_event_cb),
                             self);
 
-  self->editor_view_addin_signals = dzl_signal_group_new (GBP_TYPE_SPELL_EDITOR_VIEW_ADDIN);
+  self->editor_page_addin_signals = dzl_signal_group_new (GBP_TYPE_SPELL_EDITOR_PAGE_ADDIN);
 
-  g_signal_connect_swapped (self->editor_view_addin_signals,
+  g_signal_connect_swapped (self->editor_page_addin_signals,
                             "bind",
                             G_CALLBACK (gbp_spell_widget_bind_addin),
                             self);
 
-  g_signal_connect_swapped (self->editor_view_addin_signals,
+  g_signal_connect_swapped (self->editor_page_addin_signals,
                             "unbind",
                             G_CALLBACK (gbp_spell_widget_unbind_addin),
                             self);
@@ -1096,11 +1096,11 @@ gbp_spell_widget_init (GbpSpellWidget *self)
  *
  * Gets the editor that is currently being spellchecked.
  *
- * Returns: (nullable) (transfer none): An #IdeEditorView or %NULL
+ * Returns: (nullable) (transfer none): An #IdeEditorPage or %NULL
  *
- * Since: 3.32
+ * Since: 3.26
  */
-IdeEditorView *
+IdeEditorPage *
 gbp_spell_widget_get_editor (GbpSpellWidget *self)
 {
   g_return_val_if_fail (GBP_IS_SPELL_WIDGET (self), NULL);
@@ -1110,21 +1110,21 @@ gbp_spell_widget_get_editor (GbpSpellWidget *self)
 
 void
 gbp_spell_widget_set_editor (GbpSpellWidget *self,
-                             IdeEditorView  *editor)
+                             IdeEditorPage  *editor)
 {
   GspellNavigator *navigator;
 
   g_return_if_fail (GBP_IS_SPELL_WIDGET (self));
-  g_return_if_fail (!editor || IDE_IS_EDITOR_VIEW (editor));
+  g_return_if_fail (!editor || IDE_IS_EDITOR_PAGE (editor));
 
   if (g_set_object (&self->editor, editor))
     {
-      IdeEditorViewAddin *addin = NULL;
+      IdeEditorPageAddin *addin = NULL;
 
       if (editor != NULL)
         {
-          addin = ide_editor_view_addin_find_by_module_name (editor, "spellcheck-plugin");
-          navigator = gbp_spell_editor_view_addin_get_navigator (GBP_SPELL_EDITOR_VIEW_ADDIN (addin));
+          addin = ide_editor_page_addin_find_by_module_name (editor, "spellcheck");
+          navigator = gbp_spell_editor_page_addin_get_navigator (GBP_SPELL_EDITOR_PAGE_ADDIN (addin));
           g_signal_connect_object (navigator,
                                    "notify::words-counted",
                                    G_CALLBACK (gbp_spell_widget__words_counted_cb),
@@ -1132,16 +1132,16 @@ gbp_spell_widget_set_editor (GbpSpellWidget *self,
                                    G_CONNECT_SWAPPED);
         }
 
-      dzl_signal_group_set_target (self->editor_view_addin_signals, addin);
+      dzl_signal_group_set_target (self->editor_page_addin_signals, addin);
 
       g_object_notify_by_pspec (G_OBJECT (self), properties [PROP_EDITOR]);
     }
 }
 
 GtkWidget *
-gbp_spell_widget_new (IdeEditorView *editor)
+gbp_spell_widget_new (IdeEditorPage *editor)
 {
-  g_return_val_if_fail (!editor || IDE_IS_EDITOR_VIEW (editor), NULL);
+  g_return_val_if_fail (!editor || IDE_IS_EDITOR_PAGE (editor), NULL);
 
   return g_object_new (GBP_TYPE_SPELL_WIDGET,
                        "editor", editor,
@@ -1158,10 +1158,10 @@ _gbp_spell_widget_change (GbpSpellWidget *self,
   const gchar *word;
 
   g_assert (GBP_IS_SPELL_WIDGET (self));
-  g_assert (IDE_IS_EDITOR_VIEW (self->editor));
-  g_assert (GBP_IS_SPELL_EDITOR_VIEW_ADDIN (self->editor_view_addin));
+  g_assert (IDE_IS_EDITOR_PAGE (self->editor));
+  g_assert (GBP_IS_SPELL_EDITOR_PAGE_ADDIN (self->editor_page_addin));
 
-  checker = gbp_spell_editor_view_addin_get_checker (self->editor_view_addin);
+  checker = gbp_spell_editor_page_addin_get_checker (self->editor_page_addin);
   g_assert (GSPELL_IS_CHECKER (checker));
 
   word = gtk_label_get_text (self->word_label);
@@ -1170,7 +1170,7 @@ _gbp_spell_widget_change (GbpSpellWidget *self,
   change_to = g_strdup (gtk_entry_get_text (self->word_entry));
   g_assert (!dzl_str_empty0 (change_to));
 
-  navigator = gbp_spell_editor_view_addin_get_navigator (self->editor_view_addin);
+  navigator = gbp_spell_editor_page_addin_get_navigator (self->editor_page_addin);
   g_assert (navigator != NULL);
 
   gspell_checker_set_correction (checker, word, -1, change_to, -1);
diff --git a/src/plugins/spellcheck/gbp-spell-widget.h b/src/plugins/spellcheck/gbp-spell-widget.h
index f77f48fe0..74372159c 100644
--- a/src/plugins/spellcheck/gbp-spell-widget.h
+++ b/src/plugins/spellcheck/gbp-spell-widget.h
@@ -20,7 +20,7 @@
 
 #pragma once
 
-#include <ide.h>
+#include <libide-editor.h>
 
 G_BEGIN_DECLS
 
@@ -28,9 +28,9 @@ G_BEGIN_DECLS
 
 G_DECLARE_FINAL_TYPE (GbpSpellWidget, gbp_spell_widget, GBP, SPELL_WIDGET, GtkBin)
 
-GtkWidget     *gbp_spell_widget_new        (IdeEditorView  *editor);
-IdeEditorView *gbp_spell_widget_get_editor (GbpSpellWidget *self);
+GtkWidget     *gbp_spell_widget_new        (IdeEditorPage  *editor);
+IdeEditorPage *gbp_spell_widget_get_editor (GbpSpellWidget *self);
 void           gbp_spell_widget_set_editor (GbpSpellWidget *self,
-                                            IdeEditorView  *editor);
+                                            IdeEditorPage  *editor);
 
 G_END_DECLS
diff --git a/src/plugins/spellcheck/meson.build b/src/plugins/spellcheck/meson.build
index 4cf50e130..659d12621 100644
--- a/src/plugins/spellcheck/meson.build
+++ b/src/plugins/spellcheck/meson.build
@@ -1,38 +1,29 @@
-if get_option('with_spellcheck')
+if get_option('plugin_spellcheck')
 
-spellcheck_resources = gnome.compile_resources(
-  'gbp-spell-resources',
-  'spellcheck.gresource.xml',
-  c_name: 'gbp_spell',
-)
-
-spellcheck_sources = [
-  'spellcheck-plugin.c',
+plugins_sources += files([
   'gbp-spell-buffer-addin.c',
-  'gbp-spell-buffer-addin.h',
   'gbp-spell-dict.c',
-  'gbp-spell-dict.h',
   'gbp-spell-editor-addin.c',
-  'gbp-spell-editor-addin.h',
-  'gbp-spell-editor-view-addin.c',
-  'gbp-spell-editor-view-addin.h',
+  'gbp-spell-editor-page-addin.c',
   'gbp-spell-language-popover.c',
-  'gbp-spell-language-popover.h',
   'gbp-spell-navigator.c',
-  'gbp-spell-navigator.h',
   'gbp-spell-utils.c',
-  'gbp-spell-utils.h',
-  'gbp-spell-widget.c',
-  'gbp-spell-widget.h',
   'gbp-spell-widget-actions.c',
-]
+  'gbp-spell-widget.c',
+  'spellcheck-plugin.c',
+])
+
+plugin_spellcheck_resources = gnome.compile_resources(
+  'spellcheck-resources',
+  'spellcheck.gresource.xml',
+  c_name: 'gbp_spellcheck',
+)
 
-gnome_builder_plugins_deps += [
+plugins_deps += [
   dependency('gspell-1', version: '>= 1.2.0'),
   dependency('enchant-2'),
 ]
 
-gnome_builder_plugins_sources += files(spellcheck_sources)
-gnome_builder_plugins_sources += spellcheck_resources[0]
+plugins_sources += plugin_spellcheck_resources[0]
 
 endif
diff --git a/src/plugins/spellcheck/spellcheck-plugin.c b/src/plugins/spellcheck/spellcheck-plugin.c
index 77441c1ff..95247f9bc 100644
--- a/src/plugins/spellcheck/spellcheck-plugin.c
+++ b/src/plugins/spellcheck/spellcheck-plugin.c
@@ -18,17 +18,25 @@
  * SPDX-License-Identifier: GPL-3.0-or-later
  */
 
+#include "config.h"
+
 #include <libpeas/peas.h>
-#include <ide.h>
+#include <libide-editor.h>
 
 #include "gbp-spell-buffer-addin.h"
 #include "gbp-spell-editor-addin.h"
-#include "gbp-spell-editor-view-addin.h"
+#include "gbp-spell-editor-page-addin.h"
 
-void
-gbp_spellcheck_register_types (PeasObjectModule *module)
+_IDE_EXTERN void
+_gbp_spellcheck_register_types (PeasObjectModule *module)
 {
-  peas_object_module_register_extension_type (module, IDE_TYPE_BUFFER_ADDIN, GBP_TYPE_SPELL_BUFFER_ADDIN);
-  peas_object_module_register_extension_type (module, IDE_TYPE_EDITOR_ADDIN, GBP_TYPE_SPELL_EDITOR_ADDIN);
-  peas_object_module_register_extension_type (module, IDE_TYPE_EDITOR_VIEW_ADDIN, 
GBP_TYPE_SPELL_EDITOR_VIEW_ADDIN);
+  peas_object_module_register_extension_type (module,
+                                              IDE_TYPE_BUFFER_ADDIN,
+                                              GBP_TYPE_SPELL_BUFFER_ADDIN);
+  peas_object_module_register_extension_type (module,
+                                              IDE_TYPE_EDITOR_ADDIN,
+                                              GBP_TYPE_SPELL_EDITOR_ADDIN);
+  peas_object_module_register_extension_type (module,
+                                              IDE_TYPE_EDITOR_PAGE_ADDIN,
+                                              GBP_TYPE_SPELL_EDITOR_PAGE_ADDIN);
 }
diff --git a/src/plugins/spellcheck/spellcheck.gresource.xml b/src/plugins/spellcheck/spellcheck.gresource.xml
index 7ca7d4ba2..26aa92b65 100644
--- a/src/plugins/spellcheck/spellcheck.gresource.xml
+++ b/src/plugins/spellcheck/spellcheck.gresource.xml
@@ -1,11 +1,9 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <gresources>
-  <gresource prefix="/org/gnome/builder/plugins">
+  <gresource prefix="/plugins/spellcheck">
     <file>spellcheck.plugin</file>
-  </gresource>
-  <gresource prefix="/org/gnome/builder/plugins/spellcheck-plugin">
-    <file compressed="true" preprocess="xml-stripblanks">gtk/menus.ui</file>
-    <file compressed="true" preprocess="xml-stripblanks">gbp-spell-widget.ui</file>
-    <file compressed="true">themes/shared.css</file>
+    <file preprocess="xml-stripblanks">gtk/menus.ui</file>
+    <file preprocess="xml-stripblanks">gbp-spell-widget.ui</file>
+    <file>themes/shared.css</file>
   </gresource>
 </gresources>
diff --git a/src/plugins/spellcheck/spellcheck.plugin b/src/plugins/spellcheck/spellcheck.plugin
index 6ab54b75a..54a0d7a31 100644
--- a/src/plugins/spellcheck/spellcheck.plugin
+++ b/src/plugins/spellcheck/spellcheck.plugin
@@ -1,9 +1,10 @@
 [Plugin]
-Module=spellcheck-plugin
-Name=Spellcheck
-Description=Provides spellchecking for documents
 Authors=Sébastien Lafargue <slafargue gnome org>
-Copyright=Copyright © 2016 Sébastien Lafargue
-Depends=editor
 Builtin=true
-Embedded=gbp_spellcheck_register_types
+Copyright=Copyright © 2016 Sébastien Lafargue
+Depends=editor;
+Description=Provides spellchecking for documents
+Embedded=_gbp_spellcheck_register_types
+Hidden=true
+Module=spellcheck
+Name=Spellcheck



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