Klasse CopyResourceElementsOperation

Alle implementierten Schnittstellen:
SuffixConstants, org.eclipse.core.resources.IWorkspaceRunnable, org.eclipse.core.runtime.ICoreRunnable, org.eclipse.core.runtime.IProgressMonitor
Bekannte direkte Unterklassen:
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.
  • Felddetails

    • createdElements

      protected ArrayList createdElements
      The list of new resources created during this operation.
    • deltasPerProject

      protected Map deltasPerProject
      Table specifying deltas for elements being copied/moved/renamed. Keyed by elements' project(s), and values are the corresponding deltas.
    • parser

      protected ASTParser parser
      The ASTParser used to manipulate the source code of ICompilationUnit.
  • Konstruktordetails

    • 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.
  • Methodendetails