Java 类org.eclipse.xtext.resource.impl.EObjectDescriptionLookUp 实例源码

项目:statecharts    文件:AbstractLibraryGlobalScopeProvider.java   
@Override
public IScope getScope(Resource context, EReference reference, Predicate<IEObjectDescription> filter) {
    List<IEObjectDescription> descriptions = Lists.newArrayList();
    for (URI uri : getValidLibraries(context)) {
        try {
            Iterables.addAll(descriptions, libraryCache.get(uri, new Callable<Iterable<IEObjectDescription>>() {

                @Override
                public Iterable<IEObjectDescription> call() throws Exception {
                    return getDescriptions(context, uri);
                }
            }));
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
    return SelectableBasedScope.createScope(IScope.NULLSCOPE, new EObjectDescriptionLookUp(descriptions),
            reference.getEReferenceType(), isIgnoreCase(reference));
}
项目:dsl-devkit    文件:FixedCopiedResourceDescription.java   
@Override
protected EObjectDescriptionLookUp getLookUp() {
  if (lookup == null) {
    lookup = new PatternAwareEObjectDescriptionLookUp(computeExportedObjects());
  }
  return lookup;
}
项目:dsl-devkit    文件:SimpleResourceDescription.java   
@Override
protected EObjectDescriptionLookUp getLookUp() {
  if (lookup == null) {
    lookup = new PatternAwareEObjectDescriptionLookUp(computeExportedObjects());
  }
  return lookup;
}
项目:dsl-devkit    文件:ResourceDescription2.java   
@Override
protected EObjectDescriptionLookUp getLookUp() {
  if (lookup == null) {
    lookup = new PatternAwareEObjectDescriptionLookUp(ImmutableList.<IEObjectDescription> of());
    lookup.setExportedObjects(computeExportedObjects());
  }
  return lookup;
}
项目:statecharts    文件:STextScopeProvider.java   
public IScope scope_ActiveStateReferenceExpression_value(EObject context, EReference reference) {
    Statechart statechart = getStatechart(context);
    if (statechart == null)
        return IScope.NULLSCOPE;
    List<State> allStates = EcoreUtil2.getAllContentsOfType(statechart, State.class);
    IScope scope = Scopes.scopeFor(allStates, nameProvider, IScope.NULLSCOPE);
    return new ImportScope(getActiveStateNormalizer(context), scope,
            new EObjectDescriptionLookUp(Lists.newArrayList(scope.getAllElements())), reference.getEReferenceType(),
            false);
}