When I was implement my Vala Backend solution, in addition to metadata files I implement two other files with basically two classes Backend and Document. This post, I’m describing the first one.
Backend’s class implements class Backend Implementation from gcp original source. So, you need reference this class as a abstract class on your code and override tree methods:
- on_document_changed (trigger your method to deal with document update)
I still don’t know why, but I needed to include this lines to make it works fine:
public void peas_register_types (TypeModule module)
Peas.ObjectModule mod = module as Peas.ObjectModule;
mod.register_extension_type (typeof (Gcp.Backend),
I “stole” this from C backend code 😛 I will ask my mentors about it, since it is present on backends that was implemented using Vala but I didn’t see on Python’s codes.