protected boolean isValidExtendedType(String className) throws JavaModelException {
		// accept the empty field (stands for the default super type)
		if (!Strings.isNullOrEmpty(className)) {
			final IType rootType = getRootSuperType();
			if (rootType == null) {
				final IStatus status = SARLEclipsePlugin.getDefault().createStatus(IStatus.ERROR,
						Messages.AbstractNewSarlElementWizardPage_3);
				throw new JavaModelException(new CoreException(status));
			}
			final IType type = getJavaProject().findType(className);
			if (type == null) {
				final IStatus status = SARLEclipsePlugin.getDefault().createStatus(IStatus.ERROR,
						MessageFormat.format(Messages.AbstractNewSarlElementWizardPage_4, className));
				throw new JavaModelException(new CoreException(status));
			}
			final ITypeHierarchy hierarchy = type.newSupertypeHierarchy(new NullProgressMonitor());
			if (hierarchy == null || !hierarchy.contains(rootType)) {
				return false;
			}
		}
		return true;
	}
protected boolean isValidExtendedType ( String className ) throws JavaModelException { if ( ! Strings . isNullOrEmpty ( className ) ) { final IType rootType = getRootSuperType ( ) ; if ( rootType == null ) { final IStatus status = SARLEclipsePlugin . getDefault ( ) . createStatus ( IStatus . ERROR , Messages . AbstractNewSarlElementWizardPage_3 ) ; throw new JavaModelException ( new CoreException ( status ) ) ; } final IType type = getJavaProject ( ) . findType ( className ) ; if ( type == null ) { final IStatus status = SARLEclipsePlugin . getDefault ( ) . createStatus ( IStatus . ERROR , MessageFormat . format ( Messages . AbstractNewSarlElementWizardPage_4 , className ) ) ; throw new JavaModelException ( new CoreException ( status ) ) ; } final ITypeHierarchy hierarchy = type . newSupertypeHierarchy ( new NullProgressMonitor ( ) ) ; if ( hierarchy == null || ! hierarchy . contains ( rootType ) ) { return false ; } } return true ; }
Replies if the given type is a subtype of the expected super-type.
The expected super-type is replied by {@link #getRootSuperType()}.

@param className the name of the class to be tested.
@return <code>true</code> if the given name is the one of a subtype
of the expected root type.
@throws JavaModelException if there is a problem for retreiving the Java information.