Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » ports
ports [message #221327] Thu, 12 March 2009 16:48 Go to next message
Frantisek Kocun is currently offline Frantisek KocunFriend
Messages: 16
Registered: July 2009
Junior Member
Hi,
I'm new to GMF, and absolutely know nothing about GEF. My question is: How
to make a shape with some connection points. I mean something similar as
in "logic example" but that is in GEF. I want to have a shape with ports
to which a connection can be added. I want to make target ports occupied
if there is a connection and more connection to be able from source ports.
But in EMF model I want to store it as a collection of connections (so in
EMF I don't care to which port exactly is the connection connected). Is it
possible, with use of GMF?

Thanks

Fero
Re: ports [message #221370 is a reply to message #221327] Fri, 13 March 2009 12:37 Go to previous messageGo to next message
Alexander Shatalin is currently offline Alexander ShatalinFriend
Messages: 2928
Registered: July 2009
Senior Member
Hello Frantisek,

It is possible to generate code placing child element from the domain model
onto the border of it's parent. To do that you have to set AffixedParentSide
property in .gmfgraph model.
If you need to create these port only on a diagram without any connection
with domain model elements then you probably have to code it manually.

-----------------
Alex Shatalin
Re: ports [message #221406 is a reply to message #221370] Fri, 13 March 2009 16:46 Go to previous messageGo to next message
Frantisek Kocun is currently offline Frantisek KocunFriend
Messages: 16
Registered: July 2009
Junior Member
Hi Alex, thanks for advice I will look at it. But I think you suggest that
port would be in a model as a child of a node. That's not what I want (I
want only connections to be many attribute in my model). It should only be
in graphics representation.

Or maybe I won't use the ports. Is it possible to make a node that all
incoming connections will be routed to the left side and all outgoing
leaving from right side?

Thanks for answers

Fero
Re: ports [message #221414 is a reply to message #221406] Fri, 13 March 2009 17:05 Go to previous messageGo to next message
Alexander Shatalin is currently offline Alexander ShatalinFriend
Messages: 2928
Registered: July 2009
Senior Member
Hello Frantisek,

> Or maybe I won't use the ports. Is it possible to make a node that all
> incoming connections will be routed to the left side and all outgoing
> leaving from right side?
I think it should be possible by using/implementing appropriate ConnectionAnchor.
See org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure.getConnect ionAnchor()/getConnectionAnchorTerminal()
+ try searching in this neasgroup for the related postings.

-----------------
Alex Shatalin
Re: ports [message #221440 is a reply to message #221414] Fri, 13 March 2009 21:45 Go to previous message
Frantisek Kocun is currently offline Frantisek KocunFriend
Messages: 16
Registered: July 2009
Junior Member
Thanks Alex, I will search and post a solution if I find it.
Previous Topic:[Announce] GMF 2.2.0 I200903131142 is available
Next Topic:Capture mouse events on GMF canvas/palette
Goto Forum:
  


Current Time: Thu Apr 25 16:16:57 GMT 2024

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

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

Back to the top