|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.jdt.internal.core.JavaModelOperation
org.eclipse.jdt.internal.core.CreateElementInCUOperation
public abstract class CreateElementInCUOperation
This abstract class implements behavior common to CreateElementInCUOperations
.
To create a compilation unit, or an element contained in a compilation unit, the
source code for the entire compilation unit is updated and saved.
The element being created can be positioned relative to an existing
element in the compilation unit via the methods #createAfter
and #createBefore
. By default, the new element is positioned
as the last child of its parent element.
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 | |
---|---|
CreateElementInCUOperation(IJavaElement parentElement)
Constructs an operation that creates a Java Language Element with the specified parent, contained within a compilation unit. |
Method Summary | |
---|---|
void |
createAfter(IJavaElement sibling)
Instructs this operation to position the new element after the given sibling, or to add the new element as the last child of its parent if null . |
void |
createBefore(IJavaElement sibling)
Instructs this operation to position the new element before the given sibling, or to add the new element as the last child of its parent if null . |
abstract java.lang.String |
getMainTaskName()
Returns the name of the main task of this operation for progress reporting. |
IJavaModelStatus |
verify()
Possible failures: NO_ELEMENTS_TO_PROCESS - the compilation unit supplied to the operation is null . |
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 |
---|
public CreateElementInCUOperation(IJavaElement parentElement)
Method Detail |
---|
public void createAfter(IJavaElement sibling)
null
.
public void createBefore(IJavaElement sibling)
null
.
public abstract java.lang.String getMainTaskName()
public IJavaModelStatus verify()
null
.
IJavaModelStatus
,
JavaConventions
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |