Bug 110725 - [Layout] Moving node onto path of edge with avoid-obstructions doesn't update edge bendpoints
Summary: [Layout] Moving node onto path of edge with avoid-obstructions doesn't update...
Status: RESOLVED FIXED
Alias: None
Product: GMF-Runtime
Classification: Modeling
Component: General (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal
Target Milestone: 2.2   Edit
Assignee: Lidija Grahek CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 145467 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-09-26 17:15 EDT by Min Idzelis CLA
Modified: 2010-07-19 21:58 EDT (History)
4 users (show)

See Also:


Attachments
Patch with avoid obstructions... (13.30 KB, patch)
2006-03-01 17:32 EST, Steven R. Shaw CLA
no flags Details | Diff
Avoid obstructions patch (38.46 KB, patch)
2008-07-08 14:50 EDT, Lidija Grahek CLA
no flags Details | Diff
Avoid obstructions patch (42.66 KB, patch)
2008-09-10 14:41 EDT, Lidija Grahek CLA
no flags Details | Diff
Patch without GEF part (38.86 KB, patch)
2008-10-23 15:06 EDT, Lidija Grahek CLA
no flags Details | Diff
Patch without GEF part (38.79 KB, patch)
2008-10-24 17:22 EDT, Lidija Grahek CLA
no flags Details | Diff
Patch (39.62 KB, patch)
2008-11-18 17:24 EST, Lidija Grahek CLA
ahunter.eclipse: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Min Idzelis CLA 2005-09-26 17:15:57 EDT
If you move a node into the path of an edge that has the avoid-obstructions flag
set, the bendpoints of that edge are not automatically updated.
Comment 1 Steven R. Shaw CLA 2005-10-03 13:29:00 EDT
This problem will be fixed when we migrate to the GEF 3.1 avoid obstructions 
router instead of own implementation.
Comment 2 Steven R. Shaw CLA 2005-10-06 14:35:45 EDT
Changing component to "Runtime Diagram"
Comment 3 Steven R. Shaw CLA 2006-03-01 17:32:31 EST
Created attachment 35574 [details]
Patch with avoid obstructions...

Modified original patch from Tom to accommodate Rectilinear routing.  There's still an issue with this implementation in that it won't work inside any container.  It only works at a root level.  It would need some work to accommodate containers at any level.
Comment 4 Steven R. Shaw CLA 2006-03-01 17:32:56 EST
Not containable in M5.  Moving to M6.
Comment 5 Steven R. Shaw CLA 2006-06-09 13:53:52 EDT
Removed target milestone.  This could depend on 141762 which requires the obstruction detection to be more efficient assuming we don't migrate to the GEF avoid obstructions algorithm.
Comment 6 Alex Boyko CLA 2006-12-08 11:51:57 EST
*** Bug 145467 has been marked as a duplicate of this bug. ***
Comment 7 Anthony Hunter CLA 2007-06-19 11:42:58 EDT
Moving to the next release, GMF 2.1. 
Comment 8 Lidija Grahek CLA 2008-07-08 14:50:49 EDT
Created attachment 106869 [details]
Avoid obstructions patch

Incorporating use of GEF’s ShortestPathConnectionRouter into GMF’s ObliqueRouter in order to enable instant re-routing when an obstacle is placed on or removed from a connection which has Avoid Obstacles property set. The rules for routing: 
	
If the connection is completely within one container (doesn’t matter if the container is nested), then GEF’s router is used, meaning that the connection will be appropriately re-routed in case when an obstacle is being placed on the way. 

If the connection spans between two containers, then this method returns null and the old GMF algorithm for avoiding obstructions is used (meaning that re-routing will not happen right away when an object is placed on the connection).

Self connections and connections whose source and target intersect are dealt separately and avoid obstructions is irrelevant (just like when non-GEF avoid obstructions router is used). 

Known issue: if an obstacle contains a connection start or end point, that obstacle is ignored, meaning that the connection can be routed through it.
Comment 9 Alex Boyko CLA 2008-07-09 15:16:25 EDT
I'll take a look at Lidija's patch in a near future and provide feedback.
Comment 10 Lidija Grahek CLA 2008-09-10 14:41:27 EDT
Created attachment 112238 [details]
Avoid obstructions patch
Comment 11 Anthony Hunter CLA 2008-10-15 15:42:46 EDT
Hi Lidija,

We need to create a GEF Bugzilla and attach the ShortestPathConnectionRouter contribution there. Once the GEF fix is in we can do the GMF part.

Comments on ShortestPathConnectionRouter:

1) new public methods need JavaDoc, 
2) getConsiderGivenBendpoints() should be isConsiderGivenBendpoints() or even better shouldConsiderGivenBendpoints();
3) getIgnoreInvalidate() should be isIgnoreInvalidate() or even better shouldIgnoreInvalidate();
4) getIsDirty() should be just isDirty();
Comment 12 Lidija Grahek CLA 2008-10-23 15:06:05 EDT
Created attachment 115973 [details]
Patch without GEF part

Attached the patch that excludes ShortestPathConnectionRouter. This class (including changes as a result of the comments) is separetd into another patch attached to the newly created GEF bug [251896].
Comment 13 Lidija Grahek CLA 2008-10-24 17:22:51 EDT
Created attachment 116116 [details]
Patch without GEF part

Just a small change to the previous patch to pass null constraint to ShortestPathConnectionRouter.setConstraint
Comment 14 Anthony Hunter CLA 2008-11-13 10:14:09 EST
Anthony and Alex B to review.
Comment 15 Alex Boyko CLA 2008-11-13 15:27:13 EST
I've sent my comments directly to Lidija via email. Nothing major though.
Comment 16 Lidija Grahek CLA 2008-11-18 17:24:27 EST
Created attachment 118200 [details]
Patch

Latest patch - uses PrecisionPoint and adds cleaning up in ConnectionEditPart
Comment 17 Alex Boyko CLA 2008-11-20 12:06:54 EST
Quickly looked through the patch... looks good to me... I'll apply the patch and test it later as well.
Comment 18 Anthony Hunter CLA 2008-12-09 22:00:40 EST
Committed to HEAD
Comment 19 Eclipse Webmaster CLA 2010-07-16 23:36:12 EDT
[target cleanup] 2.2 M4 was the original target milestone for this
bug
Comment 20 Eclipse Webmaster CLA 2010-07-19 21:58:51 EDT
[GMF Restructure] Bug 319140 : product GMF and component
Runtime was the original product and component for this bug