Bug 48489

Summary: [DCR] AST support for a single expression (vs. CU)
Product: [Eclipse Project] JDT Reporter: Gili Mendel <gmendel>
Component: CoreAssignee: Olivier Thomann <Olivier_Thomann>
Status: VERIFIED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: daveo, sgunturi
Version: 3.0   
Target Milestone: 3.0 M7   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Gili Mendel CLA 2003-12-11 10:19:48 EST
The VE project is in dire need for the ability to generate an AST (not binding)
from a char. array that is not a complete CU.

VE generates src. expressions in response to Visual requests.  An expression is
being generated from a JET (JSP like) template, and my be driven through a
formater.   VE needs to generate an AST (binding is not needed) for the new
expression so that in the future comparisons can be made with changes to the
source code.

At this time we have to generate an AST for the entire CU in order to get the
AST for a single expression.
Comment 1 Philipe Mulet CLA 2003-12-11 10:26:06 EST
Olivier: can you please add an API like the one we have on the formatter using 
a kind and a source char[] (and int offsets).

The contract is that you could not get bindings from these.
Comment 2 Olivier Thomann CLA 2004-01-16 13:06:25 EST
Fixed and released in HEAD.
Javadoc is still subject to change according to the feedback we have.
Regression tests added in ASTConverterTest2.
Comment 3 David J. Orme CLA 2004-01-16 13:37:58 EST
*** Bug 39512 has been marked as a duplicate of this bug. ***
Comment 4 Frederic Fusier CLA 2004-02-11 09:13:12 EST
Verified for 3.0-M7 with build I200402102000.