|
Re: Why the editor I created cannot display relation based edges? [message #1851956 is a reply to message #1851798] |
Fri, 22 April 2022 19:05   |
|
Hello,
Can you check the class com.obeodesigner.sample.family.impl.PersonImpl.getFather() from your version of the metamodel. As it is a derived reference, you need to write the code on how to reference this. In the provided metamodel, you will have this:
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Man getFather() {
Man father = basicGetFather();
return father != null && father.eIsProxy() ? (Man)eResolveProxy((InternalEObject)father) : father;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated NOT
*/
public Man basicGetFather() {
if (!getParents().isEmpty()) {
for (Person parent : getParents()) {
if (parent instanceof Man) {
return (Man) parent;
}
}
}
return null;
}
Maybe your version is missing the second method (generated NOT) that filters the getParents() method to keep only Man element. Of course, you need the same for the morther reference.
Best regards,
Steve
Steve Monnier - Obeo Canada
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
|
|
|
|
Powered by
FUDForum. Page generated in 0.01789 seconds