Skip to main content



      Home
Home » Modeling » GMF (Graphical Modeling Framework) » Multiple EOpposite?
Multiple EOpposite? [message #62738] Sun, 15 October 2006 11:58 Go to next message
Eclipse UserFriend
Originally posted by: greenl.mot.com

Here is my problem:

I have a state model defined as something like:

public abstract class State {
public NormalState superState; // containment := false; EOpposite :=
subStates AND entryState? ;
}
public class InitialState extends State {}
public class NormalState extends State {
public InitialState entryState; // containment:=true; EOpposite :=
superState
public EList<State> subStates; // containment:=true; EOpp:=superState
}
public class FinalState extends State {}

My question is since both NormalState::entryState and NormalState::subStates
has EOpposite set to State::superState, but State::superState can only set
it's EOpposite to either NormalState::entryState or NormalState::subStates.
Is there any plan to support this kind of multiple EOpposite mapping.

Just FYI, my ecore model set State::superState {EOpposite :=
NormalState::subStates}, it basically works until I try to remove an entry
state (s0) of a normal state (s1) from the view. I found it looks like s0
has been removed from s1, but it is not the truth, the phantom of s0 still
remains in the domain model. The next time I open the diagram, it comes out
again. It would not be the case for other kind of sub states of s1, say an
internal normal state s3 and an internal final state s4 can be removed
correctly.

Thanks,
Green
Re: Multiple EOpposite? [message #62762 is a reply to message #62738] Sun, 15 October 2006 12:48 Go to previous message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

Green,

No, this can't be supported and won't ever be supported.
EObject.eContainer represents the implicit opposite of any containment
reference and any explicit opposite of a containment reference is
effectively just a view of this value with a guard to check that the
EObject.eContainmentFeature is really the correct one. So you could
certainly define a derived volatile transient feature to represent the
containing State, but you won't ever be able to share opposites among
several references since the opposite of the opposite must be the
original starting feature...


Green Law wrote:
> Here is my problem:
>
> I have a state model defined as something like:
>
> public abstract class State {
> public NormalState superState; // containment := false; EOpposite :=
> subStates AND entryState? ;
> }
> public class InitialState extends State {}
> public class NormalState extends State {
> public InitialState entryState; // containment:=true; EOpposite :=
> superState
> public EList<State> subStates; // containment:=true; EOpp:=superState
> }
> public class FinalState extends State {}
>
> My question is since both NormalState::entryState and NormalState::subStates
> has EOpposite set to State::superState, but State::superState can only set
> it's EOpposite to either NormalState::entryState or NormalState::subStates.
> Is there any plan to support this kind of multiple EOpposite mapping.
>
> Just FYI, my ecore model set State::superState {EOpposite :=
> NormalState::subStates}, it basically works until I try to remove an entry
> state (s0) of a normal state (s1) from the view. I found it looks like s0
> has been removed from s1, but it is not the truth, the phantom of s0 still
> remains in the domain model. The next time I open the diagram, it comes out
> again. It would not be the case for other kind of sub states of s1, say an
> internal normal state s3 and an internal final state s4 can be removed
> correctly.
>
> Thanks,
> Green
>
>
>
>
>
Previous Topic:How do I implement complex model changes via EOperations?
Next Topic:ExecutionStrategy.execute returns Collections.EMPTY_LIST
Goto Forum:
  


Current Time: Fri Jul 04 12:55:14 EDT 2025

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

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

Back to the top