[gnome-builder/wip/uajain/word-completion: 3/4] Some trial plumbing to test
- From: Umang Jain <uajain src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/wip/uajain/word-completion: 3/4] Some trial plumbing to test
- Date: Wed, 30 Aug 2017 10:26:52 +0000 (UTC)
commit eb10ce7bf58ad027668d884e037a531015b9f50a
Author: Umang Jain <mailumangjain gmail com>
Date: Fri Aug 25 02:33:32 2017 +0530
Some trial plumbing to test
libide/buffers/ide-buffer-manager.c | 10 ++++++----
libide/buffers/ide-buffer-manager.h | 3 ++-
libide/ide.h | 3 +++
libide/sourceview/ide-source-view.c | 2 +-
4 files changed, 12 insertions(+), 6 deletions(-)
---
diff --git a/libide/buffers/ide-buffer-manager.c b/libide/buffers/ide-buffer-manager.c
index db1cd03..6513b36 100644
--- a/libide/buffers/ide-buffer-manager.c
+++ b/libide/buffers/ide-buffer-manager.c
@@ -56,6 +56,7 @@ struct _IdeBufferManager
GHashTable *timeouts;
IdeBuffer *focus_buffer;
GtkSourceCompletionWords *word_completion;
+ IdeWordCompletionProvider *word_completion_provider;
GSettings *settings;
GHashTable *loading;
@@ -1421,7 +1422,7 @@ ide_buffer_manager_get_property (GObject *object,
break;
case PROP_MINIMUM_WORD_SIZE:
- g_object_get_property (G_OBJECT (self->word_completion), "minimum-word-size", value);
+ g_object_get_property (G_OBJECT (self->word_completion_provider), "minimum-word-size", value);
break;
default:
@@ -1452,7 +1453,7 @@ ide_buffer_manager_set_property (GObject *object,
break;
case PROP_MINIMUM_WORD_SIZE:
- g_object_set_property (G_OBJECT (self->word_completion), "minimum-word-size", value);
+ g_object_set_property (G_OBJECT (self->word_completion_provider), "minimum-word-size", value);
break;
default:
@@ -1669,6 +1670,7 @@ ide_buffer_manager_init (IdeBufferManager *self)
self->max_file_size = MAX_FILE_SIZE_BYTES_DEFAULT;
self->timeouts = g_hash_table_new (g_direct_hash, g_direct_equal);
self->word_completion = g_object_new (IDE_TYPE_COMPLETION_WORDS, NULL);
+ self->word_completion_provider = g_object_new (IDE_TYPE_WORD_COMPLETION_PROVIDER, NULL);
self->settings = g_settings_new ("org.gnome.builder.editor");
self->loading = g_hash_table_new_full ((GHashFunc)ide_file_hash,
(GEqualFunc)ide_file_equal,
@@ -1763,12 +1765,12 @@ ide_buffer_manager_get_buffers (IdeBufferManager *self)
*
* Returns: (transfer none): A #GtkSourceCompletionWords
*/
-GtkSourceCompletionWords *
+IdeWordCompletionProvider *
ide_buffer_manager_get_word_completion (IdeBufferManager *self)
{
g_return_val_if_fail (IDE_IS_BUFFER_MANAGER (self), NULL);
- return self->word_completion;
+ return self->word_completion_provider;
}
/**
diff --git a/libide/buffers/ide-buffer-manager.h b/libide/buffers/ide-buffer-manager.h
index 2ab9d6d..8158cef 100644
--- a/libide/buffers/ide-buffer-manager.h
+++ b/libide/buffers/ide-buffer-manager.h
@@ -26,6 +26,7 @@
#include "files/ide-file.h"
#include "workbench/ide-workbench.h"
+#include "sourceview/ide-word-completion-provider.h"
G_BEGIN_DECLS
@@ -67,7 +68,7 @@ IdeBuffer *ide_buffer_manager_get_focus_buffer (IdeBufferManag
void ide_buffer_manager_set_focus_buffer (IdeBufferManager *self,
IdeBuffer *buffer);
GPtrArray *ide_buffer_manager_get_buffers (IdeBufferManager *self);
-GtkSourceCompletionWords *ide_buffer_manager_get_word_completion (IdeBufferManager *self);
+IdeWordCompletionProvider *ide_buffer_manager_get_word_completion (IdeBufferManager *self);
guint ide_buffer_manager_get_n_buffers (IdeBufferManager *self);
gboolean ide_buffer_manager_has_file (IdeBufferManager *self,
GFile *file);
diff --git a/libide/ide.h b/libide/ide.h
index 8d2d512..9c64b46 100644
--- a/libide/ide.h
+++ b/libide/ide.h
@@ -138,6 +138,9 @@ G_BEGIN_DECLS
#include "sourceview/ide-completion-provider.h"
#include "sourceview/ide-completion-results.h"
#include "sourceview/ide-completion-words.h"
+#include "sourceview/ide-word-completion-provider.h"
+#include "sourceview/ide-word-completion-item.h"
+#include "sourceview/ide-word-completion-results.h"
#include "sourceview/ide-indenter.h"
#include "sourceview/ide-language.h"
#include "sourceview/ide-source-map.h"
diff --git a/libide/sourceview/ide-source-view.c b/libide/sourceview/ide-source-view.c
index 1a1595e..e8fb9b0 100644
--- a/libide/sourceview/ide-source-view.c
+++ b/libide/sourceview/ide-source-view.c
@@ -781,7 +781,7 @@ ide_source_view_reload_word_completion (IdeSourceView *self)
{
IdeBufferManager *bufmgr;
GtkSourceCompletion *completion;
- GtkSourceCompletionWords *words;
+ IdeWordCompletionProvider *words;
GList *list;
bufmgr = ide_context_get_buffer_manager (context);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]