Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 358828 - Refactor-Rename/Move confusion
Summary: Refactor-Rename/Move confusion
Status: CLOSED DUPLICATE of bug 338383
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Resources (show other bugs)
Version: 3.7.1   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-Resources-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-25 16:57 EDT by Robin Rosenberg CLA
Modified: 2011-09-26 02:22 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Robin Rosenberg CLA 2011-09-25 16:57:33 EDT
If I create a Java project inside the workspace and Refactor>Rename it, the project will get a new name and new location.
BUT
If I however create a java project outside the workspace and Refactor>Rename it, it will ONLY change it's name, but will remain in the same locatiom, i.e. the .project file is updated.

I discovered this while testing the Git movedelete hook.

As for the Move part this happens:

Project in workspace. Move e.f. workspace/A to workspace/B (or any other single-segment name instead of B) is not allowed. Eclipse claims it overlaps another project.  A name like workspace/B/C is accepted. That operation also works and move the project (but does not rename, as I'd expect).

Project outside workspace; Move of /Users/me/git/Z to /Users/me/git/Z, as expeted, moves the project to Z but does not rename it.

See also bug 307140
Comment 1 Remy Suen CLA 2011-09-25 17:17:49 EDT
(In reply to comment #0)
> Project in workspace. Move e.f. workspace/A to workspace/B (or any other
> single-segment name instead of B) is not allowed.

Did you mean "instead of A"? Please rephrase, Robin.

> Project outside workspace; Move of /Users/me/git/Z to /Users/me/git/Z, as
> expeted, moves the project to Z but does not rename it.

Those two paths look the same to me. Did you mean some different path?

Robin, since you opened this bug against the UI I'm guessing you're meaning that the wrong parameters are being passed and that this is not a bug in the Resources layer?
Comment 2 Robin Rosenberg CLA 2011-09-25 18:37:21 EDT
(In reply to comment #1)
> (In reply to comment #0)
> > Project in workspace. Move e.f. workspace/A to workspace/B (or any other
> > single-segment name instead of B) is not allowed.
> 
> Did you mean "instead of A"? Please rephrase, Robin.

Project in workspace. Move e.f. workspace/A to workspace/B. An attempt to move the project to any single-segment name is disallowed.

> 
> > Project outside workspace; Move of /Users/me/git/Z to /Users/me/git/Z, as
> > expeted, moves the project to Z but does not rename it.
> 
> Those two paths look the same to me. Did you mean some different path?
Yes, Attempt #2

Project outside workspace; Move of /Users/me/git/X to /Users/me/git/Z, as
expected, moves the project to Z but does not rename it.


> Robin, since you opened this bug against the UI I'm guessing you're meaning
> that the wrong parameters are being passed and that this is not a bug in the
> Resources layer?

I'm not 100% sure where the bug is, so it's either the UI layer or the resource layer. I picked the one that is easiest to demonstrate. 

The resource API isn't very clear on how to achieve the various cases, which might be the reason that this bug has surviced thus far. That would point the finger at the resource API...
Comment 3 Dani Megert CLA 2011-09-26 02:22:54 EDT

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