History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: IDEABKL-5304
Type: Usability Problem Usability Problem
Status: Open Open
Priority: Normal Normal
Assignee: Dmitry Jemerov
Reporter: Steve Beckle
Votes: 0
Watchers: 0
Available Workflow Actions

Mark as Stalled
Operations

If you were logged in you would be able to see more operations.
IDEA: Backlog

Can't move class during refactor if class has package level inner class

Created: 06 Oct 07 00:10   Updated: 11 Oct 07 17:32
Component/s: Refactoring, Version Control Integration. ClearCase
Affects Version/s: None
Fix Version/s: None

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown
Environment: WinXP. Clearcase plugin used for source control.

Build: 7,318
Severity: Medium


 Description  « Hide
Attempted to Refactor/Move a class to a new package. The class contains a private inner class declaration as well. I got an alert stating that there was a package local inner class (don't quote me on exact wording)...do I want to continue? I clicked OK. IDEA attempted to move just the code in the public class, while leaving the inner class code and the original source file. IDEA attempted the creation (rather than move) of a new file in the new package location that has the same name as the original source file, and contains only the public class code; the new file does not have the inner class code. The inner class code stays behind in the original source file.

I should be able to choose whether I want to include the inner class as part of the move, especially since its only usage is by the public class I wanted to move.



 All   Comments   Work Log   Change History      Sort Order:
Dmitry Jemerov - 08 Oct 07 13:48
Was it really an inner class, or just a local class in the same file? I wasn't able to reproduce the problem with inner classes.

Steve Beckle - 08 Oct 07 17:36
Correction on the nomenclature...not an inner class, but package local class in same file.

Dmitry Jemerov - 11 Oct 07 17:32
When you invoke the Move refactoring (whether from Project view or from the editor), you explicitly select the class, or classes, to be moved. As the package local class is not contained by the class you've selected to move, it's not included in the move operation. To move all the classes, you can select them all in the project view.