|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.aspectj.org.eclipse.jdt.internal.core.JavaModelOperation
org.aspectj.org.eclipse.jdt.internal.core.MultiOperation
org.aspectj.org.eclipse.jdt.internal.core.DeleteElementsOperation
public class DeleteElementsOperation
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.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.aspectj.org.eclipse.jdt.internal.core.JavaModelOperation |
|---|
JavaModelOperation.IPostAction |
| Field Summary | |
|---|---|
protected java.util.Map |
childrenToRemove
The elements this operation processes grouped by compilation unit |
protected ASTParser |
parser
The ASTParser used to manipulate the source code of
ICompilationUnit. |
| Fields inherited from class org.aspectj.org.eclipse.jdt.internal.core.MultiOperation |
|---|
insertBeforeElements, newParents, renamings, renamingsList |
| Fields inherited from class org.aspectj.org.eclipse.jdt.internal.core.JavaModelOperation |
|---|
actions, actionsEnd, actionsStart, APPEND, attributes, elementsToProcess, force, HAS_MODIFIED_RESOURCE_ATTR, isNested, KEEP_EXISTING, NO_ELEMENTS, OPERATION_STACKS, parentElements, POST_ACTION_VERBOSE, progressMonitor, REMOVEALL_APPEND, resultElements, TRUE |
| Constructor Summary | |
|---|---|
DeleteElementsOperation(IJavaElement[] elementsToDelete,
boolean force)
When executed, this operation will delete the given elements. |
|
| Method Summary | |
|---|---|
protected java.lang.String |
getMainTaskName()
Returns the name to be used by the progress monitor. |
protected ISchedulingRule |
getSchedulingRule()
|
protected void |
groupElements()
Groups the elements to be processed by their compilation unit. |
protected void |
processElement(IJavaElement element)
Deletes this element from its compilation unit. |
protected void |
processElements()
Processes all the IJavaElements in turn, collecting errors
and updating the progress monitor. |
protected void |
verify(IJavaElement element)
This method is called for each IJavaElement before
processElement. |
| Methods inherited from class org.aspectj.org.eclipse.jdt.internal.core.MultiOperation |
|---|
error, executeOperation, getDestinationParent, getNewNameFor, isMove, isRename, setInsertBefore, setRenamings, verifyDestination, verifyRenaming, verifySibling |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.util.Map childrenToRemove
Keys are compilation units,
values are IRegions of elements to be processed in each
compilation unit.protected ASTParser parser
ASTParser used to manipulate the source code of
ICompilationUnit.
| Constructor Detail |
|---|
public DeleteElementsOperation(IJavaElement[] elementsToDelete,
boolean force)
null or empty, and must be contained within a
compilation unit.
| Method Detail |
|---|
protected java.lang.String getMainTaskName()
MultiOperation
getMainTaskName in class MultiOperationMultiOperationprotected ISchedulingRule getSchedulingRule()
getSchedulingRule in class JavaModelOperation
protected void groupElements()
throws JavaModelException
JavaModelException
protected void processElement(IJavaElement element)
throws JavaModelException
processElement in class MultiOperationJavaModelExceptionMultiOperation
protected void processElements()
throws JavaModelException
MultiOperationIJavaElements in turn, collecting errors
and updating the progress monitor.
processElements in class MultiOperationJavaModelException - if one or several operation(s) was unable to
be completed.This method first group the elements by ICompilationUnit,
and then processes the ICompilationUnit.
protected void verify(IJavaElement element)
throws JavaModelException
MultiOperationIJavaElement before
processElement. It should check that this element
can be processed.
verify in class MultiOperationJavaModelExceptionMultiOperation
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||