mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-CR-52216 skip root pluginId on traversal
GitOrigin-RevId: 16fa211c2c3081a3f33d7db077a7bb8264feacd9
This commit is contained in:
committed by
intellij-monorepo-bot
parent
e4e7a94754
commit
af150618ca
@@ -100,7 +100,8 @@ public class InstalledPluginsTableModel extends PluginTableModel {
|
||||
if (descriptor instanceof IdeaPluginDescriptorImpl && ((IdeaPluginDescriptorImpl)descriptor).isDeleted()) continue;
|
||||
final Boolean enabled = myEnabled.get(pluginId);
|
||||
if (enabled == null || enabled.booleanValue()) {
|
||||
for (PluginId depId : PluginManagerCore.pluginIdTraverser().withRoot(descriptor.getPluginId())) {
|
||||
for (PluginId depId : PluginManagerCore.pluginIdTraverser().withRoot(pluginId)) {
|
||||
if (depId.equals(pluginId)) continue;
|
||||
Boolean enabled1 = myEnabled.get(depId);
|
||||
if ((enabled1 == null && !ourState.wasUpdated(depId)) ||
|
||||
(enabled1 != null && !enabled1.booleanValue())) {
|
||||
@@ -162,13 +163,15 @@ public class InstalledPluginsTableModel extends PluginTableModel {
|
||||
}
|
||||
|
||||
for (final IdeaPluginDescriptor descriptorToCheckDependencies : descriptorsToCheckDependencies) {
|
||||
for (PluginId dependencyPluginId : PluginManagerCore.pluginIdTraverser().withRoot(descriptorToCheckDependencies.getPluginId())) {
|
||||
Boolean enabled = myEnabled.get(dependencyPluginId);
|
||||
PluginId pluginId = descriptorToCheckDependencies.getPluginId();
|
||||
for (PluginId depId : PluginManagerCore.pluginIdTraverser().withRoot(pluginId)) {
|
||||
if (depId.equals(pluginId)) continue;
|
||||
Boolean enabled = myEnabled.get(depId);
|
||||
if (enabled == null) {
|
||||
break;
|
||||
}
|
||||
if (newEnabledState && !enabled.booleanValue()) {
|
||||
deps.add(dependencyPluginId);
|
||||
deps.add(depId);
|
||||
}
|
||||
|
||||
if (!newEnabledState) {
|
||||
@@ -179,10 +182,9 @@ public class InstalledPluginsTableModel extends PluginTableModel {
|
||||
if (descriptorToCheckDependencies.isImplementationDetail()) {
|
||||
continue;
|
||||
}
|
||||
final PluginId pluginDescriptorId = descriptorToCheckDependencies.getPluginId();
|
||||
for (IdeaPluginDescriptor descriptor : descriptorsWithChangedEnabledState) {
|
||||
if (dependencyPluginId.equals(descriptor.getPluginId())) {
|
||||
deps.add(pluginDescriptorId);
|
||||
if (depId.equals(descriptor.getPluginId())) {
|
||||
deps.add(pluginId);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -131,10 +131,12 @@ public class PluginBooleanOptionDescriptor extends BooleanOptionDescription {
|
||||
|
||||
Collection<PluginId> res = new HashSet<>();
|
||||
IdeaPluginDescriptor descriptor = maybeDescriptor.get();
|
||||
for (PluginId pluginId : PluginManagerCore.pluginIdTraverser().withRoot(descriptor.getPluginId())) {
|
||||
boolean enabled = optionalDescriptor(pluginId).map(IdeaPluginDescriptor::isEnabled).orElse(true);
|
||||
PluginId pluginId = descriptor.getPluginId();
|
||||
for (PluginId depId : PluginManagerCore.pluginIdTraverser().withRoot(pluginId)) {
|
||||
if (depId.equals(pluginId)) continue;
|
||||
boolean enabled = optionalDescriptor(depId).map(IdeaPluginDescriptor::isEnabled).orElse(true);
|
||||
if (!enabled) {
|
||||
res.add(pluginId);
|
||||
res.add(depId);
|
||||
}
|
||||
}
|
||||
return res;
|
||||
|
||||
Reference in New Issue
Block a user