Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Graphiti » FixPointAnchorEditPart does not override getDragTracker
FixPointAnchorEditPart does not override getDragTracker [message #756684] Mon, 14 November 2011 16:33 Go to next message
Hernan Gonzalez is currently offline Hernan Gonzalez
Messages: 181
Registered: October 2010
Location: Buenos Aires, Argentina
Senior Member
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 16:33]

Report message to a moderator

Re: FixPointAnchorEditPart does not override getDragTracker [message #756804 is a reply to message #756684] Tue, 15 November 2011 08:08 Go to previous messageGo to next message
Felix Velasco is currently offline Felix Velasco
Messages: 43
Registered: July 2009
Member
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 20:28 Go to previous messageGo to next message
Hernan Gonzalez is currently offline Hernan Gonzalez
Messages: 181
Registered: October 2010
Location: Buenos Aires, Argentina
Senior Member
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 11:58 Go to previous messageGo to next message
Felix Velasco is currently offline Felix Velasco
Messages: 43
Registered: July 2009
Member
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 15:41 Go to previous messageGo to next message
Michael Wenz is currently offline Michael Wenz
Messages: 1618
Registered: July 2009
Location: Walldorf, Germany
Senior Member
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 12:38 Go to previous message
Michael Wenz is currently offline Michael Wenz
Messages: 1618
Registered: July 2009
Location: Walldorf, Germany
Senior Member
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: Sun Oct 26 00:39:11 GMT 2014

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

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