l1sq0u48
l1sq0u48

Reputation: 381

GEF : How to programmatically create a connection?

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 !

Upvotes: 1

Views: 283

Answers (2)

GiangLP
GiangLP

Reputation: 89

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

Upvotes: 0

Michael
Michael

Reputation: 5072

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.

Upvotes: 1

Related Questions