Java 类org.eclipse.xtext.scoping.impl.MultimapBasedSelectable 实例源码

项目:CooperateModelingEnvironment    文件:CooperateImportedNamespaceAwareLocalScopeProvider.java   
@Override
protected ISelectable internalGetAllDescriptions(Resource resource) {
    Iterable<EObject> allContents = new Iterable<EObject>() {
        @Override
        public Iterator<EObject> iterator() {
            return EcoreUtil.getAllContents(resource, false);
        }
    };
    Iterable<IEObjectDescription> allDescriptions = Scopes.scopedElementsFor(allContents,
            this.getQualifiedNameProvider());

    Iterable<IEObjectDescription> allAliasedDescriptions = new Iterable<IEObjectDescription>() {
        @Override
        public Iterator<IEObjectDescription> iterator() {
            return Streams.stream(allDescriptions)
                    .map(CooperateImportedNamespaceAwareLocalScopeProvider::createAliasedDescription).iterator();
        }
    };

    return new MultimapBasedSelectable(allAliasedDescriptions);
}
项目:xtext-extras    文件:XbaseImportedNamespaceScopeProvider.java   
protected ISelectable internalGetAllDescriptions(final Resource resource) {
    Iterable<EObject> allContents = new Iterable<EObject>(){
        @Override
        public Iterator<EObject> iterator() {
            return EcoreUtil.getAllContents(resource, false);
        }
    }; 
    Iterable<IEObjectDescription> allDescriptions = Scopes.scopedElementsFor(allContents, qualifiedNameProvider);
    return new MultimapBasedSelectable(allDescriptions);
}
项目:xtext-extras    文件:XImportSectionNamespaceScopeProvider.java   
protected ISelectable internalGetAllDescriptions(final Resource resource) {
    Iterable<EObject> allContents = new Iterable<EObject>(){
        @Override
        public Iterator<EObject> iterator() {
            return EcoreUtil.getAllContents(resource, false);
        }
    }; 
    Iterable<IEObjectDescription> allDescriptions = Scopes.scopedElementsFor(allContents, qualifiedNameProvider);
    return new MultimapBasedSelectable(allDescriptions);
}