Example usage for org.eclipse.jdt.internal.core.util Messages hierarchy_nullFocusType

List of usage examples for org.eclipse.jdt.internal.core.util Messages hierarchy_nullFocusType

Introduction

In this page you can find the example usage for org.eclipse.jdt.internal.core.util Messages hierarchy_nullFocusType.

Prototype

String hierarchy_nullFocusType

To view the source code for org.eclipse.jdt.internal.core.util Messages hierarchy_nullFocusType.

Click Source Link

Usage

From source file:org.eclipse.jdt.internal.core.JavaProject.java

License:Open Source License

/**
 * @see IJavaProject//from  w w w.j a v  a2  s . co m
 */
public ITypeHierarchy newTypeHierarchy(IType type, IRegion region, WorkingCopyOwner owner,
        IProgressMonitor monitor) throws JavaModelException {

    if (type == null) {
        throw new IllegalArgumentException(Messages.hierarchy_nullFocusType);
    }
    if (region == null) {
        throw new IllegalArgumentException(Messages.hierarchy_nullRegion);
    }
    ICompilationUnit[] workingCopies = JavaModelManager.getJavaModelManager().getWorkingCopies(owner,
            true/*add primary working copies*/);
    CreateTypeHierarchyOperation op = new CreateTypeHierarchyOperation(region, workingCopies, type,
            true/*compute subtypes*/);
    op.runOperation(monitor);
    return op.getResult();
}