Summary: | [AST][DOM] source range of ParenthesizedExpression does not include the parenthesis | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Benno Baumgartner <benno.baumgartner> | ||||||||||
Component: | Core | Assignee: | Frederic Fusier <frederic_fusier> | ||||||||||
Status: | VERIFIED FIXED | QA Contact: | |||||||||||
Severity: | major | ||||||||||||
Priority: | P3 | CC: | daniel_megert, eric_jodet, martinae, Olivier_Thomann, roland.illig | ||||||||||
Version: | 3.3 | ||||||||||||
Target Milestone: | 3.4 M4 | ||||||||||||
Hardware: | PC | ||||||||||||
OS: | Windows XP | ||||||||||||
Whiteboard: | |||||||||||||
Attachments: |
|
Description
Benno Baumgartner
2007-10-29 07:05:36 EDT
Created attachment 81436 [details]
test case for a)
Looks like a AST problem: The ParentheziedExpression's range does not include the parenthesis I'll take a look. Reproduced. I am investigating. Created attachment 81468 [details]
Proposed fix
Created attachment 81469 [details]
Regression test
Frederic, Please review. Created attachment 81740 [details]
Proposed patch
I would prefer to add new constructor on BinaryExpression and CombinedBinaryExpression to avoid missing the duplication of this important information (sourceStart, sourceEnd, bits) anywhere this pattern is encountered.
This does not add extra time cost and, IMO, make the code safer. What do you think?
+1. Patch look good. Released for 3.4M4 in HEAD stream. Verified for 3.4 M4 using build I20071211-0010 Will this bug be fixed in an update to Eclipse 3.3? Or do I have to upgrade to 3.4? |