Hans,
IDEA is able to move static methods between classes.
First, make you method static by invoking the refactoring,
and choose to pass 'documentRoot' as a parameter to your
method (do not choose to pass a class instance as a parameter).
Then you will be able to move method to other class.
Friendly,
Dmitry
Hans Speijer wrote:
> Hi,
>
> I have the following method in a class:
>
> protected void removeEmptyFolders(File folder) {
>
> File parentFolder = folder;
>
> while(parentFolder.listFiles() != null &&
> parentFolder.listFiles().length == 0 &&
> !parentFolder.equals(documentRoot)) {
> parentFolder.delete();
> parentFolder = parentFolder.getParentFile();
> }
> }
>
> I need to move the method to a a class called FileUtils. Because I don't
> have the documentRoot as a variable I need to pass it as a parameter to
> the new static method.
>
> How do I do this refactoring with IDEA. If this is not a standard
> refactoring, should I submit into Tracker?
>
> Cheers,
>
> Hans Speijer
--
Dmitry Lomov
JetBrains Inc. / IntelliJ Software
http://www.intellij.com
"Develop with pleasure!"
_______________________________________________
Eap-features mailing list
[EMAIL PROTECTED]
http://lists.jetbrains.com/mailman/listinfo/eap-features