Am 11.06.2009 16:00, schrieb Mars:
BTW, there is one big problem with the Geany plugin API as of 0.16:
Plugins (like Python bindings) can't register other plugins - put
another way, a there is no plugin registration API published via the
plugin API.  With the geany plugin registration API being wrapped in
Python, I could easily write pure-Python Geany plugins.  Lacking that,
I had to come up with my own Python plugin registration.
+1

I think additionally to the plugin API there should be some interface API which has more privileges (like registering and running other plugins).

As this would be probably difficult to implement I propose to add the possibillity to register a plugin as an "interface" (e.g. to another language). Having a Python interface, users could put their *.py-files in the geany plugins directory and geany passes them to that Python interface. There would be several advantages using such system:

 * Plugins offering APIs to other languages wouldn't have to implement
   a registration API (or, at least, not the whole stuff)
*  Geany could register the plugins itself (I dunno wether it's
   important for the plugin system which plugin did what)

I thought about something like this: If a *.py (or *.whatever) file in the plugin directories is found, geany passes that file (path) to the according interface plugin, which returns the meta information (like required API version and stuff) to geany. Whenever geany would call a function of that Python plugin, it passes all the information to the interface plugin which acts as a man-in-the-middle (calls the function in the Python plugin and returns the return-values to geany, if there are any). The same way, Python plugin calls geany API functions: Passes the information to the interface handler, the interface handler acts as man-in-the-middle.

I'm aware of the fact that this would take some effort to implement but I cannot see any other way to do registration of 3rd-party-language plugins right now.

Regards,
Jonas
_______________________________________________
Geany-devel mailing list
Geany-devel@uvena.de
http://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel

Reply via email to