Skip to main content



      Home
Home » Modeling » GMF (Graphical Modeling Framework) » Compartment and Generalization
Compartment and Generalization [message #149131] Wed, 05 September 2007 13:20 Go to next message
Eclipse UserFriend
Originally posted by: elena.renzi.gmail.com

Hi,
I have this problem: I have an Eclass in my ecore model that I call A,
which has an Ereference to some other object, instance of another Eclass,
that I call B. There is another Eclass in my Ecore model, C that is an
extension of B.
Now I'm creating some compartments in the node represents Eclass A, in the
first compartment I want to contains labels corresponding to Eclass B
references, and in the second compartment I want to contains labels
corresponding to Eclass C references. But when I add a type C label, this
one is also added in the compartment containing type B label, and if I
remove it from model I read a strange string..
I hope someone can help me and sorry for my english!
Thanks and regards,

Elena
Re: Compartment and Generalization [message #149139 is a reply to message #149131] Wed, 05 September 2007 13:54 Go to previous messageGo to next message
Eclipse UserFriend
Hi Elena,

could you tell us a bit more about how the data is accumulated which
is shown in the compartments? Normally the content of a compartment
doesnot change if you add a node to another compartment.

Apart from your current problem you may think about this:
If you want to show nodes of EClass B and C in separate compartments
that indicates that EClass B and C are used for different purposes.
Even if both classes share the same list of attributes etc. it may be
wrong to say that EClass B is the superclass of EClass C. You could
change your inheritance relationship by adding an EClass X which is
the superclass ofB and C and contains all the attributes etc. both B
and C share.
I don't know your actual metamodel but maybe by refactoring it as
Isuggest would make the whole task easier.

Hope that helps.
Nicolai


--

I'm trying a new usenet client for Mac, Nemo OS X.
You can download it at http://www.malcom-mac.com/nemo
Re: Compartment and Generalization [message #149403 is a reply to message #149131] Thu, 06 September 2007 07:17 Go to previous message
Eclipse UserFriend
Hi Elena,

Declaring two derived transient features in the A EClass (one to return
only C's and the other only for not-C's) may help. You will then use
these features as children feature of the NodeReference.

Best regards,
Boris


Elena wrote:
> Hi,
> I have this problem: I have an Eclass in my ecore model that I call A,
> which has an Ereference to some other object, instance of another
> Eclass, that I call B. There is another Eclass in my Ecore model, C that
> is an extension of B.
> Now I'm creating some compartments in the node represents Eclass A, in
> the first compartment I want to contains labels corresponding to Eclass
> B references, and in the second compartment I want to contains labels
> corresponding to Eclass C references. But when I add a type C label,
> this one is also added in the compartment containing type B label, and
> if I remove it from model I read a strange string..
> I hope someone can help me and sorry for my english!
> Thanks and regards,
>
> Elena
>
Previous Topic:Get the EditPart from the Model
Next Topic:Get the EditPart from the Model
Goto Forum:
  


Current Time: Tue May 13 15:04:05 EDT 2025

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

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

Back to the top