Bug 159209

Summary: [model] The CompilationUnit associated with an IJavaElementDelta does not include diagnostics generated from APT
Product: [Eclipse Project] JDT Reporter: Tom Stamm <stammt>
Component: CoreAssignee: Jerome Lanneluc <jerome_lanneluc>
Status: RESOLVED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: eclipse, frederic_fusier, jgarms, stammt
Version: 3.2   
Target Milestone: 3.3 RC4   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Tom Stamm CLA 2006-09-28 18:26:02 EDT
The javadoc on IJavaElementDelta.getCompilationUnitAST says that it returns "the compilation unit AST created by the last reconcile operation", which seems to imply that it has been processed by both the main jdt compiler and any annotation processors. But when I call getProblems() on that AST I only get diagnostics from the base compiler (syntax errors, bad types, etc) and not any that were generated by an annotation processor, even though those do show up in the source view.
Comment 1 Jerome Lanneluc CLA 2007-06-20 06:55:36 EDT
APT uses ReconcileContext#putProblems(...) to report problems. This specifies that these problems are reported to the problem requestor, not added to the AST. Also CompilationUnit#getProblems() specifies that the problems are the one created by the compiler (not by a compiler participant).
Works as designed.