Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 362049 - [reorg] Indigo refactor (file level) bugs
Summary: [reorg] Indigo refactor (file level) bugs
Status: RESOLVED INVALID
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.7   Edit
Hardware: PC Windows 7
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-26 06:57 EDT by wei.li CLA
Modified: 2011-10-26 09:04 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description wei.li CLA 2011-10-26 06:57:56 EDT
Build Identifier: 20110615-0604

I have recently moved to Indigo. When I tried to move a file to a different package using the 'move' function, it did not update the package references. So in the moved file, the package name is still the old package location. 

When I used the 'rename' option, it does not update the class name in the file. Its only update the file's name.




Reproducible: Always
Comment 1 Dani Megert CLA 2011-10-26 07:14:13 EDT
I cannot reproduce this using 3.8 M2. If you can reproduce with a build from here:
http://download.eclipse.org/eclipse/downloads/drops/S-3.8M2-201109151308/index.php
then please reopen with more detailed steps / examples to reproduce.

Just one idea: maybe your files are not inside a Java project or they are not on the build path.
Comment 2 wei.li CLA 2011-10-26 08:19:16 EDT
My project is 6 years old and the refactor options have always been working for previous elipse versions. 

But we  switched to mercurial from svn when we upgraded to Indigo. Do you think this could be the cause? Has anyone reported similar problem using mercurial?Thanks for the help.
Comment 3 Dani Megert CLA 2011-10-26 08:27:14 EDT
(In reply to comment #2)

> Has anyone reported similar problem using
> mercurial?Thanks for the help.
Are you using hgeclipse (Mercurial)? Maybe you run into a similar issue as described by bug 269067. Note that you can search bugzilla yourself if you want to know about existing bugs.

Did you verify that the build path is correct? Is there anything in the .log?
Comment 4 wei.li CLA 2011-10-26 08:33:44 EDT
(In reply to comment #3)
> (In reply to comment #2)
> 
> > Has anyone reported similar problem using
> > mercurial?Thanks for the help.
> Are you using hgeclipse (Mercurial)? Maybe you run into a similar issue as
> described by bug 269067. Note that you can search bugzilla yourself if you want
> to know about existing bugs.
> 
> Did you verify that the build path is correct? Is there anything in the .log?

Hi Dan, yes, I can verify that the build path is correct.
Comment 5 Markus Keller CLA 2011-10-26 08:55:50 EDT
Please be specific and mention the exact menu items you used to perform an action.

You probably used File > Move... and File > Rename... in the Navigator view. Those are file-level operations, so the reported results are expected.

If you want to use Java refactorings, use the Package Explorer view. Or use Refactor > Move... etc. in the Project Explorer (make sure the Java Elements extension is enabled in that view).
Comment 6 wei.li CLA 2011-10-26 09:03:32 EDT
(In reply to comment #5)
> Please be specific and mention the exact menu items you used to perform an
> action.
> 
> You probably used File > Move... and File > Rename... in the Navigator view.
> Those are file-level operations, so the reported results are expected.
> 
> If you want to use Java refactorings, use the Package Explorer view. Or use
> Refactor > Move... etc. in the Project Explorer (make sure the Java Elements
> extension is enabled in that view).

Hi Markus, thanks for the help. Absolutely spot on. I was in Java EE Perspective. The problem resolved as soon as I switched to Java Perspective. Thanks again.