Community
Participate
Working Groups
20060301 The spec of ReconcileContext.getAST3 should tell the client if the return AST is one with resolved bindings and if statement recovery is enabled. Most clients depend on bindings and statement recovery. If they get a AST without that they will have to recreate one, which will lead to bad performance.
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.