disable certain plugins

Andreas Pakulat apaku at gmx.de
Sat Sep 11 00:45:56 UTC 2010


On 11.09.10 01:06:22, Julian Bäume wrote:
> On Friday 10 September 2010 22:46:15 Andreas Pakulat wrote: 
> > if a plugin is deselected (either by default or manually) this
> > plugin must not be loaded, no matter what (the code that tries to load
> > plugins needs to be able to handle that case).
> > 
> > That being said, PluginController API that provides plugins (as
> > extension, IPlugin instance or lists thereof) must not provide plugins
> > that are disabled. I thought there was a check in loadPlugin to verify
> > that the plugin to be loaded is enabled, but maybe I was wrong. Either
> > that or the logic in initialize does have a flaw somewhere.
> 
> The api documentation for IPluginController::allPluginsForExtension() is 
> somewhat misleading. Seems like a copy & paste issue, to me. Anyway, you are 
> right, the Plugincontroller::loadPluginInternal() checks if the plugin is 
> enabled. But the isEnabled method returns true, because the isUserSelectable 
> method returns true. This is because no X-KDevelop-LoadMode has been set in 
> the .desktop file for neither Qt help, nor CMake help.

Thats ok and not the cause of them being loaded. isEnabled should return
true for these plugins:

- project plugins
- non-user-selectable plugins (mostly language plugins I think)
- plugins that are enabled

I guess for some reason Qt/CMake help are enabled at that point, even
though they shouldn't. Currently I can't see how that would happen,
maybe I get around to check that tomorrow or on sunday..

Andreas

-- 
You will be given a post of trust and responsibility.




More information about the KDevelop-devel mailing list