Bug 208022 - [Apply Patch] cancel save modified resource does not cancel apply patch
Summary: [Apply Patch] cancel save modified resource does not cancel apply patch
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: CVS (show other bugs)
Version: 3.3   Edit
Hardware: PC Windows XP
: P5 minor (vote)
Target Milestone: 3.4 M6   Edit
Assignee: platform-cvs-inbox CLA
QA Contact:
URL:
Whiteboard: hasPatch
Keywords: bugday, contributed
Depends on:
Blocks:
 
Reported: 2007-10-30 11:19 EDT by Benno Baumgartner CLA
Modified: 2008-05-16 13:53 EDT (History)
3 users (show)

See Also:


Attachments
utilize return value of saveEditors (2.29 KB, patch)
2008-02-27 17:48 EST, Benjamin Muskalla CLA
no flags Details | Diff
mylyn/context/zip (1.30 KB, application/octet-stream)
2008-02-27 17:48 EST, Benjamin Muskalla CLA
no flags Details
Patch (API compatible) (2.46 KB, patch)
2008-02-29 07:40 EST, Tomasz Zarna CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Benno Baumgartner CLA 2007-10-30 11:19:22 EDT
I20071029-1800

1. Make any compilation unit editor dirty
2. In the Package explorer select a project and invoke Team>Apply Patch...
3. Cancel the save resource dialog
Is:
 The apply patch dialog appears
Should:
 Cancel the apply patch operation, the is behavior is the one that should (and does) happen when selecting 'no'
Comment 1 Tomasz Zarna CLA 2007-11-06 09:16:11 EST
You're right Benno, I think we could add a similar dialog to the "Save Modified Resources" one, which you display prior refactoring i.e. a dialog with Ok/Cancel buttons only which would work as you suggested. Moreover, the "Save all modified resources automatically..." option is also a good example and we could use it too.
Comment 2 Tomasz Zarna CLA 2007-11-06 09:22:18 EST
Anyway, it's always a matter of how much time we would need to create a patch, but at least we should handle the "Cancel" button as you suggested (no Apply Patch dialog after hitting the button).
Comment 3 Benjamin Muskalla CLA 2008-02-27 17:48:06 EST
Created attachment 90943 [details]
utilize return value of saveEditors

Little patch to cancel the operation when canceling the save dialog
Comment 4 Benjamin Muskalla CLA 2008-02-27 17:48:10 EST
Created attachment 90944 [details]
mylyn/context/zip
Comment 5 Tomasz Zarna CLA 2008-02-29 07:40:29 EST
Created attachment 91169 [details]
Patch (API compatible)

Benjamin, your patch works fine but it breaks API compatibility (ie changing result type of an API method (including void) breaks compatibility). This is how we can acheive the same thing without breaking anything. What do you think?
Comment 6 Benjamin Muskalla CLA 2008-02-29 14:24:14 EST
hi Tomasz,

for sure. I don't know why but I had in mind the class was internal. Seems I was a little bit confused at that evening.
Go from me ;)
Comment 7 Tomasz Zarna CLA 2008-03-03 05:15:04 EST
The latest patch released to HEAD. Thanks Benjamin.
Comment 8 Tomasz Zarna CLA 2008-03-26 08:52:39 EDT
Verified in I20080304-1113.