List of usage examples for org.eclipse.jdt.internal.compiler.ast TypeDeclaration hasErrors
@Override public boolean hasErrors()
From source file:org.eclipse.objectteams.otdt.internal.core.compiler.control.Dependencies.java
License:Open Source License
/** * Doing fault in types here and not via CompilationUnitScope * allows us to process single types without processing the whole * compilation unit!/*from ww w . j a v a 2 s . c o m*/ * We also add some OT-specific transformantions: * - faultInRoleImports * - evaluateLateAttributes */ private static boolean establishFaultInTypes(TypeModel clazz) { TypeDeclaration ast = clazz.getAst(); if (ast != null && ast.scope != null) { ast.scope.compilationUnitScope().faultInImports(); SourceTypeBinding typeBinding = ast.binding; typeBinding.faultInTypesForFieldsAndMethods(); faultInRoleImports(ast); } // more attributes after fields and methods are in place (CallXXMethodMappingAttribute) if (clazz.getBinding() != null) { ModelElement.evaluateLateAttributes(clazz.getBinding(), STATE_FAULT_IN_TYPES); } else { assert ast != null && ast.hasErrors(); } clazz.setState(STATE_FAULT_IN_TYPES); clazz.setMemberState(STATE_FAULT_IN_TYPES); return true; }