[anjuta-devel] libpeas



Hi Abderrahim,

Here some comments about the discussion on libpeas in bug https://bugzilla.gnome.org/show_bug.cgi?id=621676


I think that exporting IAnjutaEditor* interfaces instead of a GtkTextView is much better at least for Anjuta needs. So I'm agree that it will be difficult to have the same plugin for gedit and anjuta. You can still put in the same shared library file both interfaces and have some common code. But anyway, in this case, we don't need to change anything in anjuta to make it compatible with gedit.


As Johannes, I think that moving all *Manager plugins in the core is a bad idea.


Then, even if libpeas calls functions using a more complex syntax, we can still use it. Basically an Anjuta plugin is a shared library with only one function named "anjuta_glue_register_components" which register additional GLib types. Then the plugin manager just creates the plugin objects on demand using standard GLib function (g_object_new).

So, we can call peas_extension_call (ext, IANJUTA_TYPE_LOADER, "anjuta_glue_register_components"); to register all needed types and all the remaining code stay the same in Anjuta. This can be done in a plugin, so we can have a libpeas loader.


I suppose that libpeas provides more services, like parsing .plugin file (this file contains meta information like plugin name, implemented interfaces...) checking dependencies and so on. I think this part is the main function of libpeas but it is independent from the language used by the plugin. I don't know how easy it will be to replace the corresponding code in Anjuta but the gain is null for the user and I think quite small for us as the code is already working and don't really need improvements for the moment.


Writing a loader for javascript or valua plugin should be quite easy. We just need to write a new loader plugin that will load the javascript/vala code and call the javascript/vala function anjuta_glue_register_components. The issue is that we need working bindings supporting interface functions and callbacks.


Regards,

Sébastien



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