Summary: | API to retain binding resolution cache between successive calls of ASTParser.createAST() | ||
---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Satish C Gupta <satish.gupta> |
Component: | Core | Assignee: | JDT-Core-Inbox <jdt-core-inbox> |
Status: | NEW --- | QA Contact: | |
Severity: | enhancement | ||
Priority: | P3 | CC: | satish.gupta, satyam.kandula, srikanth_sankaran |
Version: | 3.6 | ||
Target Milestone: | --- | ||
Hardware: | PC | ||
OS: | Windows XP | ||
See Also: |
https://bugs.eclipse.org/bugs/show_bug.cgi?id=150657 https://bugs.eclipse.org/bugs/show_bug.cgi?id=164660 https://bugs.eclipse.org/bugs/show_bug.cgi?id=257528 |
||
Whiteboard: | |||
Attachments: |
Description
Satish C Gupta
2010-02-06 02:17:21 EST
Created attachment 158372 [details]
Test Case
Created attachment 158373 [details]
YourKit CPU Profile snap shot for the test case
Created attachment 158374 [details]
YourKit CPU Profile snap shot for a test case in actual usage
Created attachment 158441 [details]
YourKit CPU Profile snap shot for the test case
Created attachment 158442 [details]
YourKit CPU Profile snap shot for a test case in actual usage
In my usage scenario, I create a AST (using org.eclipse.jdt.core.dom.AST.newXXX() functions) by traversing my data models (of course, this AST has no binding resolution). Then I have to un-parse it (ASTNode.toString()) to create a string that needs to be returned by WorkingCopyOwner.findSource(). And then JDT parses that String, construct the AST with binding resolution. I am wondering, probably other usage scenarios where incremental binding resolution is required, the needs could be similar. That the structural info (Class, method) would be available in some application specific internal data structure from which source code String would be constructed. It is much more easier efficient to create an AST out of that info, but the consequence is unnecessary un-parsing and parsing. Is it possible to have APIs based on ASTNode instead string, for example: ASTParser.setSource(ASTNode), and JDT does the binding resolution of the given Compilation Unit AST Node? Essentially a way to avoid unneeded un-parsing and parsing. |