Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 39343 - Unhelpful error message on importing overlapping project
Summary: Unhelpful error message on importing overlapping project
Status: RESOLVED INVALID
Alias: None
Product: CDT
Classification: Tools
Component: cdt-core (show other bugs)
Version: 1.2   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 2.0   Edit
Assignee: Alain Magloire CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-06-25 16:20 EDT by Brent Nicolle CLA
Modified: 2009-01-09 14:53 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Brent Nicolle CLA 2003-06-25 16:20:28 EDT
To reproduce:

1. Create a couple places where projects could exist,
where one overlaps the other:
eg. C:\dev\project and C:\dev\project\childproject
You could create Makefiles and source files in each of those
places but you don't need to here.

2. Create a new Standard Make C++ Project.
Use a non-default location, eg. C:\dev\project.

3. Create another new Standard Make C++ Project.
Use a non-default location, a child of the previous one,
eg. C:\dev\project\subproject.

You get an error dialog box:
"Project cannot be created
Reason: Invalid project description"

What project description?

Click on the Details>>  button, and it explains
"C:\dev\project and C:\dev\project\subproject overlap."

The Reason is unhelpful/wrong.
Comment 1 Brent Nicolle CLA 2003-09-30 12:49:39 EDT
Resetting version to 1.2 for proper triage/visibility.
Comment 2 Alain Magloire CLA 2003-09-30 14:15:12 EDT
Eclipse platform is the one returning the message, and strangely
enough we are being consistent in the way the other wizards
work.

You will have the same behaviour, if you use the "Simple" project
wizard instead of the CDT and even with the JDT.

The message is not ours to change.

I would like to close this PR or you can move it to
Eclipse platform.
Comment 3 Godmar Back CLA 2003-10-17 17:22:34 EDT
I'm getting the same error message, and I don't understand what it means.
The error message is nowhere documented.  The descriptions of the
wizards do not say what it means.

Specifically, I have a project A (it's at the top-level in the
package explorer).  It sits therefore in workspace/A.
I want to import a project B from B.zip.  Consequently it should
go in workspace/B.
   
So I unzip B.zip to workspace/B.  For whatever reason, it doesn't
show up in the package explorer.

I then use the Import wizard and it gives me this error message.
This despite the fact that the wizard says "won't copy the files".
This despite the fact that it's right where it should be.

This despite the fact that the eclipse documentation somewhere says
that all projects must be under workspace directory.

Now if I extract B in another directory, say ./B, I can import it just fine.
Then, B shows up as a sibling of A in the package explorer, this
despite the fact that B resides in ./B whereas A resides in ./workspace/A.
They're sibling in the package explorer, but not in the filesystem?

This makes no sense whatsoever.

I wholeheartedly agree that the wizard should explain what is going on.
For starters, it would be helpful to have a glossary or some online help
that explains the meaning of "import".

Thanks.

  - Godmar 
Comment 4 Godmar Back CLA 2003-10-17 18:39:57 EDT
Oops, I may have sent you an empty email.  I added my email address to
the "Add CC:" field and hit Commit, which apparently sent this email.

I thought more about what is going on, and I believe that
I now understand what is going on.  Eclipse thinks that it's workspace
directory is ., not ./workspace.  So then project A's directory is
./workspace, and project's B directory ./workspace/B does indeed overlap.

You have to fix this as follows: when you output this error message,
include specifically what the workspace directory is, and what the conflicting
project directories are.  Directory names like "workspace" can be deceiving.  If
the error message had said:  "project directory /x/workspace/B for project B
cannot overlap with project directory /x/workspace/A for project A, rooted in
workspace directory /x" that it would have been obvious that eclipse considers
/x as its workspace directory, and not /x/workspace as I (and the many other
people confused by this error message, see groups.google.com) thought.

the error message would have made sense.
Comment 5 Godmar Back CLA 2003-10-17 18:58:53 EDT
Hmmm, I don't think my theory is correct.

How would I recognize what the workspace directory is?
Is this the directory where the .metadata directory resides?
If so, my theory is wrong because the .metadata directory is
indeed in ./workspace, so ./workspace would be my workspace
directory, ./workspace/A would be project A's root directory,
and ./workspace/B would not overlap with project A's root directory,
leaving me again confused as to the veracity of the error message.

How can I find out what eclipse's actual workspace directory is?
Comment 6 Alain Magloire CLA 2003-10-17 21:37:34 EDT
> How can I find out what eclipse's actual workspace directory is?

Select the project, look at the context menu(third button)
Choose Properties

In one of the Properties chose "Info"

It will show you the Location of the project.
Comment 7 Godmar Back CLA 2003-10-18 02:46:21 EDT
Alright, I've figured it out, and it looks like an eclipse bug after all.

The project I tried to import had the following name:
<projectDescription>
	<name>pict-edit</name>
... 
</projectDescription>
However, it actually contained package com.picedit.  If I edit the
.project file and rename the project name com.picedit, it imports
just fine from the workspace/com.picedit directory.
So this either mean that the project name must be the same as
the directory name, or that the name "pict-edit" is somehow wrong.

In either event, the error message eclipse gives about overlapping
paths is uncalled for and wrong.  Nothing overlaps here, simply setting
the project name in the .project projectDescription/name element
to the directory name makes it work.

Comment 8 Doug Schaefer CLA 2004-05-18 09:52:31 EDT
At any rate, this is not CDT. Please forward your concerns to the platform 
folks.