Skip to main content



      Home
Home » Modeling » Graphiti » FixPointAnchorEditPart does not override getDragTracker
FixPointAnchorEditPart does not override getDragTracker [message #756684] Mon, 14 November 2011 11:33 Go to next message
Eclipse UserFriend
Because FixPointAnchorEditPart does not override getDragTracker, (as does BoxRelativeAnchorEditPart) the drag-and-drop features (as the connection creation, as explained in the tutorial) don't work with FixPointAnchors, only with BoxRelativeAnchor. Seems a bug to me.

I made a blind copy-paste from BoxRelativeAnchorEditPart.getDragTracker() and it worked , but perhaps there're are subtle issues I'm missing. In any case, it would be ugly to have this code duplication.

More in general, I'm not very confortable with FixPointAnchor/BoxRelativeAnchor being different classes (and with its editpart counterparts), is that really necesary? Their difference, to me, is just a different algorithm for computing its position, which could be more simply specified as a boolean property, or by different position fields.

Apart from implementation simplicity, it's also a flexibility thing.
Case in point: in my application I wanted an anchor to be placed at an absolute vertical position, and a relative horizontal position (say, on the left and right sides of a rectangle which width -only- is resizable). My ideal would have been an anchor that allows to specifiy a fixed vertical position and a relative horizontal position. Which now is impossible, of course.

[Updated on: Mon, 14 November 2011 11:33] by Moderator

Re: FixPointAnchorEditPart does not override getDragTracker [message #756804 is a reply to message #756684] Tue, 15 November 2011 03:08 Go to previous messageGo to next message
Eclipse UserFriend
See https://bugs.eclipse.org/bugs/show_bug.cgi?id=349416
Re: FixPointAnchorEditPart does not override getDragTracker [message #756983 is a reply to message #756804] Tue, 15 November 2011 15:28 Go to previous messageGo to next message
Eclipse UserFriend
Felix Velasco wrote on Tue, 15 November 2011 05:08
See https://bugs.eclipse.org/bugs/show_bug.cgi?id=349416


Oops, thanks.
Re: FixPointAnchorEditPart does not override getDragTracker [message #757078 is a reply to message #756983] Wed, 16 November 2011 06:58 Go to previous messageGo to next message
Eclipse UserFriend
No need to "oops". But I'm sure the bug could use some feedback, I'm not sure how Michael is going to handle it.

(hint: Michael, please move getDragTracker up to AnchorEditPart...)
Re: Fixed [message #758021 is a reply to message #756684] Mon, 21 November 2011 10:41 Go to previous messageGo to next message
Eclipse UserFriend
Sounds indeed like a gap in functionality. Would you open an bugzilla for
that?

The flexibility you are requesting would indeed nice to have; the main
reason I see for having two different classes is that they are mainly quite
dumb model objects that get life only by frameweork support. Let's see maybe
there's an easy and maybe compatible) way to get things together...

Michael
Re: FixPointAnchorEditPart does not override getDragTracker [message #758486 is a reply to message #757078] Wed, 23 November 2011 07:38 Go to previous message
Eclipse UserFriend
Felix,

from a first glance at the bug I would say that your suggestion is the way
to go but there might be some hidden trap doors...

This is still in the loop for Juno.

Michael
Previous Topic:grid settings should be controlled by preferences rather than being diagram properties
Next Topic:Best practice for own Shapes?
Goto Forum:
  


Current Time: Wed Jul 23 19:43:07 EDT 2025

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

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

Back to the top