Bug 207980

Summary: ConnectionCreationTool should scroll when tool is dragged to edge of diagram
Product: [Modeling] GMF-Runtime Reporter: Cherie Revells <crevells>
Component: GeneralAssignee: Cherie Revells <crevells>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: crevells
Version: 2.0   
Target Milestone: 2.0.1   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Cherie Revells CLA 2007-10-30 09:45:59 EDT
Steps to reproduce:
1. Create a geoshape diagram
2. Add a geoshape
3. Add another geoshapeand drag it so that the first geoshape added is off screen.
4. Add a note
5. Select Note Attachment from the toolbox
6. Click the note and drag in an attempt to connect to the geoshape offscreen.
Note that the diagram does not scroll automatically.
Comment 1 Cherie Revells CLA 2007-10-30 10:11:50 EDT
In GEF, the connection tool will scroll if you hover near the edge of the diagram.  This didn't work in GMF because of changes made in the ConnectionCreationTool.  

I removed some of the odd-looking code in the ConnectionCreationTool to get the behavior back to how it works in GEF.  I searched the history of ConnectionCreationTool and found the bug reports as to why this code was originally put in and then tested to make sure those bugs no longer appeared.

I enhanced the behavior in ConnectionCreationTool so that you don't need to hover to wait for scrolling to occur and the cursor will change to a hand when you are in the correct zone to provide an indication that you should hover here to keep scrolling.  This fix works the same as in bugzilla 168203 DragEditPartsTrackerEx should scroll when user drags shape outside viewport.
Comment 2 Cherie Revells CLA 2007-11-01 15:51:29 EDT
Committed to GMF_R2_0_Maintenance stream and 2.1 M3.
Comment 3 Cherie Revells CLA 2007-11-23 13:41:48 EST
This caused a regression where a connection could no longer be created to diagram space.  Added a check to see if the viewer is null.
Comment 4 Eclipse Webmaster CLA 2010-07-19 12:30:02 EDT
[GMF Restructure] Bug 319140 : product GMF and component
Runtime Diagram was the original product and component for this bug