Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Question about compartment
Question about compartment [message #194665] Thu, 26 June 2008 11:01 Go to next message
Toan is currently offline ToanFriend
Messages: 36
Registered: July 2009
Member
Hi everyone,
I have three classes A, B and C. Class A has two compartments for each
type B and C. Class C inherits from class B. I have a problem: when I
create an instance of class C in its compartment in A, the application
generated by GMF also creates a copy of this instance (which is this
instance itself) in the compartment of B in A. Can anyone help me to avoid
creating this copy in the compartment of B? Thanks in advance!
Toan.
Re: Question about compartment [message #194716 is a reply to message #194665] Thu, 26 June 2008 11:32 Go to previous messageGo to next message
Alexander Shatalin is currently offline Alexander ShatalinFriend
Messages: 2928
Registered: July 2009
Senior Member
Hello Toan,

Do you have constraint specified for node mapping of element B? It should
be something like: "not self.oclIsKindOf(<domainmodelname>::C)".

-----------------
Alex Shatalin
Re: Question about compartment [message #194723 is a reply to message #194716] Thu, 26 June 2008 12:17 Go to previous messageGo to next message
Toan is currently offline ToanFriend
Messages: 36
Registered: July 2009
Member
Thanks Alex,
Now I can avoid that. I also want to know how to prevent from dragging an
element in a compartment to another compartment. It's is because that A
has another compartment, and when I drag instances of B or C into it,
these instances will also go into this compartment.
Toan.
Re: Question about compartment [message #194738 is a reply to message #194723] Thu, 26 June 2008 16:02 Go to previous message
Alexander Shatalin is currently offline Alexander ShatalinFriend
Messages: 2928
Registered: July 2009
Senior Member
Hello Toan,

Have no idea about D&D :-) Try to debugging one of the EditPolicies installed
on the Compartment.

-----------------
Alex Shatalin
Previous Topic:Font Color of a Label
Next Topic:how to write constraints in OCL
Goto Forum:
  


Current Time: Fri Apr 26 07:15:40 GMT 2024

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

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

Back to the top