mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-03-22 15:19:59 +07:00
[PY-82781] loadPluginWithoutProgress: move check for module/plugin is enabled into loadPluginWithoutProgress
(cherry picked from commit e85c6e93eab8905f6458dfaf10d7e2ee26c1df26) IJ-CR-170382 GitOrigin-RevId: 5c58a1a4b4d130e43ac05c6a8418906125c8d60e
This commit is contained in:
committed by
intellij-monorepo-bot
parent
679bb67593
commit
56ccbb9c86
@@ -997,7 +997,13 @@ object DynamicPlugins {
|
||||
loadModules(
|
||||
modules = optionalDependenciesOnPlugin(dependencyPlugin = pluginDescriptor,
|
||||
classLoaderConfigurator = classLoaderConfigurator,
|
||||
pluginSet = pluginSet).toList(),
|
||||
pluginSet = pluginSet).filter { descriptorImpl ->
|
||||
when (descriptorImpl) {
|
||||
is ContentModuleDescriptor if !pluginSet.isModuleEnabled(descriptorImpl.moduleName) -> false
|
||||
is PluginMainDescriptor if !pluginSet.isPluginEnabled(descriptorImpl.pluginId) -> false
|
||||
else -> true
|
||||
}
|
||||
}.toList(),
|
||||
app = app,
|
||||
listenerCallbacks = listenerCallbacks,
|
||||
)
|
||||
@@ -1263,9 +1269,6 @@ private fun processDependenciesOnPlugin(
|
||||
}
|
||||
|
||||
for (module in plugin.contentModules) {
|
||||
if (!pluginSet.isModuleEnabled(module.moduleName)) {
|
||||
continue
|
||||
}
|
||||
if (loadStateFilter != LoadStateFilter.ANY) {
|
||||
val isModuleLoaded = module.pluginClassLoader != null
|
||||
if (isModuleLoaded != (loadStateFilter == LoadStateFilter.LOADED)) {
|
||||
|
||||
@@ -1109,6 +1109,7 @@ class DynamicPluginsTest {
|
||||
PluginSetTestBuilder.fromPath(pluginsDir).withDisabledPlugins("bar").build()
|
||||
loadPluginInTest(fooPluginPath) {
|
||||
loadPluginInTest(barPluginPath) {
|
||||
assertThat(PluginManagerCore.getPluginSet().findEnabledModule("foo.b")).isNull()
|
||||
assertThat(ActionManager.getInstance().getAction("foo.b.action")).isNull()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user