Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Can GMF code generator support this scenario
Can GMF code generator support this scenario [message #524062] Tue, 30 March 2010 14:10
Swavek  is currently offline Swavek Friend
Messages: 20
Registered: March 2010
Junior Member
I started with a simple model based on XSD file and successfully generated code which produces diagram editor. However now I need to make further changes and ran into trouble in expressing the refined model. My model contains processing nodes connected by the data streams. These data streams are not connected to the centers of nodes but to separate input and output ports on the border. I found the logic example which has terminals on LEDs and that is precisely what I need to accomplish. My outer most container corresponding to canvas is a Network, which contains a list of Nodes and a list of Streams. The nodes contain a list of InputPort and a list of OutputPort objects. The Streams identify the ports to which they connect, using a two part identifier: node id & port id, so there isn't a single feature which defines which port the stream connects to - there is no InputPort or OutputPort in the Stream definition.

If I don't define link mapping for a stream in gmfmap, then gmfgen and final diagram code generation works. But if I define it then I get errors during code generation. I validated gmfgraph, gmftool, gmfmap and gmfgen before code generation and all of them are fine, but the diagram code generation still failed. When I do define link mapping I only get an option to map Source & Target Feature to inputPortId (string) or inputNodeId (string), so the link definition is incomplete.

Here is how I define it in gmfmap using Link mapping:

Containment Feature: 0..* Network.streams:Stream
Element: Stream
Source Feature: Stream.outputPortId:String
Target Feature: Stream.inputPortId:String
Diagram Link: Connection Stream
Tool: Creation Tool Stream

My question is: Is it possible to express such relationship so that code generation works correctly?


Previous Topic:Change linestyle
Next Topic:Validation - diagram element decorator problem
Goto Forum:

Current Time: Wed Apr 21 11:21:49 GMT 2021

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

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

Back to the top