Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 28315 - [evaluation] Evaluation in the context of an anonymous class with no default constructor
Summary: [evaluation] Evaluation in the context of an anonymous class with no default ...
Status: RESOLVED DUPLICATE of bug 45507
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 2.1   Edit
Hardware: PC Linux
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: JDT-Debug-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-12-13 23:12 EST by Luc Bourlier CLA
Modified: 2006-06-19 14:11 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Luc Bourlier CLA 2002-12-13 23:12:20 EST
The evaluation in the context of an anonymous class which has no default
constructor is currently no supported. See bug 26159 for detail.

The problem is in the generation of the source used to compile the snippet. If
the snippet is to evaluate is the context of an anonymous class with no default
constructor, the context is no correctly recreated.
To generate correctly this source, we need some information about the binding of
some element contained in the AST of the base source. These binding are no
resolved in the current implementation, as their resolution can be expensive and
their results useless in all other (currently supported) cases.

A solution in this case, may be to parse a second time the source, with the
resolution of the bindings, and generated a valid source from the new AST.
Comment 1 Darin Wright CLA 2002-12-16 12:46:33 EST
Investigate for 2.1.
Comment 2 Uli Bubenheimer CLA 2003-04-23 10:27:13 EDT
"Investigate for 2.1" did not lead to a resolution for this problem, since it 
is still around in 2.1. How about "fix in 2.2"?
Comment 3 Darin Wright CLA 2003-05-15 16:02:20 EDT
Consider for 3.0
Comment 4 Darin Wright CLA 2004-03-26 10:41:00 EST
Deferred
Comment 5 Darin Wright CLA 2006-06-19 14:11:22 EDT
Evaluations work in inner classes in 3.2. There is a restriction that member fields cannot be accessed (bug 45507). Re-opening to mark as works for me. Other issues should be reported as new bugs.
Comment 6 Darin Wright CLA 2006-06-19 14:11:39 EDT

*** This bug has been marked as a duplicate of 45507 ***