compositeRefactoring.codemanipulation
Class DeleteCompilationUnit
java.lang.Object
|
+--org.eclipse.jdt.internal.core.JavaModelOperation
|
+--org.eclipse.jdt.internal.core.MultiOperation
|
+--org.eclipse.jdt.internal.core.DeleteResourceElementsOperation
|
+--compositeRefactoring.codemanipulation.DeleteCompilationUnit
- All Implemented Interfaces:
- IProgressMonitor, IWorkspaceRunnable
- public class DeleteCompilationUnit
- extends DeleteResourceElementsOperation
This is a convenience class to make the DeleteResourceElementsOperation public.
The class deletes a compilation unit.
Methods inherited from class org.eclipse.jdt.internal.core.MultiOperation |
error, executeOperation, getDestinationParent, getNewNameFor, isMove, isRename, mergeDeltas, processElements, setInsertBefore, setRenamings, verifyDestination, verifyRenaming, verifySibling |
Methods inherited from class org.eclipse.jdt.internal.core.JavaModelOperation |
addDelta, beginTask, checkCanceled, commonVerify, copyResources, createFile, createFolder, deleteEmptyPackageFragment, deleteResource, deleteResources, done, execute, executeNestedOperation, getCompilationUnitFor, getElementsToProcess, getElementToProcess, getJavaModel, getParentElement, getParentElements, getResultElements, getSubProgressMonitor, getWorkspace, hasModifiedResource, internalWorked, isCanceled, isReadOnly, makeWorkingCopiesConsistent, moveResources, newJavaElementDelta, registerDeltas, run, setCanceled, setNested, setTaskName, subTask, verify, walkDeltaMakingWorkingCopiesConsistent, worked |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DeleteCompilationUnit
public DeleteCompilationUnit(IJavaElement[] elementsToProcess,
boolean force)
- creates a DeleteCompilationUnit object.
- Parameters:
elementsToProcess
- the compilation units which are to be deletedforce
- indicates whether the hostory shall be dismissed.
processElement
protected void processElement(IJavaElement element)
- deletes the element. Before deletion it is verified if
the element is deletable.
- Overrides:
processElement
in class DeleteResourceElementsOperation
- Parameters:
element
- the element to delete.
doDelete
public void doDelete()
- deletes all elements with which the constructor was initialized.