Summary: | [API] ReconcileContext API: Does getAST3 return AST with bindings? | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Martin Aeschlimann <martinae> | ||||||
Component: | Core | Assignee: | Olivier Thomann <Olivier_Thomann> | ||||||
Status: | VERIFIED FIXED | QA Contact: | |||||||
Severity: | normal | ||||||||
Priority: | P3 | CC: | daniel_megert, frederic_fusier, jerome_lanneluc, Olivier_Thomann, srikanth_sankaran | ||||||
Version: | 3.2 | ||||||||
Target Milestone: | 3.6 M5 | ||||||||
Hardware: | PC | ||||||||
OS: | Windows XP | ||||||||
Whiteboard: | |||||||||
Attachments: |
|
Description
Martin Aeschlimann
2006-03-01 12:54:39 EST
Rigth now this is not true. getAST3() doesn't trigger the statement recovery. This would require a new API for 3.3. org.eclipse.jdt.core.compiler.ReconcileContext.isResolvingBindings() to know if the returned AST has resolved bindings. A corresponding API could be added to query the ReconcileContext about statement recovery. Would this be good enough ? I'll try to implement comment 2. Daniel, is this something required for JDT/UI or JDT/Text? >Daniel, is this something required for JDT/UI or JDT/Text?
No, we don't even use that method currently.
To be consistent we should add the requested API. Created attachment 155429 [details]
Proposed fix
Released for 3.6M5. Implementation is trivial. Added regression tests in: org.eclipse.jdt.core.tests.model.ReconcilerTests#testIgnoreMethodBodies3 org.eclipse.jdt.core.tests.model.ReconcilerTests#testIgnoreMethodBodies4 Created attachment 155471 [details]
Proposed fix + regression test
I prefer to expose the reconcile flags. This will allow to expose any further bits used by the reconciler. All bits are API so it is not like we expose bits that cannot be checked by the user.
Verified for 3.6M5 by code inspection. |