Class CreateTypeHierarchyOperation
java.lang.Object
org.aspectj.org.eclipse.jdt.internal.core.JavaModelOperation
org.aspectj.org.eclipse.jdt.internal.core.CreateTypeHierarchyOperation
- All Implemented Interfaces:
org.eclipse.core.resources.IWorkspaceRunnable,org.eclipse.core.runtime.ICoreRunnable,org.eclipse.core.runtime.IProgressMonitor
This operation creates an
ITypeHierarchy for a specific type within
a specified region, or for all types within a region. The specified
region limits the number of resolved subtypes (to the subset of
types in the specified region). The resolved supertypes may go outside
of the specified region in order to reach the root(s) of the type
hierarchy. A Java Project is required to provide a context (classpath)
to use while resolving supertypes and subtypes.- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.aspectj.org.eclipse.jdt.internal.core.JavaModelOperation
JavaModelOperation.IPostAction -
Field Summary
FieldsFields 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, TRUEFields inherited from interface org.eclipse.core.runtime.IProgressMonitor
UNKNOWN -
Constructor Summary
ConstructorsConstructorDescriptionCreateTypeHierarchyOperation(IRegion region, ICompilationUnit[] workingCopies, IType element, boolean computeSubtypes) Constructs an operation to create a type hierarchy for the given type within the specified region, in the context of the given project.CreateTypeHierarchyOperation(IType element, ICompilationUnit[] workingCopies, IJavaProject project, boolean computeSubtypes) Constructs an operation to create a type hierarchy for the given type and working copies.CreateTypeHierarchyOperation(IType element, ICompilationUnit[] workingCopies, IJavaSearchScope scope, boolean computeSubtypes) Constructs an operation to create a type hierarchy for the given type and working copies. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidPerforms the operation - creates the type hierarchyReturns the generated type hierarchy.booleanReturnstrueif this operation performs no resource modifications, otherwisefalse.verify()Possible failures: NO_ELEMENTS_TO_PROCESS - at least one of a type or region must be provided to generate a type hierarchy.Methods inherited from class org.aspectj.org.eclipse.jdt.internal.core.JavaModelOperation
addAction, addDelta, addReconcileDelta, applyTextEdit, beginTask, canModifyRoots, checkCanceled, commonVerify, copyResources, createFile, createFolder, deleteEmptyPackageFragment, deleteResource, deleteResources, done, equalsOneOf, executeNestedOperation, firstActionWithID, getAttribute, getCompilationUnitFor, getCurrentOperationStack, getDocument, getElementToProcess, getJavaModel, getLatestASTLevel, getNestedFolders, getParentElement, getParentElements, getResultElements, getSchedulingRule, getSubProgressMonitor, hasModifiedResource, internalWorked, isCanceled, isTopLevelOperation, moveResources, newJavaElementDelta, popOperation, postAction, prefixesOneOf, pushOperation, removeAllPostAction, removeReconcileDelta, run, runOperation, runPostActions, setAttribute, setCanceled, setNested, setTaskName, subTask, workedMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.eclipse.core.runtime.IProgressMonitor
clearBlocked, setBlocked, slice
-
Field Details
-
typeHierarchy
The generated type hierarchy
-
-
Constructor Details
-
CreateTypeHierarchyOperation
public CreateTypeHierarchyOperation(IRegion region, ICompilationUnit[] workingCopies, IType element, boolean computeSubtypes) Constructs an operation to create a type hierarchy for the given type within the specified region, in the context of the given project. -
CreateTypeHierarchyOperation
public CreateTypeHierarchyOperation(IType element, ICompilationUnit[] workingCopies, IJavaSearchScope scope, boolean computeSubtypes) Constructs an operation to create a type hierarchy for the given type and working copies. -
CreateTypeHierarchyOperation
public CreateTypeHierarchyOperation(IType element, ICompilationUnit[] workingCopies, IJavaProject project, boolean computeSubtypes) Constructs an operation to create a type hierarchy for the given type and working copies.
-
-
Method Details
-
executeOperation
Performs the operation - creates the type hierarchy- Specified by:
executeOperationin classJavaModelOperation- Throws:
JavaModelException- The operation has failed.
-
getResult
Returns the generated type hierarchy. -
isReadOnly
public boolean isReadOnly()Description copied from class:JavaModelOperationReturnstrueif this operation performs no resource modifications, otherwisefalse. Subclasses must override.- Overrides:
isReadOnlyin classJavaModelOperation- See Also:
-
verify
Possible failures:- NO_ELEMENTS_TO_PROCESS - at least one of a type or region must be provided to generate a type hierarchy.
- ELEMENT_NOT_PRESENT - the provided type or type's project does not exist
- Overrides:
verifyin classJavaModelOperation- See Also:
-