class ScopeELResolver extends ELResolver {

    @Override
    public Iterator<FeatureDescriptor> getFeatureDescriptors(ELContext context,
            Object base) {
        if (base != null) {
            List<FeatureDescriptor> retValue = Collections.emptyList();
            return retValue.iterator();
        }

        List<FeatureDescriptor> list = new ArrayList<FeatureDescriptor>();

        Request request = (Request) context
                .getContext(Request.class);
        for (String scope : request.getAvailableScopes()) {
            FeatureDescriptor descriptor = new FeatureDescriptor();
            descriptor.setDisplayName(scope + "Scope");
            descriptor.setExpert(false);
            descriptor.setHidden(false);
            descriptor.setName(scope + "Scope");
            descriptor.setPreferred(true);
            descriptor.setShortDescription("");
            descriptor.setValue("type", Map.class);
            descriptor.setValue("resolvableAtDesignTime", Boolean.FALSE);
            list.add(descriptor);
        }

        return list.iterator();
    }

}