use of org.eclipse.sirius.viewpoint.description.RepresentationElementMapping in project InformationSystem by ObeoNetwork.
the class DBindingEditorCreationDescriptionImpl method getMappings.
/**
* {@inheritDoc}
*
* @see org.eclipse.sirius.viewpoint.description.tool.impl.RepresentationCreationDescriptionImpl#getMappings()
* @generated NOT
*/
@Override
public EList<RepresentationElementMapping> getMappings() {
if (this.eResource() == null) {
throw new UnsupportedOperationException();
}
ECrossReferenceAdapter crossReferencer = ECrossReferenceAdapter.getCrossReferenceAdapter(this.eResource().getResourceSet());
if (crossReferencer == null) {
throw new UnsupportedOperationException();
}
final List<RepresentationElementMapping> mappings = new LinkedList<RepresentationElementMapping>();
final Collection<Setting> settings = crossReferencer.getInverseReferences(this, true);
for (final Setting setting : settings) {
final EObject eReferencer = setting.getEObject();
final EStructuralFeature eFeature = setting.getEStructuralFeature();
if (eReferencer instanceof RepresentationElementMapping && eFeature.equals(org.eclipse.sirius.viewpoint.description.DescriptionPackage.eINSTANCE.getRepresentationElementMapping_DetailDescriptions())) {
mappings.add((RepresentationElementMapping) eReferencer);
}
}
return new BasicEList<RepresentationElementMapping>(mappings);
}
Aggregations