void (@NotNull PackageSetParserExtension extension, @NotNull PluginDescriptor pluginDescriptor) { ClassLoader pluginClassLoader = pluginDescriptor.getClassLoader(); for (Project project : ProjectManager.getInstance().getOpenProjects()) { for (NamedScopesHolder holder : NamedScopesHolder.getAllNamedScopeHolders(project)) { boolean changed = false; NamedScope[] scopes = holder.getScopes(); for (int i = 0; i < scopes.length; i++) { NamedScope scope = scopes[i]; PackageSet value = scope.getValue(); if (value != null && value.getClass().getClassLoader() == pluginClassLoader) { String presentableName = scope.getPresentableName(); scopes[i] = new NamedScope(scope.getScopeId(), () -> presentableName, AllIcons.Ide.LocalScope, new InvalidPackageSet(value.getText())); changed = true; } } if (changed) { holder.setScopes(scopes); } } } }