| Summary: | ASTParser should honor set compiler options in all cases | ||
|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Dirk Baeumer <dirk_baeumer> |
| Component: | Core | Assignee: | Olivier Thomann <Olivier_Thomann> |
| Status: | VERIFIED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | jeem |
| Version: | 3.0 | ||
| Target Milestone: | 3.0 M8 | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | |||
| Bug Depends on: | |||
| Bug Blocks: | 52773 | ||
|
Description
Dirk Baeumer
I released the right code for ASTParse.create... method. If you set the new compiler options using setCompilerOptions(...) after you set the ICompilationUnit. It should do it. I added TODOs for Jim to update the javadoc and explain that setSource(ICompilationUnit) also sets the java project and the compiler options. Give it a try and reopen it if your problem is not fixed. All tests passed. The ASTParser now correctly remembers the options set via setCompilerOptions, these options, but they are not passed to the CompilationUnitResolver.resolve method. Hence the resolver is again taking the options from the project. See code CompilationUnitResolver#resolve and its use in ASTParser#internalCreateAST. I am investigating. Changed the code in CompilationUnitResolver to reuse the compiler options set in the ASTParser. Fixed and released in HEAD. I will write a test case for this one. Should the fix be in I200403230010 ? Yes. Do you have a problem with it? No, just wanted to double check since I tested and earlier build. Dirk, could you please confirm that it is now working as desired and close as VERIFIED? Thanks. Verified |