Bug 194463

Summary: Local Changes Pending Dialog clicking cancel still brings up Editor
Product: [Tools] Target Management Reporter: Kevin Doyle <kjdoyle>
Component: RSEAssignee: Kevin Doyle <kjdoyle>
Status: CLOSED FIXED QA Contact: Martin Oberhuber <mober.at+eclipse>
Severity: minor    
Priority: P4 CC: dmcknigh, kmunir
Version: 2.0Keywords: contributed
Target Milestone: 2.0.1   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Bug Depends on: 194481    
Bug Blocks:    
Attachments:
Description Flags
Check the result of _editable.download(monitor) to decide if editor should be opened mober.at+eclipse: iplog+

Description Kevin Doyle CLA 2007-06-26 13:52:17 EDT
If you click cancel on the Local Changes Pending Dialog the editor is still opened.  Cancel should not be bringing up the editor.

Steps to Reproduce: 
1. Create the archive dummy.zip on Local.
2. Create the file text.txt inside it.
3. Open text.txt.
4. Rename text.txt.
5. Make a change to text.txt in the editor and press Save.
6. Click Cancel on the save conflict dialog and close the editor.
7. Reopen the file.
8. Local Changes Pending Dialog appears.  Click Cancel and file opens.

-----------Enter bugs above this line-----------
TM 2.0RC4 Testing
installation : eclipse-SDK-3.3RC4
RSE install  : RSE 2.0 RC4
java.runtime : Sun 1.5.0_11-b03
os.name:     : Windows XP, Service Pack 2
------------------------------------------------
Comment 1 Martin Oberhuber CLA 2007-06-28 09:38:05 EDT
I find the situation weird between steps (4) and (5) -- Why do we get a conflict dialog in this case?
Comment 2 Martin Oberhuber CLA 2007-06-28 09:40:20 EDT
Ah, my question is essentially bug #194481. Perhaps if that one is fixed, we'll need a different way of reproducing this one.
Comment 3 Kevin Doyle CLA 2007-06-29 17:22:27 EDT
Created attachment 72801 [details]
Check the result of _editable.download(monitor) to decide if editor should be opened

Changed DownloadJob.run() so it checks the result of _editable.download(monitor) instead of !monitor.isCancelled() for determining if the file should be opened.  In SystemEditableRemoteFile.doDownload(...) it will return false if the monitor is cancelled.

Legal Message: I, Kevin Doyle, declare that I developed attached code from
scratch, without referencing any 3rd party materials except material licensed
under the EPL. I am authorized by my employer, IBM Canada Ltd. to make this
contribution under the EPL.
Comment 4 David McKnight CLA 2007-07-04 13:57:46 EDT
I've committed the patch to cvs.
Comment 5 Kevin Doyle CLA 2007-07-05 11:45:23 EDT
Verified with driver I20070705-0600.