gmf [message #520464] |
Fri, 12 March 2010 13:52 |
Lishan Messages: 9 Registered: March 2010 |
Junior Member |
|
|
I'm a bit stuck and I wondered if you might have some ideas.
I am developing a dsl with EMF/GMF that has states that can have nested states and transitions between the states. I am happy with the ecore model but the final diagramming tool isnt working properly. It wont allow me to draw transitions between states that are nested within another state. eg. I have state1 containing state2 and state3 and I want to draw a transition between state2 and state3.
When you run the diagram tool it creates 2 files, the diagram file and the ecore model file. If I edit the data model to add a transition between nested states, then redisplay the diagram it displays the new nested transition correctly but when I am using the diagram application it prohibits me from creating a transition between nested states.
I guess I need to change one of gmfgraph, gmftool, gmfmap.
emf description of model
@namespace(uri="SMNEW1", prefix="SMNEW1")
package SMNEW1;
class StateMachine {
!ordered val State[*] states;
}
class State {
attr String name;
!ordered ref Transition[*]#source outgoing;
!ordered val Transition[*]#target incoming;
!ordered val State[*] substates;
}
class Transition {
attr String name;
!ordered ref State#outgoing source;
!ordered ref State#incoming target;
}
In gmfgraph I define Figure descriptors for State and Transition and specify Transition as a Connection and State as a Node.
In gmftool I specify a creation tool for State
In gmfmap there is a topnode reference for State with a child Node Mapping for State this has a child reference with substates as the containment feature.
There is link mapping from source to target for Transition with state.incoming as the containment feature and the Diagram Link is the connection Transition
I have done exactly as suggested here http://wiki.eclipse.org/GMF_MapModel_Hints for "Show children elements from non-containment feature" and "Endless/recursive hierarchies" and the states are nesting perfectly but I am not able to create transitions between the nested states in the generated diagramming application. I am able to create them in the data model however and they display correctly in the diagramming application.
Thanks
[Updated on: Fri, 12 March 2010 14:37] Report message to a moderator
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03703 seconds