Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 458266 - Closing a project does not close a dirty editor
Summary: Closing a project does not close a dirty editor
Status: CLOSED DUPLICATE of bug 41431
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.5   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 4.5 M6   Edit
Assignee: Andrey Loskutov CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 346220 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-01-23 09:49 EST by Wojciech Sudol CLA
Modified: 2015-03-02 11:14 EST (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Wojciech Sudol CLA 2015-01-23 09:49:19 EST
Scenario:
1. Create a Java Project.
2. Inside the project create a class file and open it.
3. Edit the file, but don't save it.
4. Close the project.
5. In the "Save Resource" dialog which asks to save the dirty editor choose "No".

Expected behavior:
The project and editor are closed (editor disappears).

Current behavior:
The project is closed, but the editor is still open. Its content is still visible until clicked. The editor is still marked as dirty. Closing it shows the "Save Resource" dialog again. After choosing "Yes" an error dialog appears.

Found in Eclipse 4.5 N20150119-2000.
Comment 1 Szymon Ptaszkiewicz CLA 2015-01-23 09:55:08 EST
Possibly duplicate of bug 41431?
Comment 2 Wojciech Sudol CLA 2015-01-23 10:34:41 EST
(In reply to Szymon Ptaszkiewicz from comment #1)
> Possibly duplicate of bug 41431?

You are right Szymon. Thank you!

*** This bug has been marked as a duplicate of bug 41431 ***
Comment 3 Andrey Loskutov CLA 2015-02-10 16:45:57 EST
It is *not* duplicate of bug 41431.

The actual problem here is that ResourceFileBuffer haven't tried to notify TextFileBufferManager's if the buffer was marked as dirty.

The fix follows.
Comment 4 Eclipse Genie CLA 2015-02-10 16:47:51 EST
New Gerrit change created: https://git.eclipse.org/r/41576
Comment 5 Andrey Loskutov CLA 2015-02-10 16:51:08 EST
*** Bug 346220 has been marked as a duplicate of this bug. ***
Comment 6 Dani Megert CLA 2015-03-02 11:14:57 EST

*** This bug has been marked as a duplicate of bug 41431 ***