[gnome-builder] vala: remove our last C file in the vala plugin



commit 7efd3daa293f45bac56428776f764a2419f94f9a
Author: Christian Hergert <christian hergert me>
Date:   Sat Sep 26 01:19:30 2015 -0700

    vala: remove our last C file in the vala plugin
    
    You'd never know this was all prototyped in C!

 plugins/vala-pack/Makefile.am                      |    8 +++---
 .../{vala-pack-plugin.c => vala-pack-plugin.vala}  |   23 +++++++++++--------
 2 files changed, 17 insertions(+), 14 deletions(-)
---
diff --git a/plugins/vala-pack/Makefile.am b/plugins/vala-pack/Makefile.am
index 67c3039..439e928 100644
--- a/plugins/vala-pack/Makefile.am
+++ b/plugins/vala-pack/Makefile.am
@@ -17,7 +17,7 @@ libvala_pack_plugin_la_SOURCES = \
        ide-vala-index.vala \
        ide-vala-locator.vala \
        ide-vala-source-file.vala \
-       vala-pack-plugin.c \
+       vala-pack-plugin.vala \
        $(NULL)
 
 libvala_pack_plugin_la_VALAFLAGS = \
@@ -25,10 +25,10 @@ libvala_pack_plugin_la_VALAFLAGS = \
        --thread \
        --vapidir $(top_builddir)/libide \
        --pkg gtksourceview-3.0 \
-       --pkg posix \
-       --pkg libvala-0.30 \
        --pkg libide-1.0 \
-       -H ide-vala.h \
+       --pkg libpeas-1.0 \
+       --pkg libvala-0.30 \
+       --pkg posix \
        $(NULL)
 
 libvala_pack_plugin_la_CFLAGS = \
diff --git a/plugins/vala-pack/vala-pack-plugin.c b/plugins/vala-pack/vala-pack-plugin.vala
similarity index 53%
rename from plugins/vala-pack/vala-pack-plugin.c
rename to plugins/vala-pack/vala-pack-plugin.vala
index c283d64..b8553f9 100644
--- a/plugins/vala-pack/vala-pack-plugin.c
+++ b/plugins/vala-pack/vala-pack-plugin.vala
@@ -1,4 +1,4 @@
-/* vala-pack-plugin.c
+/* vala-pack-plugin.vala
  *
  * Copyright (C) 2015 Christian Hergert <christian hergert me>
  *
@@ -16,15 +16,18 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include <libpeas/peas.h>
+using GLib;
+using Ide;
+using Peas;
 
-#include "ide-vala.h"
-
-void
-peas_register_types (PeasObjectModule *module)
+[ModuleInit]
+public void peas_register_types (GLib.TypeModule module)
 {
-  peas_object_module_register_extension_type (module, IDE_TYPE_SERVICE, IDE_TYPE_VALA_SERVICE);
-  peas_object_module_register_extension_type (module, IDE_TYPE_INDENTER, IDE_TYPE_VALA_INDENTER);
-  peas_object_module_register_extension_type (module, IDE_TYPE_COMPLETION_PROVIDER, 
IDE_TYPE_VALA_COMPLETION_PROVIDER);
-  peas_object_module_register_extension_type (module, IDE_TYPE_DIAGNOSTIC_PROVIDER, 
IDE_TYPE_VALA_DIAGNOSTIC_PROVIDER);
+       Peas.ObjectModule peas = (Peas.ObjectModule)module;
+
+       peas.register_extension_type (typeof (Ide.CompletionProvider), typeof (Ide.ValaCompletionProvider));
+       peas.register_extension_type (typeof (Ide.DiagnosticProvider), typeof (Ide.ValaDiagnosticProvider));
+       peas.register_extension_type (typeof (Ide.Indenter), typeof (Ide.ValaIndenter));
+       peas.register_extension_type (typeof (Ide.Service), typeof (Ide.ValaService));
+       peas.register_extension_type (typeof (Ide.SymbolResolver), typeof (Ide.ValaSymbolResolver));
 }


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