Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 12507

Summary: Closed projects lose their location if not default
Product: [Eclipse Project] Platform Reporter: Craig Setera <craigsfnet>
Component: ResourcesAssignee: John Arthorne <john.arthorne>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 2.0   
Target Milestone: 2.0 M5   
Hardware: PC   
OS: Windows 2000   
Whiteboard:

Description Craig Setera CLA 2002-03-29 14:20:07 EST
In 3/21 stable build.
If you create a project in the non-default location and then proceed to close
and reopen that project.  The project will have "lost" its location.  It will be
opened back up in the default location (relative to the workspace) rather than
its original location.  This causes the project to lose all of its data and is
very confusing and disconcerting.  This problem does not occur if you take the
default location relative to the workspace.
Comment 1 Craig Setera CLA 2002-03-29 14:22:28 EST
I should clarify the statement 
"This problem does not occur if you take the default location relative to the 
workspace." 
to say instead:
This problem does not occur if you take the default location relative to the 
workspace when initially creating the project.
Comment 2 DJ Houghton CLA 2002-03-30 23:41:06 EST
I could not reproduce this using build 2002-03-28.
These are the steps that I tried:

- create simple project AAA with location c:\temp\foobar
- create file foo.txt
- close project
- open project

After opening the project the location was ok (checked via project properties 
in the context menu) and the file was displayed in the project in the Navigator.

Could you please post some reproducable steps using the latest build? 
Thanks.
Comment 3 Craig Setera CLA 2002-04-02 09:00:48 EST
You are correct.  This does not appear to happen in the 3/28 integration build, 
although it was very consistent for me in the 3/21 stable build.
Comment 4 DJ Houghton CLA 2002-04-02 16:16:30 EST
If you check the location of the project before it is opened, it says that it 
is in the workspace default. After you open it then it recognizes its correct 
location.
Comment 5 John Arthorne CLA 2002-04-03 14:49:14 EST
Fixed the bug described by DJ.  That is, calling IProject.getLocation() on a 
project that is closed on startup would return the default location.  It now 
correctly returns the actual location of the project.  Note this is not the 
exact problem reported in this PR, which seems to already be fixed (or at least 
isn't reproducible) in current builds.