@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)); }
@Override protected EObjectDescriptionLookUp getLookUp() { if (lookup == null) { lookup = new PatternAwareEObjectDescriptionLookUp(computeExportedObjects()); } return lookup; }
@Override protected EObjectDescriptionLookUp getLookUp() { if (lookup == null) { lookup = new PatternAwareEObjectDescriptionLookUp(ImmutableList.<IEObjectDescription> of()); lookup.setExportedObjects(computeExportedObjects()); } return lookup; }
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); }