Commit 665e62ea authored by Christian Hergert's avatar Christian Hergert

ctags: remove use of dynamic types

parent c23bf657
Pipeline #16229 passed with stage
in 17 minutes and 53 seconds
......@@ -28,22 +28,9 @@
#include "ide-ctags-service.h"
#include "ide-ctags-symbol-resolver.h"
void _ide_ctags_index_register_type (GTypeModule *module);
void _ide_ctags_builder_register_type (GTypeModule *module);
void _ide_ctags_completion_provider_register_type (GTypeModule *module);
void _ide_ctags_highlighter_register_type (GTypeModule *module);
void _ide_ctags_service_register_type (GTypeModule *module);
void _ide_ctags_symbol_resolver_register_type (GTypeModule *module);
void
ide_ctags_register_types (PeasObjectModule *module)
{
_ide_ctags_index_register_type (G_TYPE_MODULE (module));
_ide_ctags_completion_provider_register_type (G_TYPE_MODULE (module));
_ide_ctags_highlighter_register_type (G_TYPE_MODULE (module));
_ide_ctags_service_register_type (G_TYPE_MODULE (module));
_ide_ctags_symbol_resolver_register_type (G_TYPE_MODULE (module));
peas_object_module_register_extension_type (module, IDE_TYPE_COMPLETION_PROVIDER, IDE_TYPE_CTAGS_COMPLETION_PROVIDER);
peas_object_module_register_extension_type (module, IDE_TYPE_HIGHLIGHTER, IDE_TYPE_CTAGS_HIGHLIGHTER);
peas_object_module_register_extension_type (module, IDE_TYPE_SERVICE, IDE_TYPE_CTAGS_SERVICE);
......
......@@ -33,11 +33,10 @@ static void provider_iface_init (IdeCompletionProviderInterface *iface);
static GHashTable *reserved;
G_DEFINE_DYNAMIC_TYPE_EXTENDED (IdeCtagsCompletionProvider,
ide_ctags_completion_provider,
IDE_TYPE_OBJECT,
0,
G_IMPLEMENT_INTERFACE (IDE_TYPE_COMPLETION_PROVIDER, provider_iface_init))
G_DEFINE_TYPE_WITH_CODE (IdeCtagsCompletionProvider,
ide_ctags_completion_provider,
IDE_TYPE_OBJECT,
G_IMPLEMENT_INTERFACE (IDE_TYPE_COMPLETION_PROVIDER, provider_iface_init))
static const gchar *
get_icon_name (IdeCtagsCompletionItem *item)
......@@ -192,11 +191,6 @@ ide_ctags_completion_provider_class_init (IdeCtagsCompletionProviderClass *klass
g_hash_table_insert (reserved, (gchar *)reserved_keywords[i], NULL);
}
static void
ide_ctags_completion_provider_class_finalize (IdeCtagsCompletionProviderClass *klass)
{
}
static void
changed_enabled_cb (IdeCtagsCompletionProvider *self,
const gchar *key,
......@@ -423,9 +417,3 @@ provider_iface_init (IdeCompletionProviderInterface *iface)
iface->refilter = ide_ctags_completion_provider_refilter;
iface->display_proposal = ide_ctags_completion_provider_display_proposal;
}
void
_ide_ctags_completion_provider_register_type (GTypeModule *module)
{
ide_ctags_completion_provider_register_type (module);
}
......@@ -16,6 +16,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "config.h"
#define G_LOG_DOMAIN "ide-ctags-highlighter"
#include <glib/gi18n.h>
......@@ -34,12 +36,11 @@ struct _IdeCtagsHighlighter
static void highlighter_iface_init (IdeHighlighterInterface *iface);
G_DEFINE_DYNAMIC_TYPE_EXTENDED (IdeCtagsHighlighter,
ide_ctags_highlighter,
IDE_TYPE_OBJECT,
0,
G_IMPLEMENT_INTERFACE (IDE_TYPE_HIGHLIGHTER,
highlighter_iface_init))
G_DEFINE_TYPE_WITH_CODE (IdeCtagsHighlighter,
ide_ctags_highlighter,
IDE_TYPE_OBJECT,
G_IMPLEMENT_INTERFACE (IDE_TYPE_HIGHLIGHTER,
highlighter_iface_init))
static inline gboolean
accepts_char (gunichar ch)
......@@ -280,11 +281,6 @@ ide_ctags_highlighter_class_init (IdeCtagsHighlighterClass *klass)
object_class->finalize = ide_ctags_highlighter_finalize;
}
static void
ide_ctags_highlighter_class_finalize (IdeCtagsHighlighterClass *klass)
{
}
static void
ide_ctags_highlighter_init (IdeCtagsHighlighter *self)
{
......@@ -297,9 +293,3 @@ highlighter_iface_init (IdeHighlighterInterface *iface)
iface->update = ide_ctags_highlighter_real_update;
iface->set_engine = ide_ctags_highlighter_real_set_engine;
}
void
_ide_ctags_highlighter_register_type (GTypeModule *module)
{
ide_ctags_highlighter_register_type (module);
}
......@@ -52,9 +52,8 @@ enum {
static void async_initable_iface_init (GAsyncInitableIface *iface);
G_DEFINE_DYNAMIC_TYPE_EXTENDED (IdeCtagsIndex, ide_ctags_index, IDE_TYPE_OBJECT, 0,
G_IMPLEMENT_INTERFACE (G_TYPE_ASYNC_INITABLE,
async_initable_iface_init))
G_DEFINE_TYPE_WITH_CODE (IdeCtagsIndex, ide_ctags_index, IDE_TYPE_OBJECT,
G_IMPLEMENT_INTERFACE (G_TYPE_ASYNC_INITABLE, async_initable_iface_init))
DZL_DEFINE_COUNTER (instances, "IdeCtagsIndex", "Instances", "Number of IdeCtagsIndex instances.")
DZL_DEFINE_COUNTER (index_entries, "IdeCtagsIndex", "N Entries", "Number of entries in indexes.")
......@@ -415,11 +414,6 @@ ide_ctags_index_class_init (IdeCtagsIndexClass *klass)
g_object_class_install_properties (object_class, LAST_PROP, properties);
}
static void
ide_ctags_index_class_finalize (IdeCtagsIndexClass *klass)
{
}
static void
ide_ctags_index_init (IdeCtagsIndex *self)
{
......@@ -626,12 +620,6 @@ ide_ctags_index_lookup_prefix (IdeCtagsIndex *self,
ide_ctags_index_entry_compare_prefix);
}
void
_ide_ctags_index_register_type (GTypeModule *module)
{
ide_ctags_index_register_type (module);
}
guint64
ide_ctags_index_get_mtime (IdeCtagsIndex *self)
{
......
......@@ -59,8 +59,8 @@ typedef struct
static void service_iface_init (IdeServiceInterface *iface);
G_DEFINE_DYNAMIC_TYPE_EXTENDED (IdeCtagsService, ide_ctags_service, IDE_TYPE_OBJECT, 0,
G_IMPLEMENT_INTERFACE (IDE_TYPE_SERVICE, service_iface_init))
G_DEFINE_TYPE_WITH_CODE (IdeCtagsService, ide_ctags_service, IDE_TYPE_OBJECT,
G_IMPLEMENT_INTERFACE (IDE_TYPE_SERVICE, service_iface_init))
static void
queued_request_free (gpointer data)
......@@ -674,11 +674,6 @@ service_iface_init (IdeServiceInterface *iface)
iface->stop = ide_ctags_service_stop;
}
static void
ide_ctags_service_class_finalize (IdeCtagsServiceClass *klass)
{
}
static void
ide_ctags_service_init (IdeCtagsService *self)
{
......@@ -703,12 +698,6 @@ ide_ctags_service_init (IdeCtagsService *self)
dzl_task_cache_set_name (self->indexes, "ctags index cache");
}
void
_ide_ctags_service_register_type (GTypeModule *module)
{
ide_ctags_service_register_type (module);
}
/**
* ide_ctags_service_get_indexes:
*
......
......@@ -47,12 +47,11 @@ enum {
static void symbol_resolver_iface_init (IdeSymbolResolverInterface *iface);
G_DEFINE_DYNAMIC_TYPE_EXTENDED (IdeCtagsSymbolResolver,
ide_ctags_symbol_resolver,
IDE_TYPE_OBJECT,
0,
G_IMPLEMENT_INTERFACE (IDE_TYPE_SYMBOL_RESOLVER,
symbol_resolver_iface_init))
G_DEFINE_TYPE_WITH_CODE (IdeCtagsSymbolResolver,
ide_ctags_symbol_resolver,
IDE_TYPE_OBJECT,
G_IMPLEMENT_INTERFACE (IDE_TYPE_SYMBOL_RESOLVER,
symbol_resolver_iface_init))
static void
lookup_symbol_free (gpointer data)
......@@ -718,11 +717,6 @@ ide_ctags_symbol_resolver_class_init (IdeCtagsSymbolResolverClass *klass)
{
}
static void
ide_ctags_symbol_resolver_class_finalize (IdeCtagsSymbolResolverClass *klass)
{
}
static void
ide_ctags_symbol_resolver_init (IdeCtagsSymbolResolver *resolver)
{
......@@ -737,12 +731,6 @@ symbol_resolver_iface_init (IdeSymbolResolverInterface *iface)
iface->get_symbol_tree_finish = ide_ctags_symbol_resolver_get_symbol_tree_finish;
}
void
_ide_ctags_symbol_resolver_register_type (GTypeModule *module)
{
ide_ctags_symbol_resolver_register_type (module);
}
void
ide_ctags_symbol_resolver_get_location_async (IdeCtagsSymbolResolver *self,
IdeCtagsIndex *index,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment