Bug 406000 - "Project Explorer" appears in the list of saved resources
Summary: "Project Explorer" appears in the list of saved resources
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.2.2   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: 4.3 RC1   Edit
Assignee: Paul Webster CLA
QA Contact:
URL:
Whiteboard: candidate43
Keywords: helpwanted
: 408485 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-04-18 11:33 EDT by Abhishek Kishore CLA
Modified: 2013-05-22 13:44 EDT (History)
7 users (show)

See Also:


Attachments
Screenshot explaining the bug (83.35 KB, image/gif)
2013-04-18 12:06 EDT, Abhishek Kishore CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Abhishek Kishore CLA 2013-04-18 11:33:40 EDT
While closing Eclipse, instead of showing dirty resources in the project explorer individually, the "Save Resources" dialog shows "Project Explorer" as a single item in the list.
Comment 1 Paul Webster CLA 2013-04-18 11:37:36 EDT
Could you please attach a screenshot?  PNG or GIF is fine.

PW
Comment 2 Abhishek Kishore CLA 2013-04-18 12:06:54 EDT
Created attachment 229871 [details]
Screenshot explaining the bug
Comment 3 Abhishek Kishore CLA 2013-04-18 12:07:44 EDT
I'm not able to find an example for this situation in "vanilla" Eclipse. So I'm attaching a screenshot from the product I'm working on. It allows me to create UML models and modify them "inline" in the project explorer.
In the attached screenshot, I've modified 2 UML models, and a Java class. The latter shows up separately, since its open in the editor. However, the models are not listed separately, as they used to be in earlier versions of Eclipse.
Comment 4 Paul Webster CLA 2013-04-18 12:10:19 EDT
Maybe our save dialog is using the part title instead of something provided from the savable source.

PW
Comment 5 Francis Upton IV CLA 2013-04-18 12:57:53 EDT
Odd though that there is a star in the Project Explorer tab, almost like it thinks it's an editor. 

@Abhishek, can you make this happen at will and, if so, provide some steps that detail what we need to install and do?
Comment 6 Abhishek Kishore CLA 2013-04-18 13:08:01 EDT
(In reply to comment #5)
> Odd though that there is a star in the Project Explorer tab, almost like it
> thinks it's an editor. 
> 
> @Abhishek, can you make this happen at will and, if so, provide some steps
> that detail what we need to install and do?

Like I said in comment #3, I haven't been able to find a test case in an Eclipse installation that I have. The trick is to:
1. Dirty a resource in Project Explorer without opening it in an editor. 
or 
2. Dirty the resource in an editor, then close the editor without saving the resource so that it stays in a dirty state.

Try exiting Eclipse in this state, and it consistently identifies "Project Explorer" as the resource that needs to be saved.


org.eclipse.ui.internal.WorkbenchPage.saveAllEditors(boolean, boolean) is passing on a list of dirty MParts, not resources, to the ISaveHandler, which prompts the user. So the Project Explorer, one of the dirty MParts, shows up as a single item.

The general philosophy of the saveAllEditors() method seems to be to deal with MParts, and not bother with elements/resources contained within them.
Comment 7 Dani Megert CLA 2013-04-23 05:53:01 EDT
Could be related to bug 406000.
Comment 8 Dani Megert CLA 2013-04-23 05:54:11 EDT
(In reply to comment #7)
> Could be related to bug 406000.

Bug 406275 that is.
Comment 9 Abhishek Kishore CLA 2013-04-23 06:05:05 EDT
(In reply to comment #8)
> (In reply to comment #7)
> > Could be related to bug 406000.
> 
> Bug 406275 that is.

Bug 405562 could also be related to this.
Comment 10 Paul Webster CLA 2013-05-16 11:14:55 EDT
This is fixed by the fix for bug 405562

PW
Comment 11 Paul Webster CLA 2013-05-17 10:02:32 EDT
In 4.3.0.I20130516-2200

PW
Comment 12 Paul Webster CLA 2013-05-17 10:37:06 EDT
With the test project  attachment 231108 [details] 

PW
Comment 13 Paul Webster CLA 2013-05-22 13:44:25 EDT
*** Bug 408485 has been marked as a duplicate of this bug. ***