Move refactoring: what is the difference between the different MoveDestination Follow
1. RenameFactoring.addElement: I will assume that I can add my own renames that will be added like setXXX and getXXX are on the rename of a field XXX
2. I quite not see the difference between AutocreatingSingleSourceRootMoveDestination
SingleSourceRootMoveDestination
MultipleRootsMoveDestination and how to construct them
BTW I promise I will document them on the wiki if you answer.
Thanks
Jacques
Please sign in to leave a comment.
Jacques Morel wrote:
Right.
This is a javadoc comments I have just written:
/**
Represents a destination of Move Classes/Packages refactoring.
Destination of Move refactoring is generally a single package,
and various <code>MoveDestination</code>s control how moved items
will be layouted in directories corresponding to target packages.
*
Instances of this interface can be obtained via methods of {@link
RefactoringFactory}.
*
@see
RefactoringFactory#createSourceFolderPreservingMoveDestination(java.lang.String)
@see RefactoringFactory#createSourceRootMoveDestination(java.lang.String,
com.intellij.openapi.vfs.VirtualFile)
@author dsl
*/
public interface MoveDestination {
...
}
public abstract class RefactoringFactory {
/**
Creates move destination for a specified package that preserves source
folders for moved items.
*/
public abstract MoveDestination
createSourceFolderPreservingMoveDestination(String
targetPackageQualifiedName);
/**
Creates move destination for a specified package that moves all items
to a specifed source folder
*/
public abstract MoveDestination createSourceRootMoveDestination(String
targetPackageQualifiedName, VirtualFile sourceRoot);
Are they concise and clear enough? Your suggestions are most welcome.
Cheers,
Dmitry
--
Dmitry Lomov
Software Developer
JetBrains Inc.
http://www.jetbrains.com
"Develop with pleasure!"
Sounds good. What about the Autocreating version?
How do you make this interactive? Let the handler ask the question to the user?
Thanks
Jacques
Jacques Morel wrote:
Implementations of MoveDestinations are not in OpenAPI.
You do not need to bother about that :)
Right. Or write a dialog yourself.
Friendly,
Dmitry
--
Dmitry Lomov
Software Developer
JetBrains Inc.
http://www.jetbrains.com
"Develop with pleasure!"