@Override protected void didChange() { if (lookUp != null) lookUp.setExportedObjects(exportedObjects); } };
public EObjectDescriptionLookUp get() { if(lookup != null) lookup.setExportedObjects(computeExportedObjects()); else lookup = new EObjectDescriptionLookUp(computeExportedObjects()); return lookup; } });
@Override protected EObjectDescriptionLookUp getLookUp() { if ((this.lookup == null)) { List<IEObjectDescription> _computeExportedObjects = this.computeExportedObjects(); EObjectDescriptionLookUp _eObjectDescriptionLookUp = new EObjectDescriptionLookUp(_computeExportedObjects); this.lookup = _eObjectDescriptionLookUp; } return this.lookup; }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated NOT */ public Iterable<IEObjectDescription> getExportedObjects(EClass type, QualifiedName name, boolean ignoreCase) { return getLookUp().getExportedObjects(type, name, ignoreCase); }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated NOT */ public Iterable<IEObjectDescription> getExportedObjectsByType(EClass type) { return getLookUp().getExportedObjectsByType(type); }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated NOT */ public Iterable<IEObjectDescription> getExportedObjectsByObject(EObject object) { return getLookUp().getExportedObjectsByObject(object); }
protected Map<QualifiedName, List<IEObjectDescription>> getNameToObjects() { if (nameToObjects == null) { synchronized (this) { if (nameToObjects == null) { Map<QualifiedName, List<IEObjectDescription>> nameToObjects = Maps.newHashMapWithExpectedSize(allDescriptions.size()); if (allDescriptions instanceof RandomAccess) { for(int i = 0; i < allDescriptions.size(); i++) { IEObjectDescription description = allDescriptions.get(i); putIntoMap(nameToObjects, description); } } else { for(IEObjectDescription description: allDescriptions) { putIntoMap(nameToObjects, description); } } this.nameToObjects = nameToObjects; } } } return this.nameToObjects; }
public boolean isEmpty() { return getLookUp().isEmpty(); }
public Iterable<IEObjectDescription> getExportedObjects(final EClass type, final QualifiedName name, boolean ignoreCase) { if (allDescriptions.isEmpty()) return Collections.emptyList(); QualifiedName lowerCase = name.toLowerCase(); List<IEObjectDescription> values = getNameToObjects().get(lowerCase); if (values == null) return Collections.emptyList(); Predicate<IEObjectDescription> predicate = ignoreCase ? new Predicate<IEObjectDescription>() { public boolean apply(IEObjectDescription input) { return EcoreUtil2.isAssignableFrom(type, input.getEClass()); } } : new Predicate<IEObjectDescription>() { public boolean apply(IEObjectDescription input) { return name.equals(input.getName()) && EcoreUtil2.isAssignableFrom(type, input.getEClass()); } }; return Iterables.filter(values, predicate); }
private EObjectDescriptionLookUp getLookUp() { if (lookUp == null) { lookUp = new EObjectDescriptionLookUp(getExportedObjects()); } return lookUp; }
public Iterable<IEObjectDescription> getExportedObjects(EClass type, QualifiedName name, boolean ignoreCase) { return getLookUp().getExportedObjects(type, name, ignoreCase); }
public Iterable<IEObjectDescription> getExportedObjectsByType(EClass type) { return getLookUp().getExportedObjectsByType(type); }
public Iterable<IEObjectDescription> getExportedObjectsByObject(EObject object) { return getLookUp().getExportedObjectsByObject(object); }
protected EObjectDescriptionLookUp getLookUp() { if (lookup == null) lookup = new EObjectDescriptionLookUp(computeExportedObjects()); return lookup; }
public Iterable<IEObjectDescription> getExportedObjects() { return getLookUp().getExportedObjects(); }
public EObjectDescriptionLookUp(List<IEObjectDescription> allDescriptions) { setExportedObjects(allDescriptions); }
@Override protected EObjectDescriptionLookUp getLookUp() { if (lookup == null) lookup = new EObjectDescriptionLookUp(computeExportedObjects()); return lookup; } };