*
* @return the status of the validation
*/
protected IStatus superClassChanged() {
StatusInfo status = new StatusInfo();
IPackageFragmentRoot root = getPackageFragmentRoot();
fSuperClassDialogField.enableButton(root != null);
fSuperClassStubTypeContext = null;
String sclassName = getSuperClass();
if (sclassName.length() == 0) {
// accept the empty field (stands for java.lang.Object)
return status;
}
if (root != null) {
Type type = TypeContextChecker.parseSuperClass(sclassName);
if (type == null) {
status.setError(NewWizardMessages.NewTypeWizardPage_error_InvalidSuperClassName);
return status;
}
if (type instanceof ParameterizedType && !JavaModelUtil.is50OrHigher(root.getJavaProject())) {
status.setError(NewWizardMessages.NewTypeWizardPage_error_SuperClassNotParameterized);
return status;
}
} else {
status.setError(""); //$NON-NLS-1$