Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Realizing simple bendable connections
Realizing simple bendable connections [message #1794270] Tue, 28 August 2018 11:18
Robert Stelzmann is currently offline Robert StelzmannFriend
Messages: 3
Registered: July 2018
Junior Member
Hey guys,

I'm currently building a really simple diagram editor allowing the user to create nodes and connect them with edges. Now, I want to allow my users to create new bend points on edges and drag them around to enable them to do some simple kind of layouting. The resulting connection should be rendered as a list of straight lines connecting these bend points. Hence, nothing special so far. I investigated the logo example but the example is already quite complex and it's hard to extract the relevant code/configuration.

My connection visual derives from Connection and does nothing interesting. My connection part implements IBendableContentPart and thus get/setContentBendPoints. Furthermore, my doRefreshVisual implementation is straightforward:
    protected void doRefreshVisual(final ConnectionVisual visual) {

    public List<BendPoint> getContentBendPoints() {
        return getContent().getWaypoints().stream()
                .map(waypoint -> new BendPoint(waypoint))

    public void setContentBendPoints(final List<BendPoint> bendPoints) {

Finally, I tried to configure the Module likewise in the logo example. Here is the connection-related part:
    protected void bindConnectionPartAdapters(final MapBinder<AdapterKey<?>, Object> adapterMapBinder) {
        // geometry provider for selection feedback
        // geometry provider for selection handles
        // geometry provider for hover feedback
        // geometry provider for focus feedback

        // transaction policy for resize + transform


        // interaction handler to relocate on drag

        // drag individual segments


        // clickable area resizing

I'm absolutely not sure which Policies/Handlers/Behaviours I do need. By the way, some more documentation explaining their relations and interdependencies would be really helpful!

So, the whole stuff isn't working very well. At least, the edges get correctly displayed and hovered and I see a circle bend point in the middle. But the bend point is neither draggable nor is it possible to create new bend points. Can you guys give me a hint how to realize the described behaviour? Which Handlers/Policies/Behaviours do I need on the connection part? Do I have to configure the CircleSegmentHandlePart (like in the example)?
Previous Topic:Connection: how to update control points
Next Topic:GEF/ZEST more complex examples/projects
Goto Forum:

Current Time: Wed Nov 14 21:22:43 GMT 2018

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

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

Back to the top