Michael Wenz Messages: 1275 Registered: July 2009 Location: Walldorf, Germany
Senior Member
Hi,
you would need to write your own move feature for that shape and return
false in canMove in case the move operation shall not be allowed because
another shape would be hidden.
I tried to write my own move shape feature.but how can i find that while moving to new location already another shape is existing. Ican try some overlapping algorithams but it will become performance issue for each move.
Is there any other way to find the existing shapes on diagram for specified location.
Michael Wenz Messages: 1275 Registered: July 2009 Location: Walldorf, Germany
Senior Member
Raghav,
there is GEF functionality for that. The getGraphicalViewer on DiagramEditor
offers a findObjectAt method that should help with that. It returns an GEF
EditPart, but maybe that's ok in your case?
Michael Wenz Messages: 1275 Registered: July 2009 Location: Walldorf, Germany
Senior Member
Raghav,
no, there are no plans in this respect. As I wrote in Buzilla https://bugs.eclipse.org/bugs/show_bug.cgi?id=401996 , this should not be
handled generically in the framework but should be done by clients in case
they need to.
Please see my blog post regarding this issue. (I still have fewer than 5 messages, that is why I can't post links yet, but you can find the blog here:
eclipsegraphiti.blogspot.de/2013/05/how-to-avoid-overlapping-of-shapes.html