boolean requiresSuperclass = getSuperClass() == null || getSuperClass().matches("\\s*");
if (!requiresSuperclass) {
requiresSuperclass = true;
try {
IType supertype = getJavaProject().findType(getSuperClass());
ITypeHierarchy supertypeHierarchy = supertype.newSupertypeHierarchy(new NullProgressMonitor());
if (supertypeHierarchy.contains(getDefaultWOComponentType())) {
requiresSuperclass = false;
}
} catch (JavaModelException e) {
// nothing to do, invalid type