Klasse CopyElementsOperation

Alle implementierten Schnittstellen:
SuffixConstants, org.eclipse.core.resources.IWorkspaceRunnable, org.eclipse.core.runtime.ICoreRunnable, org.eclipse.core.runtime.IProgressMonitor
Bekannte direkte Unterklassen:
MoveElementsOperation

public class CopyElementsOperation extends MultiOperation implements SuffixConstants
This operation copies/moves a collection of elements from their current container to a new container, optionally renaming the elements.

Notes:

  • If there is already an element 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 constructors are copied to a type, the constructors are automatically renamed to the name of the destination type.
  • When main types are renamed (move within the same parent), the compilation unit and constructors are automatically renamed
  • The collection of elements being copied must all share the same type of container (for example, must all be type members).
  • The elements are inserted in the new container in the order given.
  • The elements can be positioned in the new container - see #setInsertBefore. By default, the elements are inserted based on the default positions as specified in the creation operation for that element type.
  • This operation can be used to copy and rename elements within the same container.
  • This operation only copies elements contained within compilation units.