Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [gmf-dev] Source and Target of a connection should know about the connection

Hi,

sorry for posting it here. 
But thanks anyway for the answere. Works exactly like I wanted it :) 

-Artur


> Hi!
> 
> Please use newsgroup for such kind of questions in future.
> Answering your question - try modifying EMF model and setting eOpposit
> reference for connection(0..1)---->node(targetNode) pointing to
> node(0..*)------> connection (incoming). After this you have to
> regenerate code.
> As a result reference from target node to incoming connection will be
> automatically set by EMF-generated code on setting "targetNode"
> reference of the connection.
> 
> -------
> Alex Shatalin
> 
> On Fri, Aug 21, 2009 at 4:38 PM, Artur
> Kronenberg<artur.kronenberg@xxxxxx> wrote:
> > Hi,
> >
> > I am trying to generate a GMF editor for two days now. My problem is, that one of the requirements are, that I can follow the nodes to the begining and the end. So my way of solving that problem would be to let the nodes know what connections are going in and out. That way I could follow the connections which have targets and sources to get to the next nodes.
> >
> > (I don't know if I can add pictures here, so I try to describe my ecore model:)
> >
> > I have a main template, that knows about his nodes.
> >
> > the nodes know about the components with two connections (0..*), incomingConnections and outgoingConnections. The Connections know about the nodes (0..1) as sourceNode and targetNode:
> >
> > template (0..*)<>--> node
> >
> > node(0..*)<>--> connection (outgoing)
> > node(0..*)------> connection (incoming)
> >
> > connection(0..1)---->node(sourceNode)
> > connection(0..1)---->node(targetNode)
> >
> > For me this seems to be the right approach, though I might as well be very wrong. When I generate my models out of this, I am able to map the outgoing Connections to the source Node. However it seems that I am not able to map the incoming relationships to the target node.
> > My state so far is, that every source node contains a list of its outgoing connections and every connection contains a source and a target. So I can go through the nodes from the first to the last. But a target node does not know about its previous connected nodes.
> >
> > Help is very appreciated :)
> >
> > Artur
> > ________________________________________________________________
> > Neu: WEB.DE Doppel-FLAT mit Internet-Flatrate + Telefon-Flatrate
> > für nur 19,99 Euro/mtl.!* http://produkte.web.de/go/02/
> >
> > _______________________________________________
> > gmf-dev mailing list
> > gmf-dev@xxxxxxxxxxx
> > https://dev.eclipse.org/mailman/listinfo/gmf-dev
> >
> _______________________________________________
> gmf-dev mailing list
> gmf-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/gmf-dev
> 


______________________________________________________
GRATIS für alle WEB.DE-Nutzer: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://movieflat.web.de



Back to the top