Skip to main content



      Home
Home » Modeling » EMF » Reference depending on parent reference
Reference depending on parent reference [message #932665] Thu, 04 October 2012 06:01 Go to next message
Eclipse UserFriend
Hello,

I have a EClass A, which contains a list of containment reference to EClass B.
On the other side I have a EClass C, which contains a list of containment references to EClass D.

EClass C can reference elements of A.
D can reference elements of B.

Is there a possibility, that if C reference on specific A, that D only can reference on the elements contained by A?
Re: Reference depending on parent reference [message #932710 is a reply to message #932665] Thu, 04 October 2012 06:56 Go to previous messageGo to next message
Eclipse UserFriend
John,

Comments below.

On 04/10/2012 12:01 PM, John M. wrote:
> Hello,
>
> I have a EClass A, which contains a list of containment reference to
> EClass B.
> On the other side I have a EClass C, which contains a list of
> containment references to EClass D.
>
> EClass C can reference elements of A.
> D can reference elements of B.
>
> Is there a possibility, that if C reference on specific A, that D only
> can reference on the elements contained by A?
You can always limit the choices made available by D's item provider's
getChoiceOfValues.
Re: Reference depending on parent reference [message #932733 is a reply to message #932665] Thu, 04 October 2012 07:26 Go to previous messageGo to next message
Eclipse UserFriend
I can't find that method in the ItemProvider.
I think you mean to overwrite the getChoiceOfValues in the corresponding ItemPropertyDescriptor.
Re: Reference depending on parent reference [message #932750 is a reply to message #932733] Thu, 04 October 2012 07:46 Go to previous message
Eclipse UserFriend
Oops, yes.

On 04/10/2012 1:26 PM, John M. wrote:
> I can't find that method in the ItemProvider.
> I think you mean to overwrite the getChoiceOfValues in the
> corresponding ItemPropertyDescriptor.
Previous Topic:One Model editor with derived models
Next Topic:EContentAdapter does not notify EAttributes List Elements changes previously added
Goto Forum:
  


Current Time: Sun Nov 09 14:03:25 EST 2025

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

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

Back to the top