Moving Bendpoints [message #659245] |
Fri, 11 March 2011 11:11  |
Eclipse User |
|
|
|
After getting my copy and paste feature to work, I discovered that I had no good mechanism for moving FreeformConnections that had bendpoints. My search of the framework for support led me to the PeService's moveBendpoints() method. A little more searching and I discovered that the only place I could plug that in was in the preExecute or postExecute methods of the ToolBehaviorProvider.
That all seems reasonable, but I think there may be a bug in the way that the implementation in PeServiceImpl finds its set of candidate anchors. It calls another method of the service called getOutgoingConnections which packages the corresponding connections of the immediate child anchors of the passed AnchorContainer into a list. The anchors in my diagram are not direct children of the top level container, so they get missed by this process.
Over in the patterns plugin, there's a similar method called moveAllBendpoints(), that performs a recursive search for anchors using a private method called getAnchors(). If the PeService used the recursive search that moveAllBendpoints() uses, it would find my anchors and possibly move my connections.
Am I on the right track here? Should I log that as a bug? Or are there reasons that the search is flat? I can certainly implement my own moveBendpoints() method that performs the search the way I need it done.
|
|
|
|
|
|
|
Re: Moving Bendpoints [message #660491 is a reply to message #660401] |
Fri, 18 March 2011 11:59   |
Eclipse User |
|
|
|
Christian,
I am selecting some shapes using a marquee drag of the selection tool. I have tried both selecting the connections and leaving them unselected. In neither case have I seen the bendpoints move when I drag one of the shapes. Since you expect them to move, it seems likely that my diagram is structured atypically. Maybe if you could refer me to the code that you expect to be moving the bendpoints, I could figure out why it isn't working my diagram.
I don't have permission to attach a file, so I can't post a screen shot. But, it's not a complex picture. Just two rectangular shapes with connection ports on their sides and a freeform connection between them. Then connection has a couple of bendpoints in it to make it non-straight. I drag a marquee around the shapes to select them, add the connection to the selected set by CTRL-clicking it, and then drag one of the shapes. The shapes move, the points of the connection that are attached to the shape's anchors move, but the bendpoints in the middle of the connection remain behind.
--Rhett
|
|
|
|
|
Re: Moving Bendpoints [message #760829 is a reply to message #661893] |
Mon, 05 December 2011 06:56  |
Eclipse User |
|
|
|
Hi,
Me too having the same problem in GEF. Connected two shapes with bendPoint connection, while moving source shape or target shape, the connection starts moving except the bendPoints. ie myself using absolute Bendpoint while opening the editor because figure bounds is always 0 while opening the editor, if user does any action then I have handled it with relative bend point. I hope now you have understood my problem. If you know any solution or suggession, kindly reply me.
Thanks & Regards,
Karthikeyan.B
[Updated on: Tue, 03 January 2012 02:22] by Moderator
|
|
|
Powered by
FUDForum. Page generated in 0.36362 seconds