Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [ECP / general modeling] How to model a bi-directional "related to" reference in EMF and E
[ECP / general modeling] How to model a bi-directional "related to" reference in EMF and E [message #874696] Mon, 21 May 2012 11:32 Go to next message
Christian Kurze is currently offline Christian KurzeFriend
Messages: 16
Registered: July 2009
Junior Member
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
  • Attachment: relatedTo.png
    (Size: 45.29KB, Downloaded 224 times)
Re: [ECP / general modeling] How to model a bi-directional "related to" reference [message #875171 is a reply to message #874696] Tue, 22 May 2012 09:07 Go to previous messageGo to next message
Jonas Helming is currently offline Jonas HelmingFriend
Messages: 699
Registered: July 2009
Senior Member
Hi Chris,
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
Re: [ECP / general modeling] How to model a bi-directional "related to" reference [message #875229 is a reply to message #875171] Tue, 22 May 2012 11:13 Go to previous message
Christian Kurze is currently offline Christian KurzeFriend
Messages: 16
Registered: July 2009
Junior Member
Hi Jonas,

thanks for your answer. I opened a bug:

bugs.eclipse.org/bugs/show_bug.cgi?id=380242


Best,
Chris
Previous Topic:[SOLVED] Ecore diagram editor missing in Eclipse 4.2?
Next Topic:[Texo] How to create ecore file with sub-packages?
Goto Forum:
  


Current Time: Fri Apr 26 21:00:08 GMT 2024

Powered by FUDForum. Page generated in 0.02934 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top