org.eclipse.jdt.internal.core
Class DeleteElementsOperation

java.lang.Object
  extended by org.eclipse.jdt.internal.core.JavaModelOperation
      extended by org.eclipse.jdt.internal.core.MultiOperation
          extended by org.eclipse.jdt.internal.core.DeleteElementsOperation
All Implemented Interfaces:
IWorkspaceRunnable, org.eclipse.core.runtime.IProgressMonitor

public class DeleteElementsOperation
extends MultiOperation

This operation deletes a collection of elements (and all of their children). If an element does not exist, it is ignored.

NOTE: This operation only deletes elements contained within leaf resources - that is, elements within compilation units. To delete a compilation unit or a package, etc (which have an actual resource), a DeleteResourcesOperation should be used.


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
 
Constructor Summary
DeleteElementsOperation(IJavaElement[] elementsToDelete, boolean force)
          When executed, this operation will delete the given elements.
 
Method Summary
 
Methods inherited from class org.eclipse.jdt.internal.core.MultiOperation
setInsertBefore, setRenamings
 
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
 

Constructor Detail

DeleteElementsOperation

public DeleteElementsOperation(IJavaElement[] elementsToDelete,
                               boolean force)
When executed, this operation will delete the given elements. The elements to delete cannot be null or empty, and must be contained within a compilation unit.