GEF : How to programmatically create a connection?

270 views Asked by At

I would like to create an Eclipse cheatsheet which explain how to create two tiles and connect them.

I successfully coded a command which create the two tiles but not the command to create a connection between the two tiles (i.e : source and target EditPart) in my GEF DiagramEditPart.

Does someone know how to do this or have a code example with explanations to provide ?

Thank you all in advance !

2

There are 2 answers

1
Michael On

To learn GEF I found it very helpful to go through this GEF tutorial. However, it does not cover connections but here is an extension of this tutorial which exactly describes this. There is also a great blog series about creating a GEF editor which handles connections here.

0
GiangLP On

I think you should take a look at the logics/shapes example that provided by GEF. I found those sample code together with vainolo series are the most helpful