Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 33749 - Importing a workspace reports overlapping directories.
Summary: Importing a workspace reports overlapping directories.
Status: RESOLVED DUPLICATE of bug 33684
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Resources (show other bugs)
Version: 2.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-Resources-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-03-04 09:29 EST by Hans Deragon CLA
Modified: 2003-03-10 13:35 EST (History)
1 user (show)

See Also:


Attachments
Example of a project that cannot be imported. (2.15 KB, application/x-tar )
2003-03-08 11:15 EST, Hans Deragon CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Hans Deragon CLA 2003-03-04 09:29:55 EST
Eclipse 2.1, M5 (Build id: 200302061700)

When importing a project into a workspace, sometimes I get the following error
(not always, it depends of the project):

--->
  Invalid project description.

  //World/world/perm/dev/eclipse/workspace/ascii_time_sheet and 
  //World/world/perm/dev/eclipse/workspace overlap.
<---

For some projects, I could fix it by editing the file:

  //World/world/perm/dev/eclipse/workspace/ascii_time_sheet/.project

and change the name from:

  <name>Ascii Time Sheet</name>

to:

  <name>Ascii_Time_Sheet</name>

...essentially removing the space in the name.  For other projects, this trick
would not work and I would not be able to import it, the same "overlapping"
error being reported.

  All of my projects I imported (or attempted to) are already stored in the
directory specified with the -data command line option (set to
//World/world/perm/dev/eclipse/workspace).  They initially were not recognized
by Eclipse because of a new install and a change of default workspace directory.
 This is why i used the import function to get them recognized by Eclipse.  I
mention this in case importing a project already stored in the workspace might
be an issue or not.

  If the problem is on the user's side, please change the error message to be
more helpfull.
Comment 1 John Arthorne CLA 2003-03-05 12:20:25 EST
I cannot find a reproducible case.  Can you provide steps to reproduce this?  I
tried:

1) Create a simple project called "ascii time sheet"
2) Shutdown eclipse
3) Restart eclipse with new workspace
4) Import the existing project "ascii time sheet"

-> Works fine.

I also tried the same steps with a project called "ascii_time_sheet".
Comment 2 Hans Deragon CLA 2003-03-08 11:15:20 EST
Created attachment 3926 [details]
Example of a project that cannot be imported.

This is an example of a project that cannot be imported.
Comment 3 Rafael Chaves CLA 2003-03-10 13:27:16 EST
I could reproduce the reported behaviour with RC2 using the provided project. 
To reproduce it it is required that:

- the project location is an immediate child of the workspace root, *and*
- the project name is different than the project directory.

We are being passed a project description that does not have a default location 
(IProjectDescription#getLocation != null) and the non-default location overlaps 
with the workspace location - this is why the project description is invalid.

It looks like the "Import Existing Project into Workspace" wizard 
(WizardExternalProjectImportPage) is not validating the project location (with 
IWorkspace#validateProjectLocation) before calling IProject#create. 

I think we should move it to Platform/UI (serviceability issue).
Comment 4 John Arthorne CLA 2003-03-10 13:35:37 EST
Agreed.  This is a duplicate of bug 33684.  The error is correct but the user
should have been notified by a warning in the wizard.

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