public class CreateTypeHierarchyOperation extends JavaModelOperation
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.ITypeHierarchyJavaModelOperation.IPostAction| Modifier and Type | Field and Description |
|---|---|
protected TypeHierarchy |
typeHierarchy
The generated type hierarchy
|
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 and Description |
|---|
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(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.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
executeOperation()
Performs the operation - creates the type hierarchy
|
ITypeHierarchy |
getResult()
Returns the generated type hierarchy.
|
boolean |
isReadOnly()
Returns
true if this operation performs no resource modifications,
otherwise false. |
IJavaModelStatus |
verify()
Possible failures:
NO_ELEMENTS_TO_PROCESS - at least one of a type or region must
be provided to generate a type hierarchy.
|
addAction, addDelta, addReconcileDelta, applyTextEdit, beginTask, canModifyRoots, checkCanceled, commonVerify, copyResources, createFile, createFolder, deleteEmptyPackageFragment, deleteResource, deleteResources, done, equalsOneOf, executeNestedOperation, firstActionWithID, getAttribute, getCompilationUnitFor, getCurrentOperationStack, getDocument, getElementToProcess, getJavaModel, 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, workedprotected TypeHierarchy typeHierarchy
public CreateTypeHierarchyOperation(IRegion region, ICompilationUnit[] workingCopies, IType element, boolean computeSubtypes)
public CreateTypeHierarchyOperation(IType element, ICompilationUnit[] workingCopies, IJavaSearchScope scope, boolean computeSubtypes)
public CreateTypeHierarchyOperation(IType element, ICompilationUnit[] workingCopies, IJavaProject project, boolean computeSubtypes)
protected void executeOperation()
throws JavaModelException
executeOperation in class JavaModelOperationJavaModelException - The operation has failed.public ITypeHierarchy getResult()
public boolean isReadOnly()
JavaModelOperationtrue if this operation performs no resource modifications,
otherwise false. Subclasses must override.isReadOnly in class JavaModelOperationJavaModelOperationpublic IJavaModelStatus verify()
verify in class JavaModelOperationIJavaModelStatus