org.eclipse.jdt.internal.core
Class CopyResourceElementsOperation
java.lang.Object
org.eclipse.jdt.internal.core.JavaModelOperation
org.eclipse.jdt.internal.core.MultiOperation
org.eclipse.jdt.internal.core.CopyResourceElementsOperation
- All Implemented Interfaces:
- IWorkspaceRunnable, org.eclipse.core.runtime.IProgressMonitor, SuffixConstants
- Direct Known Subclasses:
- MoveResourceElementsOperation
public class CopyResourceElementsOperation
- extends MultiOperation
- implements SuffixConstants
This operation copies/moves/renames a collection of resources from their current
container to a new container, optionally renaming the
elements.
Notes:
- If there is already an resource with the same name in
the new container, the operation either overwrites or aborts,
depending on the collision policy setting. The default setting is
abort.
- When a compilation unit is copied to a new package, the
package declaration in the compilation unit is automatically updated.
- The collection of elements being copied must all share the
same type of container.
- This operation can be used to copy and rename elements within
the same container.
- This operation only copies compilation units and package fragments.
It does not copy package fragment roots - a platform operation must be used for that.
Fields inherited from interface org.eclipse.jdt.internal.compiler.util.SuffixConstants |
EXTENSION_class, EXTENSION_CLASS, EXTENSION_java, EXTENSION_JAVA, SUFFIX_class, SUFFIX_CLASS, SUFFIX_java, SUFFIX_JAVA, SUFFIX_STRING_class, SUFFIX_STRING_CLASS, SUFFIX_STRING_java, SUFFIX_STRING_JAVA |
Fields inherited from interface org.eclipse.core.runtime.IProgressMonitor |
UNKNOWN |
Methods inherited from class org.eclipse.jdt.internal.core.JavaModelOperation |
beginTask, done, executeNestedOperation, getJavaModel, getResultElements, hasModifiedResource, internalWorked, isCanceled, isReadOnly, newJavaElementDelta, run, runOperation, setCanceled, setTaskName, subTask, worked |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CopyResourceElementsOperation
public CopyResourceElementsOperation(IJavaElement[] resourcesToCopy,
IJavaElement destContainer,
boolean force)
- When executed, this operation will copy the given resources to the
given container.
CopyResourceElementsOperation
public CopyResourceElementsOperation(IJavaElement[] resourcesToCopy,
IJavaElement[] destContainers,
boolean force)
- When executed, this operation will copy the given resources to the
given containers. The resources and destination containers must be in
the correct order. If there is > 1 destination, the number of destinations
must be the same as the number of resources being copied/moved.