NamedScopesHolder (Project project, String scopeId, NamedScopesHolder defaultHolder) { NamedScopesHolder[] holders = getAllNamedScopeHolders(project); for (NamedScopesHolder holder : holders) { NamedScope scope = holder.getScope(scopeId); if (scope != null) { return holder; } } return defaultHolder; }