if (_validateTemplatesNow) {
try {
if (_buildKind == IncrementalProjectBuilder.INCREMENTAL_BUILD || _buildKind == IncrementalProjectBuilder.AUTO_BUILD) {
ICompilationUnit compilationUnit = JavaCore.createCompilationUnitFrom((IFile) resource);
if (compilationUnit != null) {
IType type = compilationUnit.findPrimaryType();
if (type != null) {
IType woElementType = type.getJavaProject().findType("com.webobjects.appserver.WOElement", progressMonitor);
if (woElementType != null) {
ITypeHierarchy typeHierarchy = SuperTypeHierarchyCache.getTypeHierarchy(type, progressMonitor);
if (typeHierarchy != null && typeHierarchy.contains(woElementType)) {