Refactor/Move package/class to another module

The project I'm currently working on has an evil file structure where EJBs are intermixed with Struts actions, servlets, and other classes.

So I created a new EJB module, and am eager to start this tidy up process which I've been somewhat holding off.

From the .ejb package in the project tree, I select refactor-move thinking the JetBrainers have had forethought, but alas - refactor-move only lets me move the package, to another package, within the same module.

Where what I really want to do is move the entire package, into the new module.

Is there an easy way to do this, or shall I want for the next EAP if this
issue gets implemented :)

Issue added - please comment that:

http://www.intellij.net/tracker/idea/viewSCR?publicId=23167

--
Discouragement is a dissatisfaction with the past, a distaste for the
present, and a distrust of the future - Maree De Jong, CLCA.

5 comments

Mark Derricutt wrote:

The project I'm currently working on has an evil file structure where EJBs
are intermixed with Struts actions, servlets, and other classes.

So I created a new EJB module, and am eager to start this tidy up process
which I've been somewhat holding off.

From the .ejb package in the project tree, I select refactor-move thinking
the JetBrainers have had forethought, but alas - refactor-move only lets
me move the package, to another package, within the same module.


Mark,

just uncheck a 'Perserve source folders' in 'Move' dialog that apears.

Friendly,
Dmitry
--
Dmitry Lomov
IntelliJ Labs / JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"

0

On Wed, 10 Dec 2003 11:38:47 +0300, Dmitry Lomov (JetBrains) wrote:

just uncheck a 'Perserve source folders' in 'Move' dialog that apears.


Ah sweet - maybe a better label would be in order, to more accurately say
"allow moving to other modules".

Mark

0

Mark Derricutt wrote:

On Wed, 10 Dec 2003 11:38:47 +0300, Dmitry Lomov (JetBrains) wrote:

>> just uncheck a 'Perserve source folders' in 'Move' dialog that apears.


Ah sweet - maybe a better label would be in order, to more accurately say
"allow moving to other modules".


More accurately 'allow moving to other source folders', but I don't like it:
IMO it gives the impression that 'Move' will randomly move classes around
source paths as it sees fit :)

Friendly,
Dmitry
--
Dmitry Lomov
IntelliJ Labs / JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"

0

Mark Derricutt wrote:

>>just uncheck a 'Perserve source folders' in 'Move' dialog that apears.
>>
>>
>Ah sweet - maybe a better label would be in order, to more accurately say
>"allow moving to other modules".

>


Actually, it's more "enable" than "allow".

"Allow" would drive us to think that you can explicitly "Forbid" :
See:
Adding rules to restrict code moving scope.
http://www.intellij.net/forums/thread.jsp?forum=22&thread=53611
This discussion is still pending..


Alain

0

just uncheck a 'Perserve source folders' in 'Move' dialog that apears.


I find this (by default enabled) option very annoying. I first thought,
IDEA is impossible to move classes to other modules since build 977.

BTW, having a combobox in the Move-dialog containing all target modules
would be much better, especially when in conjunction with a
OK-Cancel-dialog telling, that the target package does not exist and
needs to be created.

Tom

0

Please sign in to leave a comment.