Bug 130001 - [api][AST] org.eclipse.jdt.core.dom.AST: should have API hasResolvedBindings, hasStatementRecovery
Summary: [api][AST] org.eclipse.jdt.core.dom.AST: should have API hasResolvedBindings,...
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.3 M6   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-03-01 12:59 EST by Martin Aeschlimann CLA
Modified: 2007-03-20 11:34 EDT (History)
1 user (show)

See Also:


Attachments
First draft (125.06 KB, patch)
2007-03-13 14:47 EDT, Olivier Thomann CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Aeschlimann CLA 2006-03-01 12:59:48 EST
20060301

Having an AST in hand it is not possible to know if such an AST was created with bindings and if it was created with statement recovery.

Sometimes you get an AST from some API (e.g. ReconcileContext.getAST3) and you need to know if you can work with this AST. Most times it is essential to know that bindings were resolved and if statement recovery occurred.

Suggestion: new API
 - hasResolvedBindings(): boolean
 - hasStatementRecovery(): boolean
Comment 1 Olivier Thomann CLA 2006-10-10 16:55:35 EDT
Philippe,

Do you want these two APIs?
Comment 2 Martin Aeschlimann CLA 2007-03-12 11:31:49 EDT
Would be nice for 3.3 if its a simple fix.
Comment 3 Olivier Thomann CLA 2007-03-13 13:38:31 EDT
I'll take care of that.
Comment 4 Olivier Thomann CLA 2007-03-13 13:39:13 EDT
API should go on the AST class, I guess.
Comment 5 Martin Aeschlimann CLA 2007-03-13 14:06:28 EDT
Yes
Comment 6 Olivier Thomann CLA 2007-03-13 14:10:15 EDT
So I guess you also need to know if binding are incomplete (binding recovery enabled) ? 
Comment 7 Martin Aeschlimann CLA 2007-03-13 14:18:02 EDT
Yes
Comment 8 Olivier Thomann CLA 2007-03-13 14:47:05 EDT
Created attachment 60709 [details]
First draft

This doesn't contain the code for the binding recovery flag since this depends on bug 149567. It will be added if bug 149567 is fixed for 3.3M6.
Comment 9 Philipe Mulet CLA 2007-03-15 06:18:48 EDT
+1
Comment 10 Olivier Thomann CLA 2007-03-15 12:08:30 EDT
Released for 3.3M6 as a macro patch with fix for 149567.
Regression tests added in org.eclipse.jdt.core.tests.dom.ASTConverter15Test#test0253/0257 and org.eclipse.jdt.core.tests.dom.ASTConverterTestAST3_2#test0670/0673
Comment 11 David Audel CLA 2007-03-20 11:34:05 EDT
Verified for 3.3 M6 using build I20070320-0010