Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community Forums[ECP / general modeling] How to model a bi-directional "related to" reference in EMF and E
https://www.eclipse.org/forums/index.php/mv/msg/353826/874696/#msg_874696
my idea is the following: I would like to manage different terms within a glossary. The terms can be related to each other. For example, I want to create a Term 'Customer' that is related to 'Client'. In my (ECP) frontend I would like to show all related terms to 'Customer' (which is 'Client') but also all related terms to 'Client' (which is 'Customer').
Therefore, I have the following metamodel (extract):
The frontend works as specified, I can see 'Client' as 'relatedTerm' when opening 'Customer'; and I can see 'Customer' as 'relatedTerm1' when opening 'Client'.
But, I would like to see just one attribte 'relatedTerms'. How to solve this in EMF/ECP with EMF standards (maybe derived attributes?). An alternative solution will be writing a custom widget.
To illustrate my question, I attached a screenshot of the front-end and the metamodel.
Thanks in advance,
Chris]]>Christian Kurze2012-05-21T11:32:25-00:00Re: [ECP / general modeling] How to model a bi-directional "related to" reference
https://www.eclipse.org/forums/index.php/mv/msg/353826/875171/#msg_875171
the way to go would be to create a custom widget. A derived attribut
would not work, as it would not be editable. As we already had this
requirement in the past, I am considering to create a general mechnism
for this kind of reference in the EMF Client Platform. Could you create
a BR for this?
Regards
Jonas
Am 21.05.2012 13:32, schrieb Christian Kurze:
> Hi,
>
> my idea is the following: I would like to manage different terms within a glossary. The terms can be related to each other. For example, I want to create a Term 'Customer' that is related to 'Client'. In my (ECP) frontend I would like to show all related terms to 'Customer' (which is 'Client') but also all related terms to 'Client' (which is 'Customer').
>
> Therefore, I have the following metamodel (extract):
>
> GlossaryTerm
> ============
> attribute: name : EString
> reference: relatedTerms : GlossaryTerms (opposite:relatedTerms1)
> reference: relatedTerms1 : GlossaryTerms (opposite:relatedTerms)
>
> The frontend works as specified, I can see 'Client' as 'relatedTerm' when opening 'Customer'; and I can see 'Customer' as 'relatedTerm1' when opening 'Client'.
>
> But, I would like to see just one attribte 'relatedTerms'. How to solve this in EMF/ECP with EMF standards (maybe derived attributes?). An alternative solution will be writing a custom widget.
>
> To illustrate my question, I attached a screenshot of the front-end and the metamodel.
>
>
> Thanks in advance,
>
> Chris]]>Jonas Helming2012-05-22T09:07:09-00:00Re: [ECP / general modeling] How to model a bi-directional "related to" reference
https://www.eclipse.org/forums/index.php/mv/msg/353826/875229/#msg_875229
thanks for your answer. I opened a bug: