List<NamedScope> () { List<NamedScope> result = new ArrayList<>(); result.add(ProjectProductionScope.INSTANCE); result.add(TestsScope.INSTANCE); result.add(CustomScopesProviderEx.getAllScope()); result.add(new NamedScope(SCOPE_CLASS, () -> LangBundle.message("this.class.scope.name"), AllIcons.Ide.LocalScope, null)); result.add(new NamedScope(SCOPE_MODULE, () -> LangBundle.message("this.module.scope.name"), AllIcons.Ide.LocalScope, null)); NamedScopesHolder[] holders = NamedScopesHolder.getAllNamedScopeHolders(myProject); for (NamedScopesHolder holder : holders) { NamedScope[] scopes = holder.getEditableScopes(); //predefined scopes already included Collections.addAll(result, scopes); } return result; }