[gnome-builder] tree: use DzlTree instead of IdeTree



commit 84ac06335b678181c2a89939febc503b40ea9f35
Author: Christian Hergert <chergert redhat com>
Date:   Tue Jun 6 14:15:18 2017 -0700

    tree: use DzlTree instead of IdeTree
    
    This code has moved into libdazzle and is no longer required inside of
    Builder directly. This commit ports everything to use the renamed symbols
    inside of libdazzle.

 libide/ide.h                                   |    4 -
 libide/meson.build                             |    8 -
 libide/tree/ide-tree-builder.c                 |  302 ----
 libide/tree/ide-tree-builder.h                 |   54 -
 libide/tree/ide-tree-node.c                    | 1166 ----------------
 libide/tree/ide-tree-node.h                    |   84 --
 libide/tree/ide-tree-private.h                 |   80 --
 libide/tree/ide-tree-types.h                   |   40 -
 libide/tree/ide-tree.c                         | 1732 ------------------------
 libide/tree/ide-tree.h                         |  102 --
 plugins/project-tree/gb-project-tree-actions.c |  148 +-
 plugins/project-tree/gb-project-tree-addin.c   |    2 +-
 plugins/project-tree/gb-project-tree-builder.c |   96 +-
 plugins/project-tree/gb-project-tree-builder.h |    4 +-
 plugins/project-tree/gb-project-tree-private.h |    2 +-
 plugins/project-tree/gb-project-tree.c         |   92 +-
 plugins/project-tree/gb-project-tree.h         |    2 +-
 plugins/symbol-tree/symbol-tree-builder.c      |   42 +-
 plugins/symbol-tree/symbol-tree-builder.h      |    2 +-
 plugins/symbol-tree/symbol-tree-panel.c        |   38 +-
 plugins/symbol-tree/symbol-tree-panel.ui       |    2 +-
 plugins/symbol-tree/symbol-tree.c              |    2 +-
 22 files changed, 216 insertions(+), 3788 deletions(-)
---
diff --git a/libide/ide.h b/libide/ide.h
index 6e776c7..8329de6 100644
--- a/libide/ide.h
+++ b/libide/ide.h
@@ -139,10 +139,6 @@ G_BEGIN_DECLS
 #include "transfers/ide-transfer.h"
 #include "transfers/ide-transfer-button.h"
 #include "transfers/ide-transfer-manager.h"
-#include "tree/ide-tree-builder.h"
-#include "tree/ide-tree-node.h"
-#include "tree/ide-tree-types.h"
-#include "tree/ide-tree.h"
 #include "util/ide-flatpak.h"
 #include "util/ide-gtk.h"
 #include "util/ide-line-reader.h"
diff --git a/libide/meson.build b/libide/meson.build
index f99fab1..e1050ad 100644
--- a/libide/meson.build
+++ b/libide/meson.build
@@ -168,10 +168,6 @@ libide_public_headers = [
   'transfers/ide-transfer-button.h',
   'transfers/ide-transfers-button.h',
   'transfers/ide-transfers-progress-icon.h',
-  'tree/ide-tree-builder.h',
-  'tree/ide-tree-node.h',
-  'tree/ide-tree-types.h',
-  'tree/ide-tree.h',
   'util/ide-flatpak.h',
   'util/ide-glib.h',
   'util/ide-gtk.h',
@@ -371,9 +367,6 @@ libide_public_sources = [
   'transfers/ide-transfer-button.c',
   'transfers/ide-transfers-button.c',
   'transfers/ide-transfers-progress-icon.c',
-  'tree/ide-tree-builder.c',
-  'tree/ide-tree-node.c',
-  'tree/ide-tree.c',
   'util/ide-flatpak.c',
   'util/ide-glib.c',
   'util/ide-gtk.c',
@@ -542,7 +535,6 @@ libide_sources = libide_generated_headers + libide_public_sources + [
   'theming/ide-css-provider.h',
   'theming/ide-theme-manager.c',
   'theming/ide-theme-manager.h',
-  'tree/ide-tree-private.h',
   'util/ide-async-helper.c',
   'util/ide-async-helper.h',
   'util/ide-battery-monitor.c',
diff --git a/plugins/project-tree/gb-project-tree-actions.c b/plugins/project-tree/gb-project-tree-actions.c
index c9773c9..6039e5e 100644
--- a/plugins/project-tree/gb-project-tree-actions.c
+++ b/plugins/project-tree/gb-project-tree-actions.c
@@ -68,22 +68,22 @@ gb_project_tree_actions_refresh (GSimpleAction *action,
                                  gpointer       user_data)
 {
   GbProjectTree *self = user_data;
-  IdeTreeNode *selected;
+  DzlTreeNode *selected;
   GObject *item = NULL;
   g_autoptr(GFile) expand_to = NULL;
   gboolean expanded = FALSE;
 
   g_assert (GB_IS_PROJECT_TREE (self));
 
-  if ((selected = ide_tree_get_selected (IDE_TREE (self))))
+  if ((selected = dzl_tree_get_selected (DZL_TREE (self))))
     {
-      expanded = ide_tree_node_get_expanded (selected);
-      item = ide_tree_node_get_item (selected);
+      expanded = dzl_tree_node_get_expanded (selected);
+      item = dzl_tree_node_get_item (selected);
       if (GB_IS_PROJECT_FILE (item))
         expand_to = g_object_ref (gb_project_file_get_file (GB_PROJECT_FILE (item)));
     }
 
-  ide_tree_rebuild (IDE_TREE (self));
+  dzl_tree_rebuild (DZL_TREE (self));
 
   if (expand_to != NULL)
     {
@@ -101,7 +101,7 @@ gb_project_tree_actions_refresh (GSimpleAction *action,
           if (project_file != NULL)
             {
               gb_project_tree_reveal (self, project_file, FALSE, FALSE);
-              ide_tree_unselect_all (IDE_TREE (self));
+              dzl_tree_unselect_all (DZL_TREE (self));
             }
         }
     }
@@ -126,7 +126,7 @@ gb_project_tree_actions_open (GSimpleAction *action,
 {
   GbProjectTree *self = user_data;
   IdeWorkbench *workbench;
-  IdeTreeNode *selected;
+  DzlTreeNode *selected;
   GObject *item;
 
   g_assert (GB_IS_PROJECT_TREE (self));
@@ -134,11 +134,11 @@ gb_project_tree_actions_open (GSimpleAction *action,
   workbench = ide_widget_get_workbench (GTK_WIDGET (self));
   g_assert (IDE_IS_WORKBENCH (workbench));
 
-  if (!(selected = ide_tree_get_selected (IDE_TREE (self))) ||
-      !(item = ide_tree_node_get_item (selected)))
+  if (!(selected = dzl_tree_get_selected (DZL_TREE (self))) ||
+      !(item = dzl_tree_node_get_item (selected)))
     return;
 
-  item = ide_tree_node_get_item (selected);
+  item = dzl_tree_node_get_item (selected);
 
   if (GB_IS_PROJECT_FILE (item))
     {
@@ -168,7 +168,7 @@ gb_project_tree_actions_open_with (GSimpleAction *action,
   g_autoptr(GDesktopAppInfo) app_info = NULL;
   g_autoptr(GdkAppLaunchContext) launch_context = NULL;
   GbProjectTree *self = user_data;
-  IdeTreeNode *selected;
+  DzlTreeNode *selected;
   IdeWorkbench *workbench;
   GdkDisplay *display;
   GFileInfo *file_info;
@@ -181,8 +181,8 @@ gb_project_tree_actions_open_with (GSimpleAction *action,
   g_assert (g_variant_is_of_type (variant, G_VARIANT_TYPE_STRING));
 
   if (!(workbench = ide_widget_get_workbench (GTK_WIDGET (self))) ||
-      !(selected = ide_tree_get_selected (IDE_TREE (self))) ||
-      !(item = ide_tree_node_get_item (selected)) ||
+      !(selected = dzl_tree_get_selected (DZL_TREE (self))) ||
+      !(item = dzl_tree_node_get_item (selected)) ||
       !GB_IS_PROJECT_FILE (item) ||
       !(app_id = g_variant_get_string (variant, NULL)) ||
       !(file_info = gb_project_file_get_file_info (GB_PROJECT_FILE (item))) ||
@@ -207,13 +207,13 @@ gb_project_tree_actions_open_with_editor (GSimpleAction *action,
   GbProjectTree *self = user_data;
   GFileInfo *file_info;
   GFile *file;
-  IdeTreeNode *selected;
+  DzlTreeNode *selected;
   GObject *item;
 
   g_assert (GB_IS_PROJECT_TREE (self));
 
-  if (!(selected = ide_tree_get_selected (IDE_TREE (self))) ||
-      !(item = ide_tree_node_get_item (selected)) ||
+  if (!(selected = dzl_tree_get_selected (DZL_TREE (self))) ||
+      !(item = dzl_tree_node_get_item (selected)) ||
       !GB_IS_PROJECT_FILE (item) ||
       !(file_info = gb_project_file_get_file_info (GB_PROJECT_FILE (item))) ||
       (g_file_info_get_file_type (file_info) == G_FILE_TYPE_DIRECTORY) ||
@@ -230,14 +230,14 @@ gb_project_tree_actions_open_containing_folder (GSimpleAction *action,
                                                 gpointer       user_data)
 {
   GbProjectTree *self = user_data;
-  IdeTreeNode *selected;
+  DzlTreeNode *selected;
   GObject *item;
   GFile *file;
 
   g_assert (GB_IS_PROJECT_TREE (self));
 
-  if (!(selected = ide_tree_get_selected (IDE_TREE (self))) ||
-      !(item = ide_tree_node_get_item (selected)) ||
+  if (!(selected = dzl_tree_get_selected (DZL_TREE (self))) ||
+      !(item = dzl_tree_node_get_item (selected)) ||
       !GB_IS_PROJECT_FILE (item))
     return;
 
@@ -290,7 +290,7 @@ gb_project_tree_actions_open_in_terminal (GSimpleAction *action,
                                           gpointer       user_data)
 {
   GbProjectTree *self = user_data;
-  IdeTreeNode *selected;
+  DzlTreeNode *selected;
   GObject *item;
   GFile *file;
   g_autofree gchar *workdir = NULL;
@@ -301,8 +301,8 @@ gb_project_tree_actions_open_in_terminal (GSimpleAction *action,
 
   g_assert (GB_IS_PROJECT_TREE (self));
 
-  if (!(selected = ide_tree_get_selected (IDE_TREE (self))) ||
-      !(item = ide_tree_node_get_item (selected)) ||
+  if (!(selected = dzl_tree_get_selected (DZL_TREE (self))) ||
+      !(item = dzl_tree_node_get_item (selected)) ||
       !GB_IS_PROJECT_FILE (item))
     return;
 
@@ -362,11 +362,11 @@ gb_project_tree_actions__make_directory_cb (GObject      *object,
                                             gpointer      user_data)
 {
   GFile *file = (GFile *)object;
-  g_autoptr(IdeTreeNode) node = user_data;
+  g_autoptr(DzlTreeNode) node = user_data;
   g_autoptr(GError) error = NULL;
 
   g_assert (G_IS_FILE (file));
-  g_assert (IDE_IS_TREE_NODE (node));
+  g_assert (DZL_IS_TREE_NODE (node));
 
   if (!g_file_make_directory_finish (file, result, &error))
     {
@@ -374,9 +374,9 @@ gb_project_tree_actions__make_directory_cb (GObject      *object,
       return;
     }
 
-  ide_tree_node_invalidate (node);
-  ide_tree_node_expand (node, FALSE);
-  ide_tree_node_select (node);
+  dzl_tree_node_invalidate (node);
+  dzl_tree_node_expand (node, FALSE);
+  dzl_tree_node_select (node);
 }
 
 static void
@@ -385,13 +385,13 @@ gb_project_tree_actions__create_cb (GObject      *object,
                                     gpointer      user_data)
 {
   GFile *file = (GFile *)object;
-  g_autoptr(IdeTreeNode) node = user_data;
+  g_autoptr(DzlTreeNode) node = user_data;
   g_autoptr(GError) error = NULL;
   GbProjectTree *self;
   IdeWorkbench *workbench;
 
   g_assert (G_IS_FILE (file));
-  g_assert (IDE_IS_TREE_NODE (node));
+  g_assert (DZL_IS_TREE_NODE (node));
 
   if (!g_file_create_finish (file, result, &error))
     {
@@ -399,7 +399,7 @@ gb_project_tree_actions__create_cb (GObject      *object,
       return;
     }
 
-  self = GB_PROJECT_TREE (ide_tree_node_get_tree (node));
+  self = GB_PROJECT_TREE (dzl_tree_node_get_tree (node));
   if (self == NULL)
     return;
 
@@ -409,9 +409,9 @@ gb_project_tree_actions__create_cb (GObject      *object,
 
   ide_workbench_open_files_async (workbench, &file, 1, NULL, IDE_WORKBENCH_OPEN_FLAGS_NONE, NULL, NULL, 
NULL);
 
-  ide_tree_node_invalidate (node);
-  ide_tree_node_expand (node, FALSE);
-  ide_tree_node_select (node);
+  dzl_tree_node_invalidate (node);
+  dzl_tree_node_expand (node, FALSE);
+  dzl_tree_node_select (node);
 }
 
 static void
@@ -420,7 +420,7 @@ gb_project_tree_actions__popover_create_file_cb (GbProjectTree    *self,
                                                  GFileType         file_type,
                                                  GbNewFilePopover *popover)
 {
-  IdeTreeNode *selected;
+  DzlTreeNode *selected;
 
   g_assert (GB_IS_PROJECT_TREE (self));
   g_assert (G_IS_FILE (file));
@@ -428,10 +428,10 @@ gb_project_tree_actions__popover_create_file_cb (GbProjectTree    *self,
             (file_type == G_FILE_TYPE_REGULAR));
   g_assert (GB_IS_NEW_FILE_POPOVER (popover));
 
-  selected = ide_tree_get_selected (IDE_TREE (self));
+  selected = dzl_tree_get_selected (DZL_TREE (self));
 
   g_assert (selected != NULL);
-  g_assert (IDE_IS_TREE_NODE (selected));
+  g_assert (DZL_IS_TREE_NODE (selected));
 
   if (file_type == G_FILE_TYPE_DIRECTORY)
     {
@@ -465,22 +465,22 @@ static void
 gb_project_tree_actions__popover_closed_cb (GbProjectTree *self,
                                             GtkPopover    *popover)
 {
-  IdeTreeNode *selected;
+  DzlTreeNode *selected;
 
   g_assert (GB_IS_PROJECT_TREE (self));
   g_assert (GTK_IS_POPOVER (popover));
 
-  if (!(selected = ide_tree_get_selected (IDE_TREE (self))) || !self->expanded_in_new)
+  if (!(selected = dzl_tree_get_selected (DZL_TREE (self))) || !self->expanded_in_new)
     return;
 
-  ide_tree_node_collapse (selected);
+  dzl_tree_node_collapse (selected);
 }
 
 static void
 gb_project_tree_actions_new (GbProjectTree *self,
                              GFileType      file_type)
 {
-  IdeTreeNode *selected;
+  DzlTreeNode *selected;
   GObject *item;
   GtkPopover *popover;
   GbProjectFile *project_file;
@@ -496,26 +496,26 @@ gb_project_tree_actions_new (GbProjectTree *self,
    * this was the "empty file" in a directory. We want to instead jump to
    * the parent.
    */
-  if (NULL != (selected = ide_tree_get_selected (IDE_TREE (self))))
+  if (NULL != (selected = dzl_tree_get_selected (DZL_TREE (self))))
     {
-      if (NULL == ide_tree_node_get_item (selected))
+      if (NULL == dzl_tree_node_get_item (selected))
         {
-          IdeTreeNode *parent;
+          DzlTreeNode *parent;
 
-          if (NULL != (parent = ide_tree_node_get_parent (selected)))
+          if (NULL != (parent = dzl_tree_node_get_parent (selected)))
             {
-              if (NULL != (item = ide_tree_node_get_item (parent)))
+              if (NULL != (item = dzl_tree_node_get_item (parent)))
                 {
                   if (GB_IS_PROJECT_FILE (item))
-                    ide_tree_node_select (parent);
+                    dzl_tree_node_select (parent);
                 }
             }
         }
     }
 
 again:
-  if (!(selected = ide_tree_get_selected (IDE_TREE (self))) ||
-      !(item = ide_tree_node_get_item (selected)) ||
+  if (!(selected = dzl_tree_get_selected (DZL_TREE (self))) ||
+      !(item = dzl_tree_node_get_item (selected)) ||
       !GB_IS_PROJECT_FILE (item))
     return;
 
@@ -533,14 +533,14 @@ again:
    */
   if (!is_dir)
     {
-      selected = ide_tree_node_get_parent (selected);
+      selected = dzl_tree_node_get_parent (selected);
 
-      if (!ide_tree_node_is_root (selected))
+      if (!dzl_tree_node_is_root (selected))
         {
           GtkTreePath *path;
 
-          ide_tree_node_select (selected);
-          path = ide_tree_node_get_path (selected);
+          dzl_tree_node_select (selected);
+          path = dzl_tree_node_get_path (selected);
           gtk_tree_view_scroll_to_cell (GTK_TREE_VIEW (self), path, NULL, FALSE, 0, 0);
           gtk_tree_path_free (path);
 
@@ -548,8 +548,8 @@ again:
         }
     }
 
-  if ((self->expanded_in_new = !ide_tree_node_get_expanded (selected)))
-    ide_tree_node_expand (selected, FALSE);
+  if ((self->expanded_in_new = !dzl_tree_node_get_expanded (selected)))
+    dzl_tree_node_expand (selected, FALSE);
 
   popover = g_object_new (GB_TYPE_NEW_FILE_POPOVER,
                           "directory", file,
@@ -567,7 +567,7 @@ again:
                            self,
                            G_CONNECT_SWAPPED);
 
-  ide_tree_node_show_popover (selected, popover);
+  dzl_tree_node_show_popover (selected, popover);
 }
 
 static void
@@ -654,7 +654,7 @@ gb_project_tree_actions_rename_file (GSimpleAction *action,
                                      gpointer       user_data)
 {
   GbProjectTree *self = user_data;
-  IdeTreeNode *selected;
+  DzlTreeNode *selected;
   GtkPopover *popover;
   GObject *item;
   GFile *file;
@@ -663,8 +663,8 @@ gb_project_tree_actions_rename_file (GSimpleAction *action,
 
   g_assert (GB_IS_PROJECT_TREE (self));
 
-  if (!(selected = ide_tree_get_selected (IDE_TREE (self))) ||
-      !(item = ide_tree_node_get_item (selected)) ||
+  if (!(selected = dzl_tree_get_selected (DZL_TREE (self))) ||
+      !(item = dzl_tree_node_get_item (selected)) ||
       !GB_IS_PROJECT_FILE (item) ||
       !(file = gb_project_file_get_file (GB_PROJECT_FILE (item))) ||
       !(file_info = gb_project_file_get_file_info (GB_PROJECT_FILE (item))))
@@ -682,7 +682,7 @@ gb_project_tree_actions_rename_file (GSimpleAction *action,
                            G_CALLBACK (gb_project_tree_actions__rename_file_cb),
                            self,
                            G_CONNECT_SWAPPED);
-  ide_tree_node_show_popover (selected, popover);
+  dzl_tree_node_show_popover (selected, popover);
 }
 
 static void
@@ -691,11 +691,11 @@ gb_project_tree_actions__trash_file_cb (GObject      *object,
                                         gpointer      user_data)
 {
   IdeProject *project = (IdeProject *)object;
-  g_autoptr(IdeTreeNode) node = user_data;
+  g_autoptr(DzlTreeNode) node = user_data;
   g_autoptr(GError) error = NULL;
 
   g_assert (IDE_IS_PROJECT (project));
-  g_assert (IDE_IS_TREE_NODE (node));
+  g_assert (DZL_IS_TREE_NODE (node));
 
   if (!ide_project_trash_file_finish (project, result, &error))
     {
@@ -745,7 +745,7 @@ gb_project_tree_actions_move_to_trash (GSimpleAction *action,
   ViewsRemoval removal = { 0 };
   IdeBuffer *buffer;
   IdeProject *project;
-  IdeTreeNode *node;
+  DzlTreeNode *node;
   GFile *file;
   GObject *item;
   GList *iter;
@@ -758,8 +758,8 @@ gb_project_tree_actions_move_to_trash (GSimpleAction *action,
   project = ide_context_get_project (context);
   buffer_manager = ide_context_get_buffer_manager (context);
 
-  if (!(node = ide_tree_get_selected (IDE_TREE (self))) ||
-      !(item = ide_tree_node_get_item (node)) ||
+  if (!(node = dzl_tree_get_selected (DZL_TREE (self))) ||
+      !(item = dzl_tree_node_get_item (node)) ||
       !GB_IS_PROJECT_FILE (item) ||
       !(file = gb_project_file_get_file (GB_PROJECT_FILE (item))))
     return;
@@ -802,13 +802,13 @@ gb_project_tree_actions_move_to_trash (GSimpleAction *action,
 }
 
 static gboolean
-is_files_node (IdeTreeNode *node)
+is_files_node (DzlTreeNode *node)
 {
   if (node != NULL)
     {
-      GObject *item = ide_tree_node_get_item (node);
-      IdeTreeNode *parent = ide_tree_node_get_parent (node);
-      GObject *parent_item = ide_tree_node_get_item (parent);
+      GObject *item = dzl_tree_node_get_item (node);
+      DzlTreeNode *parent = dzl_tree_node_get_parent (node);
+      GObject *parent_item = dzl_tree_node_get_item (parent);
 
       return (GB_IS_PROJECT_FILE (item) && !GB_IS_PROJECT_FILE (parent_item));
     }
@@ -870,8 +870,8 @@ void
 gb_project_tree_actions_update (GbProjectTree *self)
 {
   GActionGroup *group;
-  IdeTreeNode *selection;
-  IdeTreeNode *parent;
+  DzlTreeNode *selection;
+  DzlTreeNode *parent;
   GObject *item = NULL;
   GObject *parent_item = NULL;
 
@@ -882,14 +882,14 @@ gb_project_tree_actions_update (GbProjectTree *self)
   group = gtk_widget_get_action_group (GTK_WIDGET (self), "project-tree");
   g_assert (G_IS_SIMPLE_ACTION_GROUP (group));
 
-  selection = ide_tree_get_selected (IDE_TREE (self));
+  selection = dzl_tree_get_selected (DZL_TREE (self));
   if (selection != NULL)
     {
-      item = ide_tree_node_get_item (selection);
+      item = dzl_tree_node_get_item (selection);
 
-      parent = ide_tree_node_get_parent (selection);
+      parent = dzl_tree_node_get_parent (selection);
       if (parent != NULL)
-        parent_item = ide_tree_node_get_item (parent);
+        parent_item = dzl_tree_node_get_item (parent);
     }
 
   action_set (group, "new-file",
diff --git a/plugins/project-tree/gb-project-tree-addin.c b/plugins/project-tree/gb-project-tree-addin.c
index c2b90aa..0230019 100644
--- a/plugins/project-tree/gb-project-tree-addin.c
+++ b/plugins/project-tree/gb-project-tree-addin.c
@@ -30,7 +30,7 @@ struct _GbProjectTreeAddin
 {
   GObject    parent_instance;
 
-  IdeTree   *tree;
+  DzlTree   *tree;
   GtkWidget *panel;
 };
 
diff --git a/plugins/project-tree/gb-project-tree-builder.c b/plugins/project-tree/gb-project-tree-builder.c
index 81ed22f..d760458 100644
--- a/plugins/project-tree/gb-project-tree-builder.c
+++ b/plugins/project-tree/gb-project-tree-builder.c
@@ -25,16 +25,16 @@
 
 struct _GbProjectTreeBuilder
 {
-  IdeTreeBuilder  parent_instance;
+  DzlTreeBuilder  parent_instance;
 
   GSettings      *file_chooser_settings;
 
   guint           sort_directories_first : 1;
 };
 
-G_DEFINE_TYPE (GbProjectTreeBuilder, gb_project_tree_builder, IDE_TYPE_TREE_BUILDER)
+G_DEFINE_TYPE (GbProjectTreeBuilder, gb_project_tree_builder, DZL_TYPE_TREE_BUILDER)
 
-IdeTreeBuilder *
+DzlTreeBuilder *
 gb_project_tree_builder_new (void)
 {
   return g_object_new (GB_TYPE_PROJECT_TREE_BUILDER, NULL);
@@ -42,21 +42,21 @@ gb_project_tree_builder_new (void)
 
 static void
 build_context (GbProjectTreeBuilder *self,
-               IdeTreeNode          *node)
+               DzlTreeNode          *node)
 {
   g_autoptr(GbProjectFile) item = NULL;
   g_autoptr(GFileInfo) file_info = NULL;
   g_autofree gchar *name = NULL;
-  IdeTreeNode *child;
+  DzlTreeNode *child;
   IdeContext *context;
   IdeProject *project;
   IdeVcs *vcs;
   GFile *workdir;
 
   g_return_if_fail (GB_IS_PROJECT_TREE_BUILDER (self));
-  g_return_if_fail (IDE_IS_TREE_NODE (node));
+  g_return_if_fail (DZL_IS_TREE_NODE (node));
 
-  context = IDE_CONTEXT (ide_tree_node_get_item (node));
+  context = IDE_CONTEXT (dzl_tree_node_get_item (node));
   vcs = ide_context_get_vcs (context);
   workdir = ide_vcs_get_working_directory (vcs);
   project = ide_context_get_project (context);
@@ -74,37 +74,37 @@ build_context (GbProjectTreeBuilder *self,
                        "file-info", file_info,
                        NULL);
 
-  child = g_object_new (IDE_TYPE_TREE_NODE,
+  child = g_object_new (DZL_TYPE_TREE_NODE,
                         "item", item,
                         "icon-name", "folder-symbolic",
                         NULL);
   g_object_bind_property (project, "name", child, "text", G_BINDING_SYNC_CREATE);
-  ide_tree_node_append (node, child);
+  dzl_tree_node_append (node, child);
 }
 
 static IdeVcs *
-get_vcs (IdeTreeNode *node)
+get_vcs (DzlTreeNode *node)
 {
-  IdeTree *tree;
-  IdeTreeNode *root;
+  DzlTree *tree;
+  DzlTreeNode *root;
   IdeContext *context;
 
-  g_assert (IDE_IS_TREE_NODE (node));
+  g_assert (DZL_IS_TREE_NODE (node));
 
-  tree = ide_tree_node_get_tree (node);
-  root = ide_tree_get_root (tree);
-  context = IDE_CONTEXT (ide_tree_node_get_item (root));
+  tree = dzl_tree_node_get_tree (node);
+  root = dzl_tree_get_root (tree);
+  context = IDE_CONTEXT (dzl_tree_node_get_item (root));
 
   return ide_context_get_vcs (context);
 }
 
 static gint
-compare_nodes_func (IdeTreeNode *a,
-                    IdeTreeNode *b,
+compare_nodes_func (DzlTreeNode *a,
+                    DzlTreeNode *b,
                     gpointer     user_data)
 {
-  GbProjectFile *file_a = GB_PROJECT_FILE (ide_tree_node_get_item (a));
-  GbProjectFile *file_b = GB_PROJECT_FILE (ide_tree_node_get_item (b));
+  GbProjectFile *file_a = GB_PROJECT_FILE (dzl_tree_node_get_item (a));
+  GbProjectFile *file_b = GB_PROJECT_FILE (dzl_tree_node_get_item (b));
   GbProjectTreeBuilder *self = user_data;
 
   if (self->sort_directories_first)
@@ -115,23 +115,23 @@ compare_nodes_func (IdeTreeNode *a,
 
 static void
 build_file (GbProjectTreeBuilder *self,
-            IdeTreeNode          *node)
+            DzlTreeNode          *node)
 {
   g_autoptr(GFileEnumerator) enumerator = NULL;
   GbProjectFile *project_file;
   gpointer file_info_ptr;
   IdeVcs *vcs;
   GFile *file;
-  IdeTree *tree;
+  DzlTree *tree;
   gint count = 0;
   gboolean show_ignored_files;
 
   g_return_if_fail (GB_IS_PROJECT_TREE_BUILDER (self));
-  g_return_if_fail (IDE_IS_TREE_NODE (node));
+  g_return_if_fail (DZL_IS_TREE_NODE (node));
 
-  project_file = GB_PROJECT_FILE (ide_tree_node_get_item (node));
+  project_file = GB_PROJECT_FILE (dzl_tree_node_get_item (node));
 
-  tree = ide_tree_builder_get_tree (IDE_TREE_BUILDER (self));
+  tree = dzl_tree_builder_get_tree (DZL_TREE_BUILDER (self));
   show_ignored_files = gb_project_tree_get_show_ignored_files (GB_PROJECT_TREE (tree));
 
   vcs = get_vcs (node);
@@ -161,7 +161,7 @@ build_file (GbProjectTreeBuilder *self,
       g_autoptr(GFileInfo) item_file_info = file_info_ptr;
       g_autoptr(GFile) item_file = NULL;
       g_autoptr(GbProjectFile) item = NULL;
-      IdeTreeNode *child;
+      DzlTreeNode *child;
       const gchar *name;
       const gchar *display_name;
       const gchar *icon_name;
@@ -179,17 +179,17 @@ build_file (GbProjectTreeBuilder *self,
       display_name = gb_project_file_get_display_name (item);
       icon_name = gb_project_file_get_icon_name (item);
 
-      child = g_object_new (IDE_TYPE_TREE_NODE,
+      child = g_object_new (DZL_TYPE_TREE_NODE,
                             "icon-name", icon_name,
                             "text", display_name,
                             "item", item,
                             "use-dim-label", ignored,
                             NULL);
 
-      ide_tree_node_insert_sorted (node, child, compare_nodes_func, self);
+      dzl_tree_node_insert_sorted (node, child, compare_nodes_func, self);
 
       if (g_file_info_get_file_type (item_file_info) == G_FILE_TYPE_DIRECTORY)
-        ide_tree_node_set_children_possible (child, TRUE);
+        dzl_tree_node_set_children_possible (child, TRUE);
 
       count++;
     }
@@ -200,27 +200,27 @@ build_file (GbProjectTreeBuilder *self,
    */
   if (count == 0)
     {
-      IdeTreeNode *child;
+      DzlTreeNode *child;
 
-      child = g_object_new (IDE_TYPE_TREE_NODE,
+      child = g_object_new (DZL_TYPE_TREE_NODE,
                             "icon-name", NULL,
                             "text", _("Empty"),
                             "use-dim-label", TRUE,
                             NULL);
-      ide_tree_node_append (node, child);
+      dzl_tree_node_append (node, child);
     }
 }
 
 static void
-gb_project_tree_builder_build_node (IdeTreeBuilder *builder,
-                                    IdeTreeNode    *node)
+gb_project_tree_builder_build_node (DzlTreeBuilder *builder,
+                                    DzlTreeNode    *node)
 {
   GbProjectTreeBuilder *self = (GbProjectTreeBuilder *)builder;
   GObject *item;
 
   g_return_if_fail (GB_IS_PROJECT_TREE_BUILDER (self));
 
-  item = ide_tree_node_get_item (node);
+  item = dzl_tree_node_get_item (node);
 
   if (IDE_IS_CONTEXT (item))
     build_context (self, node);
@@ -285,8 +285,8 @@ populate_mime_handlers (GMenu         *menu,
 }
 
 static void
-gb_project_tree_builder_node_popup (IdeTreeBuilder *builder,
-                                    IdeTreeNode    *node,
+gb_project_tree_builder_node_popup (DzlTreeBuilder *builder,
+                                    DzlTreeNode    *node,
                                     GMenu          *menu)
 {
   GObject *item;
@@ -295,10 +295,10 @@ gb_project_tree_builder_node_popup (IdeTreeBuilder *builder,
   GFile *file;
 
   g_assert (GB_IS_PROJECT_TREE_BUILDER (builder));
-  g_assert (IDE_IS_TREE_NODE (node));
+  g_assert (DZL_IS_TREE_NODE (node));
   g_assert (G_IS_MENU (menu));
 
-  item = ide_tree_node_get_item (node);
+  item = dzl_tree_node_get_item (node);
   vcs = get_vcs (node);
   workdir = ide_vcs_get_working_directory (vcs);
 
@@ -315,19 +315,19 @@ gb_project_tree_builder_node_popup (IdeTreeBuilder *builder,
 }
 
 static gboolean
-gb_project_tree_builder_node_activated (IdeTreeBuilder *builder,
-                                        IdeTreeNode    *node)
+gb_project_tree_builder_node_activated (DzlTreeBuilder *builder,
+                                        DzlTreeNode    *node)
 {
   GObject *item;
 
   g_assert (GB_IS_PROJECT_TREE_BUILDER (builder));
 
-  item = ide_tree_node_get_item (node);
+  item = dzl_tree_node_get_item (node);
 
   if (GB_IS_PROJECT_FILE (item))
     {
       GtkWidget *workbench;
-      IdeTree *tree;
+      DzlTree *tree;
       GFile *file;
 
       if (gb_project_file_get_is_directory (GB_PROJECT_FILE (item)))
@@ -337,7 +337,7 @@ gb_project_tree_builder_node_activated (IdeTreeBuilder *builder,
       if (!file)
         goto failure;
 
-      tree = ide_tree_node_get_tree (node);
+      tree = dzl_tree_node_get_tree (node);
       if (!tree)
         goto failure;
 
@@ -363,7 +363,7 @@ gb_project_tree_builder_rebuild (GSettings            *settings,
                                  const gchar          *key,
                                  GbProjectTreeBuilder *self)
 {
-  IdeTree *tree;
+  DzlTree *tree;
   gboolean sort_directories_first;
 
   g_assert (G_IS_SETTINGS (settings));
@@ -374,8 +374,8 @@ gb_project_tree_builder_rebuild (GSettings            *settings,
   if (sort_directories_first != self->sort_directories_first)
     {
       self->sort_directories_first = sort_directories_first;
-      if ((tree = ide_tree_builder_get_tree (IDE_TREE_BUILDER (self))))
-        ide_tree_rebuild (tree);
+      if ((tree = dzl_tree_builder_get_tree (DZL_TREE_BUILDER (self))))
+        dzl_tree_rebuild (tree);
     }
 }
 
@@ -393,7 +393,7 @@ static void
 gb_project_tree_builder_class_init (GbProjectTreeBuilderClass *klass)
 {
   GObjectClass *object_class = G_OBJECT_CLASS (klass);
-  IdeTreeBuilderClass *tree_builder_class = IDE_TREE_BUILDER_CLASS (klass);
+  DzlTreeBuilderClass *tree_builder_class = DZL_TREE_BUILDER_CLASS (klass);
 
   object_class->finalize = gb_project_tree_builder_finalize;
 
diff --git a/plugins/project-tree/gb-project-tree-builder.h b/plugins/project-tree/gb-project-tree-builder.h
index ad63441..df3965e 100644
--- a/plugins/project-tree/gb-project-tree-builder.h
+++ b/plugins/project-tree/gb-project-tree-builder.h
@@ -25,9 +25,9 @@ G_BEGIN_DECLS
 
 #define GB_TYPE_PROJECT_TREE_BUILDER (gb_project_tree_builder_get_type())
 
-G_DECLARE_FINAL_TYPE (GbProjectTreeBuilder, gb_project_tree_builder, GB, PROJECT_TREE_BUILDER, 
IdeTreeBuilder)
+G_DECLARE_FINAL_TYPE (GbProjectTreeBuilder, gb_project_tree_builder, GB, PROJECT_TREE_BUILDER, 
DzlTreeBuilder)
 
-IdeTreeBuilder *gb_project_tree_builder_new (void);
+DzlTreeBuilder *gb_project_tree_builder_new (void);
 
 G_END_DECLS
 
diff --git a/plugins/project-tree/gb-project-tree-private.h b/plugins/project-tree/gb-project-tree-private.h
index c78ac8c..cdcefba 100644
--- a/plugins/project-tree/gb-project-tree-private.h
+++ b/plugins/project-tree/gb-project-tree-private.h
@@ -25,7 +25,7 @@ G_BEGIN_DECLS
 
 struct _GbProjectTree
 {
-  IdeTree     parent_instance;
+  DzlTree     parent_instance;
 
   GSettings *settings;
 
diff --git a/plugins/project-tree/gb-project-tree.c b/plugins/project-tree/gb-project-tree.c
index 195106c..fae1acc 100644
--- a/plugins/project-tree/gb-project-tree.c
+++ b/plugins/project-tree/gb-project-tree.c
@@ -27,7 +27,7 @@
 #include "gb-project-tree-builder.h"
 #include "gb-project-tree-private.h"
 
-G_DEFINE_TYPE (GbProjectTree, gb_project_tree, IDE_TYPE_TREE)
+G_DEFINE_TYPE (GbProjectTree, gb_project_tree, DZL_TYPE_TREE)
 
 enum {
   PROP_0,
@@ -46,13 +46,13 @@ gb_project_tree_new (void)
 IdeContext *
 gb_project_tree_get_context (GbProjectTree *self)
 {
-  IdeTreeNode *root;
+  DzlTreeNode *root;
   GObject *item;
 
   g_return_val_if_fail (GB_IS_PROJECT_TREE (self), NULL);
 
-  if ((root = ide_tree_get_root (IDE_TREE (self))) &&
-      (item = ide_tree_node_get_item (root)) &&
+  if ((root = dzl_tree_get_root (DZL_TREE (self))) &&
+      (item = dzl_tree_node_get_item (root)) &&
       IDE_IS_CONTEXT (item))
     return IDE_CONTEXT (item);
 
@@ -72,7 +72,7 @@ gb_project_tree_project_file_renamed (GbProjectTree *self,
   g_assert (G_IS_FILE (dst_file));
   g_assert (IDE_IS_PROJECT (project));
 
-  ide_tree_rebuild (IDE_TREE (self));
+  dzl_tree_rebuild (DZL_TREE (self));
   gb_project_tree_reveal (self, dst_file, FALSE, FALSE);
 
   IDE_EXIT;
@@ -105,7 +105,7 @@ gb_project_tree_project_file_trashed (GbProjectTree *self,
                                       GFile         *file,
                                       IdeProject    *project)
 {
-  IdeTreeNode *node;
+  DzlTreeNode *node;
 
   IDE_ENTRY;
 
@@ -113,15 +113,15 @@ gb_project_tree_project_file_trashed (GbProjectTree *self,
   g_assert (G_IS_FILE (file));
   g_assert (IDE_IS_PROJECT (project));
 
-  node = ide_tree_find_custom (IDE_TREE (self), compare_to_file, file);
+  node = dzl_tree_find_custom (DZL_TREE (self), compare_to_file, file);
 
   if (node != NULL)
     {
-      IdeTreeNode *parent = ide_tree_node_get_parent (node);
+      DzlTreeNode *parent = dzl_tree_node_get_parent (node);
 
-      ide_tree_node_invalidate (parent);
-      ide_tree_node_expand (parent, TRUE);
-      ide_tree_node_select (parent);
+      dzl_tree_node_invalidate (parent);
+      dzl_tree_node_expand (parent, TRUE);
+      dzl_tree_node_select (parent);
     }
 
   IDE_EXIT;
@@ -148,7 +148,7 @@ gb_project_tree_buffer_saved_cb (GbProjectTree    *self,
 {
   IdeContext *context;
   IdeVcs *vcs;
-  IdeTreeNode *node;
+  DzlTreeNode *node;
   IdeFile *ifile;
   GFile *gfile;
   GFile *workdir;
@@ -165,8 +165,8 @@ gb_project_tree_buffer_saved_cb (GbProjectTree    *self,
   if (NULL != (workdir = ide_vcs_get_working_directory (vcs)) &&
       g_file_has_prefix (gfile, workdir))
     {
-      if (NULL == (node = ide_tree_find_custom (IDE_TREE (self), compare_to_file, gfile)))
-        ide_tree_rebuild (IDE_TREE (self));
+      if (NULL == (node = dzl_tree_find_custom (DZL_TREE (self), compare_to_file, gfile)))
+        dzl_tree_rebuild (DZL_TREE (self));
 
       gb_project_tree_reveal (self, gfile, FALSE, FALSE);
     }
@@ -178,7 +178,7 @@ gb_project_tree_set_context (GbProjectTree *self,
 {
   GtkTreeModel *model;
   GtkTreeIter iter;
-  IdeTreeNode *root;
+  DzlTreeNode *root;
   IdeProject *project;
   IdeBufferManager *buffer_manager;
   IdeVcs *vcs;
@@ -217,9 +217,9 @@ gb_project_tree_set_context (GbProjectTree *self,
 
   model = gtk_tree_view_get_model (GTK_TREE_VIEW (self));
 
-  root = ide_tree_node_new ();
-  ide_tree_node_set_item (root, G_OBJECT (context));
-  ide_tree_set_root (IDE_TREE (self), root);
+  root = dzl_tree_node_new ();
+  dzl_tree_node_set_item (root, G_OBJECT (context));
+  dzl_tree_set_root (DZL_TREE (self), root);
 
   /*
    * If we only have one toplevel item (underneath root), expand it.
@@ -227,11 +227,11 @@ gb_project_tree_set_context (GbProjectTree *self,
   if ((gtk_tree_model_iter_n_children (model, NULL) == 1) &&
       gtk_tree_model_get_iter_first (model, &iter))
     {
-      g_autoptr(IdeTreeNode) node = NULL;
+      g_autoptr(DzlTreeNode) node = NULL;
 
       gtk_tree_model_get (model, &iter, 0, &node, -1);
       if (node != NULL)
-        ide_tree_node_expand (node, FALSE);
+        dzl_tree_node_expand (node, FALSE);
     }
 }
 
@@ -315,7 +315,7 @@ static void
 gb_project_tree_init (GbProjectTree *self)
 {
   GtkStyleContext *style_context;
-  IdeTreeBuilder *builder;
+  DzlTreeBuilder *builder;
   GMenu *menu;
 
   style_context = gtk_widget_get_style_context (GTK_WIDGET (self));
@@ -331,7 +331,7 @@ gb_project_tree_init (GbProjectTree *self)
                    G_SETTINGS_BIND_DEFAULT);
 
   builder = gb_project_tree_builder_new ();
-  ide_tree_add_builder (IDE_TREE (self), builder);
+  dzl_tree_add_builder (DZL_TREE (self), builder);
 
   g_signal_connect (self,
                     "notify::selection",
@@ -341,7 +341,7 @@ gb_project_tree_init (GbProjectTree *self)
   gb_project_tree_actions_init (self);
 
   menu = dzl_application_get_menu_by_id (DZL_APPLICATION_DEFAULT, "gb-project-tree-popup-menu");
-  ide_tree_set_context_menu (IDE_TREE (self), G_MENU_MODEL (menu));
+  dzl_tree_set_context_menu (DZL_TREE (self), G_MENU_MODEL (menu));
 }
 
 gboolean
@@ -364,24 +364,24 @@ gb_project_tree_set_show_ignored_files (GbProjectTree *self,
     {
       self->show_ignored_files = show_ignored_files;
       g_object_notify_by_pspec (G_OBJECT (self), properties [PROP_SHOW_IGNORED_FILES]);
-      ide_tree_rebuild (IDE_TREE (self));
+      dzl_tree_rebuild (DZL_TREE (self));
     }
 }
 
 static gboolean
-find_child_node (IdeTree     *tree,
-                 IdeTreeNode *node,
-                 IdeTreeNode *child,
+find_child_node (DzlTree     *tree,
+                 DzlTreeNode *node,
+                 DzlTreeNode *child,
                  gpointer    user_data)
 {
   const gchar *name = user_data;
   GObject *item;
 
-  g_assert (IDE_IS_TREE (tree));
-  g_assert (IDE_IS_TREE_NODE (node));
-  g_assert (IDE_IS_TREE_NODE (child));
+  g_assert (DZL_IS_TREE (tree));
+  g_assert (DZL_IS_TREE_NODE (node));
+  g_assert (DZL_IS_TREE_NODE (child));
 
-  item = ide_tree_node_get_item (child);
+  item = dzl_tree_node_get_item (child);
 
   if (GB_IS_PROJECT_FILE (item))
     {
@@ -396,18 +396,18 @@ find_child_node (IdeTree     *tree,
 }
 
 static gboolean
-find_files_node (IdeTree     *tree,
-                 IdeTreeNode *node,
-                 IdeTreeNode *child,
+find_files_node (DzlTree     *tree,
+                 DzlTreeNode *node,
+                 DzlTreeNode *child,
                  gpointer    user_data)
 {
   GObject *item;
 
-  g_assert (IDE_IS_TREE (tree));
-  g_assert (IDE_IS_TREE_NODE (node));
-  g_assert (IDE_IS_TREE_NODE (child));
+  g_assert (DZL_IS_TREE (tree));
+  g_assert (DZL_IS_TREE_NODE (node));
+  g_assert (DZL_IS_TREE_NODE (child));
 
-  item = ide_tree_node_get_item (child);
+  item = dzl_tree_node_get_item (child);
 
   return GB_IS_PROJECT_FILE (item);
 }
@@ -431,8 +431,8 @@ gb_project_tree_reveal (GbProjectTree *self,
   g_autofree gchar *relpath = NULL;
   g_auto(GStrv) parts = NULL;
   IdeContext *context;
-  IdeTreeNode *node = NULL;
-  IdeTreeNode *last_node = NULL;
+  DzlTreeNode *node = NULL;
+  DzlTreeNode *last_node = NULL;
   IdeVcs *vcs;
   GFile *workdir;
   guint i;
@@ -447,7 +447,7 @@ gb_project_tree_reveal (GbProjectTree *self,
   if (context == NULL)
     return;
 
-  node = ide_tree_find_child_node (IDE_TREE (self), NULL, find_files_node, NULL);
+  node = dzl_tree_find_child_node (DZL_TREE (self), NULL, find_files_node, NULL);
   if (node == NULL)
     return;
 
@@ -466,7 +466,7 @@ gb_project_tree_reveal (GbProjectTree *self,
       last_node = node;
       for (i = 0; parts [i]; i++)
         {
-          node = ide_tree_find_child_node (IDE_TREE (self), node, find_child_node, parts [i]);
+          node = dzl_tree_find_child_node (DZL_TREE (self), node, find_child_node, parts [i]);
           if (node == NULL)
             {
               node = last_node;
@@ -482,12 +482,12 @@ gb_project_tree_reveal (GbProjectTree *self,
 
   /* If the specified node wasn't found, still expand its ancestor */
   if (expand_folder || reveal_parent)
-    ide_tree_node_expand (node, TRUE);
+    dzl_tree_node_expand (node, TRUE);
   else
-    ide_tree_expand_to_node (IDE_TREE (self), node);
+    dzl_tree_expand_to_node (DZL_TREE (self), node);
 
-  ide_tree_scroll_to_node (IDE_TREE (self), node);
-  ide_tree_node_select (node);
+  dzl_tree_scroll_to_node (DZL_TREE (self), node);
+  dzl_tree_node_select (node);
 
   if (focus_tree_view)
     ide_workbench_focus (ide_widget_get_workbench (GTK_WIDGET (self)), GTK_WIDGET (self));
diff --git a/plugins/project-tree/gb-project-tree.h b/plugins/project-tree/gb-project-tree.h
index a3979b9..ea03acf 100644
--- a/plugins/project-tree/gb-project-tree.h
+++ b/plugins/project-tree/gb-project-tree.h
@@ -25,7 +25,7 @@ G_BEGIN_DECLS
 
 #define GB_TYPE_PROJECT_TREE (gb_project_tree_get_type())
 
-G_DECLARE_FINAL_TYPE (GbProjectTree, gb_project_tree, GB, PROJECT_TREE, IdeTree)
+G_DECLARE_FINAL_TYPE (GbProjectTree, gb_project_tree, GB, PROJECT_TREE, DzlTree)
 
 GtkWidget  *gb_project_tree_new                    (void);
 void        gb_project_tree_set_context            (GbProjectTree *self,
diff --git a/plugins/symbol-tree/symbol-tree-builder.c b/plugins/symbol-tree/symbol-tree-builder.c
index 80bea21..a3d2db6 100644
--- a/plugins/symbol-tree/symbol-tree-builder.c
+++ b/plugins/symbol-tree/symbol-tree-builder.c
@@ -25,32 +25,32 @@
 
 struct _SymbolTreeBuilder
 {
-  IdeTreeBuilder parent_instance;
+  DzlTreeBuilder parent_instance;
 };
 
-G_DEFINE_TYPE (SymbolTreeBuilder, symbol_tree_builder, IDE_TYPE_TREE_BUILDER)
+G_DEFINE_TYPE (SymbolTreeBuilder, symbol_tree_builder, DZL_TYPE_TREE_BUILDER)
 
 static void
-symbol_tree_builder_build_node (IdeTreeBuilder *builder,
-                                IdeTreeNode    *node)
+symbol_tree_builder_build_node (DzlTreeBuilder *builder,
+                                DzlTreeNode    *node)
 {
   IdeSymbolNode *parent = NULL;
   IdeSymbolTree *symbol_tree;
-  IdeTree *tree;
-  IdeTreeNode *root;
+  DzlTree *tree;
+  DzlTreeNode *root;
   GObject *item;
   guint n_children;
   guint i;
 
-  g_assert (IDE_IS_TREE_BUILDER (builder));
-  g_assert (IDE_IS_TREE_NODE (node));
+  g_assert (DZL_IS_TREE_BUILDER (builder));
+  g_assert (DZL_IS_TREE_NODE (node));
 
-  if (!(tree = ide_tree_builder_get_tree (builder)) ||
-      !(root = ide_tree_get_root (tree)) ||
-      !(symbol_tree = IDE_SYMBOL_TREE (ide_tree_node_get_item (root))))
+  if (!(tree = dzl_tree_builder_get_tree (builder)) ||
+      !(root = dzl_tree_get_root (tree)) ||
+      !(symbol_tree = IDE_SYMBOL_TREE (dzl_tree_node_get_item (root))))
     return;
 
-  item = ide_tree_node_get_item (node);
+  item = dzl_tree_node_get_item (node);
 
   if (IDE_IS_SYMBOL_NODE (item))
     parent = IDE_SYMBOL_NODE (item);
@@ -62,7 +62,7 @@ symbol_tree_builder_build_node (IdeTreeBuilder *builder,
       g_autoptr(IdeSymbolNode) symbol = NULL;
       const gchar *name;
       const gchar *icon_name;
-      IdeTreeNode *child;
+      DzlTreeNode *child;
       IdeSymbolKind kind;
       gboolean has_children;
       gboolean use_markup;
@@ -75,14 +75,14 @@ symbol_tree_builder_build_node (IdeTreeBuilder *builder,
 
       has_children = !!ide_symbol_tree_get_n_children (symbol_tree, symbol);
 
-      child = g_object_new (IDE_TYPE_TREE_NODE,
+      child = g_object_new (DZL_TYPE_TREE_NODE,
                             "children-possible", has_children,
                             "text", name,
                             "use-markup", use_markup,
                             "icon-name", icon_name,
                             "item", symbol,
                             NULL);
-      ide_tree_node_append (node, child);
+      dzl_tree_node_append (node, child);
     }
 }
 
@@ -97,7 +97,7 @@ symbol_tree_builder_get_location_cb (GObject      *object,
   g_autoptr(GError) error = NULL;
   IdePerspective *editor;
   IdeWorkbench *workbench;
-  IdeTree *tree;
+  DzlTree *tree;
 
   IDE_ENTRY;
 
@@ -112,7 +112,7 @@ symbol_tree_builder_get_location_cb (GObject      *object,
       IDE_EXIT;
     }
 
-  tree = ide_tree_builder_get_tree (IDE_TREE_BUILDER (self));
+  tree = dzl_tree_builder_get_tree (DZL_TREE_BUILDER (self));
   workbench = ide_widget_get_workbench (GTK_WIDGET (tree));
   editor = ide_workbench_get_perspective_by_name (workbench, "editor");
 
@@ -122,8 +122,8 @@ symbol_tree_builder_get_location_cb (GObject      *object,
 }
 
 static gboolean
-symbol_tree_builder_node_activated (IdeTreeBuilder *builder,
-                                    IdeTreeNode    *node)
+symbol_tree_builder_node_activated (DzlTreeBuilder *builder,
+                                    DzlTreeNode    *node)
 {
   SymbolTreeBuilder *self = (SymbolTreeBuilder *)builder;
   GObject *item;
@@ -132,7 +132,7 @@ symbol_tree_builder_node_activated (IdeTreeBuilder *builder,
 
   g_assert (SYMBOL_IS_TREE_BUILDER (self));
 
-  item = ide_tree_node_get_item (node);
+  item = dzl_tree_node_get_item (node);
 
   if (IDE_IS_SYMBOL_NODE (item))
     {
@@ -152,7 +152,7 @@ symbol_tree_builder_node_activated (IdeTreeBuilder *builder,
 static void
 symbol_tree_builder_class_init (SymbolTreeBuilderClass *klass)
 {
-  IdeTreeBuilderClass *builder_class = IDE_TREE_BUILDER_CLASS (klass);
+  DzlTreeBuilderClass *builder_class = DZL_TREE_BUILDER_CLASS (klass);
 
   builder_class->build_node = symbol_tree_builder_build_node;
   builder_class->node_activated = symbol_tree_builder_node_activated;
diff --git a/plugins/symbol-tree/symbol-tree-builder.h b/plugins/symbol-tree/symbol-tree-builder.h
index a624c96..c6ca6e6 100644
--- a/plugins/symbol-tree/symbol-tree-builder.h
+++ b/plugins/symbol-tree/symbol-tree-builder.h
@@ -25,7 +25,7 @@ G_BEGIN_DECLS
 
 #define SYMBOL_TYPE_TREE_BUILDER (symbol_tree_builder_get_type())
 
-G_DECLARE_FINAL_TYPE (SymbolTreeBuilder, symbol_tree_builder, SYMBOL, TREE_BUILDER, IdeTreeBuilder)
+G_DECLARE_FINAL_TYPE (SymbolTreeBuilder, symbol_tree_builder, SYMBOL, TREE_BUILDER, DzlTreeBuilder)
 
 G_END_DECLS
 
diff --git a/plugins/symbol-tree/symbol-tree-panel.c b/plugins/symbol-tree/symbol-tree-panel.c
index 96b5672..a764845 100644
--- a/plugins/symbol-tree/symbol-tree-panel.c
+++ b/plugins/symbol-tree/symbol-tree-panel.c
@@ -39,7 +39,7 @@ struct _SymbolTreePanel
 
   GtkSearchEntry *search_entry;
   GtkStack       *stack;
-  IdeTree        *tree;
+  DzlTree        *tree;
 
   IdeBuffer      *last_document;
   gsize           last_change_count;
@@ -68,7 +68,7 @@ get_cached_symbol_tree_cb (GObject      *object,
   g_autoptr(SymbolTreePanel) self = user_data;
   g_autoptr(IdeSymbolTree) symbol_tree = NULL;
   g_autoptr(GError) error = NULL;
-  IdeTreeNode *root;
+  DzlTreeNode *root;
   GtkTreeIter iter;
   GtkTreeModel *model;
 
@@ -91,10 +91,10 @@ get_cached_symbol_tree_cb (GObject      *object,
                                               refresh_tree_timeout,
                                               self);
 
-  root = g_object_new (IDE_TYPE_TREE_NODE,
+  root = g_object_new (DZL_TYPE_TREE_NODE,
                        "item", symbol_tree,
                        NULL);
-  ide_tree_set_root (self->tree, root);
+  dzl_tree_set_root (self->tree, root);
 
   model = gtk_tree_view_get_model (GTK_TREE_VIEW (self->tree));
 
@@ -102,11 +102,11 @@ get_cached_symbol_tree_cb (GObject      *object,
     {
       do
         {
-          g_autoptr(IdeTreeNode) node = NULL;
+          g_autoptr(DzlTreeNode) node = NULL;
 
           gtk_tree_model_get (model, &iter, 0, &node, -1);
           if (node != NULL)
-            ide_tree_node_expand (node, FALSE);
+            dzl_tree_node_expand (node, FALSE);
         }
       while (gtk_tree_model_iter_next (model, &iter));
     }
@@ -172,7 +172,7 @@ refresh_tree (SymbolTreePanel *self)
        * TODO: Get cross compile names for nodes so that we can
        *       recompute the open state.
        */
-      ide_tree_set_root (self->tree, ide_tree_node_new ());
+      dzl_tree_set_root (self->tree, dzl_tree_node_new ());
 
       /*
        * Fetch the symbols via the transparent cache.
@@ -276,18 +276,18 @@ populate_cache_cb (DzlTaskCache  *cache,
 }
 
 static gboolean
-filter_symbols_cb (IdeTree     *tree,
-                   IdeTreeNode *node,
+filter_symbols_cb (DzlTree     *tree,
+                   DzlTreeNode *node,
                    gpointer     user_data)
 {
   IdePatternSpec *spec = user_data;
   const gchar *text;
 
-  g_assert (IDE_IS_TREE (tree));
-  g_assert (IDE_IS_TREE_NODE (node));
+  g_assert (DZL_IS_TREE (tree));
+  g_assert (DZL_IS_TREE_NODE (node));
   g_assert (spec != NULL);
 
-  if ((text = ide_tree_node_get_text (node)) != NULL)
+  if ((text = dzl_tree_node_get_text (node)) != NULL)
     return ide_pattern_spec_match (spec, text);
 
   return FALSE;
@@ -306,14 +306,14 @@ symbol_tree__search_entry_changed (SymbolTreePanel *self,
 
   if (ide_str_empty0 (text))
     {
-      ide_tree_set_filter (self->tree, NULL, NULL, NULL);
+      dzl_tree_set_filter (self->tree, NULL, NULL, NULL);
     }
   else
     {
       IdePatternSpec *spec;
 
       spec = ide_pattern_spec_new (text);
-      ide_tree_set_filter (self->tree,
+      dzl_tree_set_filter (self->tree,
                            filter_symbols_cb,
                            spec,
                            (GDestroyNotify)ide_pattern_spec_unref);
@@ -389,8 +389,8 @@ symbol_tree_panel_class_init (SymbolTreePanelClass *klass)
 static void
 symbol_tree_panel_init (SymbolTreePanel *self)
 {
-  IdeTreeNode *root;
-  IdeTreeBuilder *builder;
+  DzlTreeNode *root;
+  DzlTreeBuilder *builder;
 
   self->destroy_connected = g_hash_table_new (NULL, NULL);
 
@@ -411,11 +411,11 @@ symbol_tree_panel_init (SymbolTreePanel *self)
 
   g_object_set (self, "title", _("Symbols"), NULL);
 
-  root = ide_tree_node_new ();
-  ide_tree_set_root (self->tree, root);
+  root = dzl_tree_node_new ();
+  dzl_tree_set_root (self->tree, root);
 
   builder = g_object_new (SYMBOL_TYPE_TREE_BUILDER, NULL);
-  ide_tree_add_builder (self->tree, builder);
+  dzl_tree_add_builder (self->tree, builder);
 
   g_signal_connect_object (self->search_entry,
                            "changed",
diff --git a/plugins/symbol-tree/symbol-tree-panel.ui b/plugins/symbol-tree/symbol-tree-panel.ui
index ba80752..049a79d 100644
--- a/plugins/symbol-tree/symbol-tree-panel.ui
+++ b/plugins/symbol-tree/symbol-tree-panel.ui
@@ -36,7 +36,7 @@
                 <property name="expand">true</property>
                 <property name="visible">true</property>
                 <child>
-                  <object class="IdeTree" id="tree">
+                  <object class="DzlTree" id="tree">
                     <property name="activate-on-single-click">true</property>
                     <property name="headers-visible">false</property>
                     <property name="show-icons">true</property>
diff --git a/plugins/symbol-tree/symbol-tree.c b/plugins/symbol-tree/symbol-tree.c
index 1aed22d..287691c 100644
--- a/plugins/symbol-tree/symbol-tree.c
+++ b/plugins/symbol-tree/symbol-tree.c
@@ -170,7 +170,7 @@ workbench_addin_init (IdeWorkbenchAddinInterface *iface)
 static void
 symbol_tree_class_init (SymbolTreeClass *klass)
 {
-  g_type_ensure (IDE_TYPE_TREE);
+  g_type_ensure (DZL_TYPE_TREE);
 }
 
 static void


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