Skip to main content



      Home
Home » Modeling » GMF (Graphical Modeling Framework) » Transitions with Guards in StateMachines
Transitions with Guards in StateMachines [message #187904] Tue, 20 May 2008 07:49 Go to next message
Eclipse UserFriend
Originally posted by: hedayati.tzi.de

Hi,

I try to build a statemachine with gmf. Therefor I have defined an
Ecore-Class Transition with a reference (containment) to an Ecore-Class
Expression (like clas Constraint) for a guard of the transition and a
reference to an Ecore-Class Action for an effect that could be triggered.

The usual way is to map the Transition as a link, but if I do so, there
is no way to specify a guard or an effect for the transiton. I can only
add attributes to the Transition Ecore-Class for an effect or a guard,
but they are only EString or Strings with no reference to the above
mentioned Ecore-Classes.


Thanks and best regards

Ramin
Re: Transitions with Guards in StateMachines [message #187919 is a reply to message #187904] Tue, 20 May 2008 08:07 Go to previous messageGo to next message
Eclipse UserFriend
Hello Ramin,

I think it's not a problem to add containment reference to Transition Ecore-Class
- the question is how to make GMF displace corresponding child element properties
as a link label.

Elegant solution is: add derived transient volatile attribute "guard" into
Transition Ecore-Class and implement corresponding getGuard()/setGuard()
methods in generated TransitionImpl class to parse passed string implementation
and set create corresponding child elements/set their properties.

Another possible solution (if you can not modify meta-model) is: plug in
custom parser doing this parsing/creating elemtns..

-----------------
Alex Shatalin
Re: Transitions with Guards in StateMachines [message #187926 is a reply to message #187904] Tue, 20 May 2008 08:16 Go to previous message
Eclipse UserFriend
Originally posted by: hedayati.tzi.de

Sorry,

I forgot the question:

is there a way to get a guard and an effect to the Transition Connection
in the mapping, so that guard is an Expression and effect is an Action
(reference this class)?

Regards

Ramin

Ramin Hedayati schrieb:
> Hi,
>
> I try to build a statemachine with gmf. Therefor I have defined an
> Ecore-Class Transition with a reference (containment) to an Ecore-Class
> Expression (like clas Constraint) for a guard of the transition and a
> reference to an Ecore-Class Action for an effect that could be triggered.
>
> The usual way is to map the Transition as a link, but if I do so, there
> is no way to specify a guard or an effect for the transiton. I can only
> add attributes to the Transition Ecore-Class for an effect or a guard,
> but they are only EString or Strings with no reference to the above
> mentioned Ecore-Classes.
>
>
> Thanks and best regards
>
> Ramin
Previous Topic:What's an SCR?
Next Topic:Creating a very special Custom Figure
Goto Forum:
  


Current Time: Fri Jul 11 23:40:30 EDT 2025

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

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

Back to the top