Bug 64617 - Not prompted to save dirty compare editor
Summary: Not prompted to save dirty compare editor
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Compare (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.0 RC2   Edit
Assignee: Andre Weinand CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 66295 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-05-28 15:41 EDT by Michael Valenta CLA
Modified: 2017-05-22 03:20 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Valenta CLA 2004-05-28 15:41:39 EDT
There is API on workbench IDE  (IDE.saveAllEditors(selectedResources, 
confirm)) for prompting the user to save dirty editors before performing an 
operation. This API does not pick up Compare Editors that contain local files 
that are dirty. To reproduce this, perform the follosing steps:

1) Load a project from CVS and dirty a file.

2) Synchronize the project the file is in so that the file appears as an 
outgoing change in the sync view.

3) Select the dirty file and another file in the navigator and perform a 
Compare With Each Other.

4) Dirty the file in the compare editor but don't save.

5) Perform a Commit on the file in the sync view and notice that you are not 
prompted to save.

If the file was open in a text editor (or java editor, etc) and dirty, the 
user would be prompted.
Comment 1 Andre Weinand CLA 2004-06-09 06:40:47 EDT
fixed in ResourceCompareInput.
Please note:
- if you are a subclass of CompareInput, you'll have to implement the getAdapter(IFile) method
   yourself (it is used by IDE.saveAllEditors).
- getAdapter can only return a single IFile, so it does not support editors that work on more than
   one IFile.
Comment 2 Dimitry Fayerman CLA 2004-06-10 15:54:40 EDT
*** Bug 66295 has been marked as a duplicate of this bug. ***
Comment 3 Martin Aeschlimann CLA 2004-06-11 06:13:39 EDT
verified in I200406110010