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

Bug 363480

Summary: New project wizard error message wrongly claims that project "overlaps the location of another project"
Product: [Eclipse Project] Platform Reporter: John Eblen <jdeblen1>
Component: ResourcesAssignee: Sergey Prigogin <eclipse.sprigogin>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: angvoz.dev, cshorler, daniel_megert, eclipse.sprigogin, iulia.vasii, jillbarq_99, pwebster, robin, sptaszkiewicz, sw
Version: 3.8Flags: daniel_megert: review+
Target Milestone: 4.4.1   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
Error 1 It doesn't allow to import my project
none
Eclipse not allows create project none

Description John Eblen CLA 2011-11-10 10:15:27 EST
In the new project wizard (either C or C++):

1) Uncheck "Use default location"
2) Enter a location inside the current workspace: $workspace/<any string>
3) Notice the error stating that the current location "overlaps the location of another project" whether it does or not.

It seems there are two possible correct behaviors:
1) This should not be an error.
2) Users should not be allowed to place projects in the workspace when "Use default location" is unchecked, perhaps, for example, to ensure that the directory and project name are the same. In this case, the error message should be changed.
Comment 1 Andrew Gvozdev CLA 2011-11-10 10:44:20 EST
Not related to CDT. New generic project wizard is having the same issue.
Moving to Platform.
Comment 2 Stephan Wahlbrink CLA 2011-12-20 07:09:41 EST
The bug occurs also in 3.7.1
Comment 3 Jill Barq CLA 2012-08-28 19:07:11 EDT
Created attachment 220425 [details]
Error 1 It doesn't allow to import my project

Error 1 It doesn't allow to import my project
Comment 4 Jill Barq CLA 2012-08-28 19:07:55 EDT
Created attachment 220426 [details]
Eclipse not allows create project
Comment 5 Jill Barq CLA 2012-08-28 19:10:44 EDT
Hi all, 
I have Eclipse for java juno installed Win 7 and I have this problem posted here, I just can't work in my project at all.  Since I updated my git code, I opened Eclipse and it fails opening the project, if I create a new one, there is an error "overlap"  kind (see attachs) and if I import the project, it detects no project there.  I made a test by erase Eclipse from my pc and decompress it again.  I don't see any answer to this issue since it was posted last year.  I'm in a hurry. Thanks.
Comment 6 Paul Webster CLA 2012-08-29 09:05:32 EDT
(In reply to comment #5)
> Hi all, 
> I have Eclipse for java juno installed Win 7 and I have this problem posted
> here, I just can't work in my project at all.

There's no one look at this at the moment.  You should still be able to import your eclipse project contained in git into eclipse.  You should ask your question in the EGit forum at http://www.eclipse.org/forums/

PW
Comment 7 Robin Stocker CLA 2013-07-07 11:09:21 EDT
*** Bug 354885 has been marked as a duplicate of this bug. ***
Comment 8 Sergey Prigogin CLA 2014-05-24 01:02:56 EDT
A proposed fix is in https://git.eclipse.org/r/#/c/27228/. It is intended for post-Luna, but it would be nice to get an early feedback.
Comment 9 Sergey Prigogin CLA 2014-08-15 19:58:32 EDT
Time is quickly running out for SR1. Please review the fix in Gerrit and submit.
Comment 11 Sergey Prigogin CLA 2014-08-21 16:56:18 EDT
(In reply to John Arthorne from comment #10)
Thank you for the review. Should this fix be cherry picked to R4_4_maintenance branch too?
Comment 12 Dani Megert CLA 2014-08-22 05:42:36 EDT
(In reply to Sergey Prigogin from comment #11)
> (In reply to John Arthorne from comment #10)
> Thank you for the review. Should this fix be cherry picked to
> R4_4_maintenance branch too?

I wouldn't do this. I only quickly looked at the change and I'm pretty sure it leaves the Package and Project Explorer in an inconsistent state i.e. the project will appear but the folder inside the other project won't appear.
Comment 14 Sergey Prigogin CLA 2014-08-22 13:11:55 EDT
(In reply to Szymon Ptaszkiewicz from comment #13)
> This fix causes test failures in latest N-build:
> 
> http://download.eclipse.org/eclipse/downloads/drops4/N20140821-2000/
> testresults/html/org.eclipse.core.tests.resources_linux.gtk.x86_64_8.0.html
> 
> http://download.eclipse.org/eclipse/downloads/drops4/N20140821-2000/
> testresults/html/org.eclipse.core.tests.resources_win32.win32.x86_7.0.html

The test asserted a wrong behavior. A fix for the test is in Gerrit at https://git.eclipse.org/r/#/c/32174/.
Comment 15 Sergey Prigogin CLA 2014-08-22 13:18:21 EDT
(In reply to Dani Megert from comment #12)
> I wouldn't do this. I only quickly looked at the change and I'm pretty sure
> it leaves the Package and Project Explorer in an inconsistent state i.e. the
> project will appear but the folder inside the other project won't appear.

The scenario you described is not affected by the change. The only thing the change does is it allows explicit specification of the default location that is reserved for the project itself. Encroaching on default locations of other existing and non-existing projects is not allowed.
Comment 16 John Arthorne CLA 2014-08-22 13:28:00 EDT
(In reply to Sergey Prigogin from comment #14)
> The test asserted a wrong behavior. A fix for the test is in Gerrit at
> https://git.eclipse.org/r/#/c/32174/.

Merged:

http://git.eclipse.org/c/platform/eclipse.platform.resources.git/commit/?id=4d9ad2f928a0cb5260901577b75bd7e13a79e292
Comment 17 Dani Megert CLA 2014-08-25 05:08:42 EDT
Tests are green again in N20140822-2000.


(In reply to Sergey Prigogin from comment #15)
> (In reply to Dani Megert from comment #12)
> > I wouldn't do this. I only quickly looked at the change and I'm pretty sure
> > it leaves the Package and Project Explorer in an inconsistent state i.e. the
> > project will appear but the folder inside the other project won't appear.
> 
> The scenario you described is not affected by the change.

It is - just tried it out.

With your change the user can add a project and a folder via Eclipse UI, but that folder won't appear until manually refreshing the parent. Note that this differs from the import scenario, where the folder is already visible in the Package Explorer and then only the new project is created and appears.
Comment 18 Dani Megert CLA 2014-08-25 05:22:34 EDT
(In reply to Dani Megert from comment #17)
> Tests are green again in N20140822-2000.
> 
> 
> (In reply to Sergey Prigogin from comment #15)
> > (In reply to Dani Megert from comment #12)
> > > I wouldn't do this. I only quickly looked at the change and I'm pretty sure
> > > it leaves the Package and Project Explorer in an inconsistent state i.e. the
> > > project will appear but the folder inside the other project won't appear.
> > 
> > The scenario you described is not affected by the change.
> 
> It is - just tried it out.
> 
> With your change the user can add a project and a folder via Eclipse UI, but
> that folder won't appear until manually refreshing the parent. Note that
> this differs from the import scenario, where the folder is already visible
> in the Package Explorer and then only the new project is created and appears.

Sorry Sergey, I was wrong. While that scenario happens, it already happened before when using  $workspace/existingProject/<any string>.

+1 to backport to 4.4.1. I'll do this in a minute.
Comment 19 Szymon Ptaszkiewicz CLA 2014-08-25 05:57:51 EDT
Fixed a wrong tag and copyright dates with:

http://git.eclipse.org/c/platform/eclipse.platform.resources.git/commit/?id=181c71e51ec9d0ebcdd6340a90f801b00e73e3b8