| 337 | } |
| 338 | |
| 339 | void PluginManager::InitializePlugins() |
| 340 | { |
| 341 | ModuleManager & moduleManager = ModuleManager::Get(); |
| 342 | //ModuleManager::DiscoverProviders was called earlier, so we |
| 343 | //can be sure that providers are already loaded |
| 344 | |
| 345 | //Check all known plugins to ensure they are still valid. |
| 346 | for (auto it = mRegisteredPlugins.begin(); it != mRegisteredPlugins.end();) { |
| 347 | auto &pluginDesc = it->second; |
| 348 | const auto pluginType = pluginDesc.GetPluginType(); |
| 349 | if(pluginType == PluginTypeNone || pluginType == PluginTypeModule) |
| 350 | { |
| 351 | ++it; |
| 352 | continue; |
| 353 | } |
| 354 | |
| 355 | if(!moduleManager.CheckPluginExist(pluginDesc.GetProviderID(), pluginDesc.GetPath())) |
| 356 | it = mRegisteredPlugins.erase(it); |
| 357 | else |
| 358 | ++it; |
| 359 | } |
| 360 | |
| 361 | Save(); |
| 362 | } |
| 363 | |
| 364 | // ---------------------------------------------------------------------------- |
| 365 | // PluginManager implementation |
nothing calls this directly
no test coverage detected