Class CopyResourceElementsOperation

java.lang.Object
All Implemented Interfaces:
SuffixConstants, org.eclipse.core.resources.IWorkspaceRunnable, org.eclipse.core.runtime.ICoreRunnable, org.eclipse.core.runtime.IProgressMonitor
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.