Bug 266907 - Bookmarks on EFS resources are removed between workbench sessions
Summary: Bookmarks on EFS resources are removed between workbench sessions
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Resources (show other bugs)
Version: 3.5   Edit
Hardware: All All
: P3 critical (vote)
Target Milestone: 3.5 M7   Edit
Assignee: Szymon Brandys CLA
QA Contact:
URL:
Whiteboard: hasPatch
Keywords:
Depends on:
Blocks:
 
Reported: 2009-03-03 14:03 EST by Chris Recoskie CLA
Modified: 2010-03-05 11:13 EST (History)
2 users (show)

See Also:


Attachments
Fix v01 (7.19 KB, patch)
2009-03-13 09:43 EDT, Szymon Brandys CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Recoskie CLA 2009-03-03 14:03:53 EST
Steps to reproduce:

1.  Create a project using an EFS provider.

2.  Place a text file in that project.

3.  Create a bookmark somewhere in that file.

4.  Close the file.  Confirm that clicking the bookmark you just created properly takes you to the right location in that file.

5.  Close the file, close the workbench, and then start it up again.

6.  Any bookmarks on EFS resources are gone.  Not just disabled, but completely gone, with no apparent way to retrieve them.
Comment 1 John Arthorne CLA 2009-03-03 17:12:39 EST
What build?
Comment 2 Chris Recoskie CLA 2009-03-03 22:49:31 EST
(In reply to comment #1)
> What build?

3.5 M5, aka Build id: I20090202-1535
Comment 3 Szymon Brandys CLA 2009-03-04 12:34:07 EST
I've tested it on Build id: N20090301-2000 using wrapped filesystem provider from org.eclipse.core.tests.resources. It works fine and bookmarks remain even when the workbench is restarted.

What EFS provider do you use?
Comment 4 Chris Recoskie CLA 2009-03-04 12:36:59 EST
(In reply to comment #3)
> I've tested it on Build id: N20090301-2000 using wrapped filesystem provider
> from org.eclipse.core.tests.resources. It works fine and bookmarks remain even
> when the workbench is restarted.
> What EFS provider do you use?

I'm using RSE.
Comment 5 Szymon Brandys CLA 2009-03-09 11:27:47 EDT
I think that there are two issues here.

First is an RSE issue. When I restart my Eclipse and I have project "myProject" with a location on RSE filesystem, the project will become closed. This is because:

"The project description file (.project) for 'myProject' is missing.  This file contains important information about the project.  The project will not function properly until this file is restored."

I don't know why it happens.

Another issue is Resources issue. Even if this RSE problem happens, markers should be restored when "myProject" is reopened. Id doesn't work that way. Invesigating.
Comment 6 Chris Recoskie CLA 2009-03-09 11:58:39 EDT
(In reply to comment #5)
> I think that there are two issues here.
> First is an RSE issue. When I restart my Eclipse and I have project "myProject"
> with a location on RSE filesystem, the project will become closed. This is
> because:
> "The project description file (.project) for 'myProject' is missing.  This file
> contains important information about the project.  The project will not
> function properly until this file is restored."
> I don't know why it happens.

This is a long-standing issue.  See bug #181460 for details.
Comment 7 Szymon Brandys CLA 2009-03-12 11:16:12 EDT
The reason of the resource issue is that we get a project in an inconsistent state, i.e. the project is closed, but the project tree is not persisted in .metadata/.plugins/org.eclipse.core.resources/.projects/[project]

This can happen during starting Eclipse when we get an error while restoring meta data. Another way to reproduce the issue is to delete .tree file of a closed project.

In both cases, we could try to restore the tree using the workspace .tree file. Working on the patch.
Comment 8 Szymon Brandys CLA 2009-03-13 09:43:54 EDT
Created attachment 128703 [details]
Fix v01
Comment 9 Szymon Brandys CLA 2009-03-13 09:50:23 EDT
(In reply to comment #7)
> In both cases, we could try to restore the tree using the workspace .tree file.

There is a better solution though. When the worksapce is being restored and restoring project metadata fails, we can store the project tree just before the project is closed. And this is covered by the attached patch. 

Comment 10 Szymon Brandys CLA 2009-03-16 07:29:52 EDT
Released to HEAD.