/** * Add the appropriate Problem when a type annotation did not resolve to a Type * @param typeNode the Node to use for location info for the problem * @param typeDef The IDefinition the type annotation resolved to * @param typeDesc A String to use as the description of the type annotation in the diagnostic * @param reportAmbiguousReference A flag indicating whether an AmbiguousReferenceProblem * should be reported, if the <code>typeDef</code> is ambiguous. */ public void addTypeProblem (IASNode typeNode, IDefinition typeDef, String typeDesc, boolean reportAmbiguousReference) { if( AmbiguousDefinition.isAmbiguous(typeDef) ) { if (reportAmbiguousReference) addProblem(new AmbiguousReferenceProblem(typeNode, typeDesc)); } else { addProblem(new UnknownTypeProblem(typeNode, typeDesc)); } }
/** * Add the appropriate Problem when a type annotation did not resolve to a Type * @param typeNode the Node to use for location info for the problem * @param typeDef The IDefinition the type annotation resolved to * @param typeDesc A String to use as the description of the type annotation in the diagnostic * @param reportAmbiguousReference A flag indicating whether an AmbiguousReferenceProblem * should be reported, if the <code>typeDef</code> is ambiguous. */ public void addTypeProblem (IASNode typeNode, IDefinition typeDef, String typeDesc, boolean reportAmbiguousReference) { if( AmbiguousDefinition.isAmbiguous(typeDef) ) { if (reportAmbiguousReference) addProblem(new AmbiguousReferenceProblem(typeNode, typeDesc)); } else { addProblem(new UnknownTypeProblem(typeNode, typeDesc)); } }
if (pd == null) UnknownTypeProblem problem = new UnknownTypeProblem(parameterDefinition.getNode(), parameterDefinition.getQualifiedName()); getProject().getProblems().add(problem); write("not found");