org.aspectj.org.eclipse.jdt.internal.core
Class CreateTypeOperation
java.lang.Object
org.aspectj.org.eclipse.jdt.internal.core.JavaModelOperation
org.aspectj.org.eclipse.jdt.internal.core.CreateElementInCUOperation
org.aspectj.org.eclipse.jdt.internal.core.CreateTypeMemberOperation
org.aspectj.org.eclipse.jdt.internal.core.CreateTypeOperation
public class CreateTypeOperation
- extends CreateTypeMemberOperation
This operation creates a class or interface.
Required Attributes:
- Parent element - must be a compilation unit, or type.
- The source code for the type. No verification of the source is
performed.
| 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, operationStacks, parentElements, POST_ACTION_VERBOSE, progressMonitor, REMOVEALL_APPEND, resultElements, TRUE |
|
Constructor Summary |
CreateTypeOperation(IJavaElement parentElement,
java.lang.String source,
boolean force)
When executed, this operation will create a type unit
in the given parent element (a compilation unit, type) |
| Methods inherited from class org.aspectj.org.eclipse.jdt.internal.core.CreateElementInCUOperation |
apply, checkCanceled, createAfter, createBefore, executeOperation, generateNewCompilationUnitAST, generateResultHandles, getCompilationUnit, getMainAmountOfWork, getSchedulingRule, initializeDefaultPosition, insertASTNode, parse, setRelativePosition |
| Methods inherited from class org.aspectj.org.eclipse.jdt.internal.core.JavaModelOperation |
addAction, addDelta, addReconcileDelta, beginTask, canModifyRoots, commonVerify, copyResources, createFile, createFolder, deleteEmptyPackageFragment, deleteResource, deleteResources, done, equalsOneOf, executeNestedOperation, firstActionWithID, getAttribute, getCompilationUnitFor, getCurrentOperationStack, getDocument, getElementsToProcess, getElementToProcess, getJavaModel, getNestedFolders, getParentElement, getParentElements, getResultElements, getSubProgressMonitor, hasModifiedResource, internalWorked, isCanceled, isReadOnly, isTopLevelOperation, moveResources, newJavaElementDelta, popOperation, postAction, prefixesOneOf, pushOperation, removeAllPostAction, removeReconcileDelta, run, runOperation, runPostActions, setAttribute, setCanceled, setNested, setTaskName, subTask, worked |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CreateTypeOperation
public CreateTypeOperation(IJavaElement parentElement,
java.lang.String source,
boolean force)
- When executed, this operation will create a type unit
in the given parent element (a compilation unit, type)
generateElementAST
protected ASTNode generateElementAST(ASTRewrite rewriter,
IDocument document,
ICompilationUnit cu)
throws JavaModelException
- Overrides:
generateElementAST in class CreateTypeMemberOperation
- Throws:
JavaModelException
generateResultHandle
protected IJavaElement generateResultHandle()
- Description copied from class:
CreateElementInCUOperation
- Creates and returns the handle for the element this operation created.
- Specified by:
generateResultHandle in class CreateElementInCUOperation
- See Also:
CreateElementInCUOperation.generateResultHandle()
getMainTaskName
public java.lang.String getMainTaskName()
- Description copied from class:
CreateElementInCUOperation
- Returns the name of the main task of this operation for
progress reporting.
- Specified by:
getMainTaskName in class CreateElementInCUOperation
- See Also:
CreateElementInCUOperation.getMainTaskName()
getType
protected IType getType()
- Returns the
IType the member is to be created in.
- Overrides:
getType in class CreateTypeMemberOperation
verifyNameCollision
protected IJavaModelStatus verifyNameCollision()
- Description copied from class:
CreateTypeMemberOperation
- Verify for a name collision in the destination container.
- Overrides:
verifyNameCollision in class CreateTypeMemberOperation
- See Also:
CreateTypeMemberOperation.verifyNameCollision()
rename
protected SimpleName rename(ASTNode node,
SimpleName newName)
- Specified by:
rename in class CreateTypeMemberOperation