Re: [anjuta-devel] Adding some filtering mechanism for plugin



Hi,


I plan to do the following changes in the plugin system:


* Remove the plugin id.

Instead, I plan to return a AnjutaPluginHandle instead of a AnjutaPluginDescription. The handle is an unique object associated to each plugin in the plugin manager. While the description is just the content of the .plugin file.

Each handle contains a pointer to the corresponding description. So it doesn't remove any information.

The issue with the plugin description is that to go back to the corresponding plugin, you need to read the library name in the description which is considered as the plugin id and find the corresponding handle.

This will not work, if I have several .plugin files using the same library file. Moreover, getting the plugin handle from a description is a common task and it needs a search in a lookup table which is not really necessary as initially you start with a handle.


* Define system plugin.

I will add an additional property in the plugin handle object defining if the plugin is a system plugin. A system plugin is a plugin which is loaded on startup from the initial profile and which is never deactivated nor unloaded.

It's a bit different from a resident plugin (defined by an attribute in the .plugin file) because such plugin is still be deactivated even if the library itself is not unloaded.

With this, I don't need to define incremental profile. All profiles will replace the previous one except if the previous one is the system profile that will mark all its plugins as system one.


I still need to check that it's working and that I haven't forgotten something. Do you have some comments about this?


Regards,

Sébastien


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