Skip to main content



      Home
Home » Modeling » GMF (Graphical Modeling Framework) » [solved] Connection Label from Reference Attribute(FowlerDSL: Event Name as Transition Label)
[solved] Connection Label from Reference Attribute [message #726054] Fri, 16 September 2011 09:26 Go to next message
Eclipse UserFriend
Hello,

I have build up a GMF editor for the XText FowlerDSL (Statemachine) example.
Up to now it looks quiet good.

The ecore model diagram is

http://www.familie-antoni.de/~jonatan/Statemachine.png

and a simple statemachine modeled with the GMF editor looks like

http://www.familie-antoni.de/~jonatan/example.png

Now I would like to display the Events name as connection label for the Transitions.

Therefore I added a Label and a Child Access to the TransitionFigure, like

- Figure Descriptor TransitionFigure
  - Polyline Connection TransitionFigureConnection
    - Label TransitionLabel
  - Child Access getFigureTransitionLabel


Next I tried to add a FeatureLabelMapping to the Transitions Link Mapping, like

- Link Mapping <Transition{Transition.state:State}/Transition>
  - Feature Label Mapping false
    * Features to display: ???
    * Features to edit: Event.name:EString


I can select the Events name as a "feature to edit". But the wizzard dialog for "Features to display" is empty.

Can somebody tell me whats going wrong here?

Thanks,
Jonatan

[Updated on: Mon, 19 September 2011 05:40] by Moderator

Re: Connection Label from Reference Attribute [message #726645 is a reply to message #726054] Mon, 19 September 2011 02:34 Go to previous messageGo to next message
Eclipse UserFriend
Hi,

try using a ExpressionLabel instead of a FeatureLabelMapping. You could have a expression like eReferenceName.featureToDisplay.

Ralph
Re: Connection Label from Reference Attribute [message #726689 is a reply to message #726645] Mon, 19 September 2011 05:39 Go to previous message
Eclipse UserFriend
Hello Ralph,

thank you for that advice, it works right away.

I had to implement the lable provider functions my self, because I did not figure out how to use those expressions within the mapping model.

Regards,
Jonatan
Previous Topic:Weird bug with Eclipse BPMN modeler in SetCommand.create
Next Topic:GMFMap constraints based on canvas object
Goto Forum:
  


Current Time: Sat Jul 05 04:50:20 EDT 2025

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

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

Back to the top