org.eclipse.jdt.internal.core
Class MultiOperation

java.lang.Object
  extended by org.eclipse.jdt.internal.core.JavaModelOperation
      extended by org.eclipse.jdt.internal.core.MultiOperation
All Implemented Interfaces:
IWorkspaceRunnable, org.eclipse.core.runtime.IProgressMonitor
Direct Known Subclasses:
CopyElementsOperation, CopyResourceElementsOperation, DeleteElementsOperation, DeleteResourceElementsOperation

public abstract class MultiOperation
extends JavaModelOperation

This class is used to perform operations on multiple IJavaElement. It is responible for running each operation in turn, collecting the errors and merging the corresponding JavaElementDeltas.

If several errors occured, they are collected in a multi-status JavaModelStatus. Otherwise, a simple JavaModelStatus is thrown.


Field Summary
 
Fields inherited from class org.eclipse.jdt.internal.core.JavaModelOperation
HAS_MODIFIED_RESOURCE_ATTR, progressMonitor, TRUE
 
Fields inherited from interface org.eclipse.core.runtime.IProgressMonitor
UNKNOWN
 
Method Summary
 void setInsertBefore(IJavaElement modifiedElement, IJavaElement newSibling)
          Sets the insertion position in the new container for the modified element.
 void setRenamings(java.lang.String[] renamingsList)
          Sets the new names to use for each element being copied.
 
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
 

Method Detail

setInsertBefore

public void setInsertBefore(IJavaElement modifiedElement,
                            IJavaElement newSibling)
Sets the insertion position in the new container for the modified element. The element being modified will be inserted before the specified new sibling. The given sibling must be a child of the destination container specified for the modified element. The default is null, which indicates that the element is to be inserted at the end of the container.


setRenamings

public void setRenamings(java.lang.String[] renamingsList)
Sets the new names to use for each element being copied. The renamings correspond to the elements being processed, and the number of renamings must match the number of elements being processed. A null entry in the list indicates that an element is not to be renamed.

Note that some renamings may not be used. If both a parent and a child have been selected for copy/move, only the parent is changed. Therefore, if a new name is specified for the child, the child's name will not be changed.