org.aspectj.org.eclipse.jdt.internal.core
Class CreateTypeHierarchyOperation

java.lang.Object
  extended by org.aspectj.org.eclipse.jdt.internal.core.JavaModelOperation
      extended by org.aspectj.org.eclipse.jdt.internal.core.CreateTypeHierarchyOperation

public class CreateTypeHierarchyOperation
extends JavaModelOperation

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:
ITypeHierarchy

Nested Class Summary
 
Nested classes/interfaces inherited from class org.aspectj.org.eclipse.jdt.internal.core.JavaModelOperation
JavaModelOperation.IPostAction
 
Field Summary
protected  TypeHierarchy typeHierarchy
          The generated type hierarchy
 
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
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.
 
Method Summary
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.
 
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, 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, worked
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

typeHierarchy

protected TypeHierarchy typeHierarchy
The generated type hierarchy

Constructor Detail

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 Detail

executeOperation

protected void executeOperation()
                         throws JavaModelException
Performs the operation - creates the type hierarchy

Specified by:
executeOperation in class JavaModelOperation
Throws:
JavaModelException - The operation has failed.

getResult

public ITypeHierarchy getResult()
Returns the generated type hierarchy.


isReadOnly

public boolean isReadOnly()
Description copied from class: JavaModelOperation
Returns true if this operation performs no resource modifications, otherwise false. Subclasses must override.

Overrides:
isReadOnly in class JavaModelOperation
See Also:
JavaModelOperation

verify

public IJavaModelStatus verify()
Possible failures:

Overrides:
verify in class JavaModelOperation
See Also:
IJavaModelStatus