Bug 241769 - JSDT package's ASTRewriteFlattener class has problem
Summary: JSDT package's ASTRewriteFlattener class has problem
Status: RESOLVED FIXED
Alias: None
Product: JSDT
Classification: WebTools
Component: General (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.0.5   Edit
Assignee: Chris Jaun CLA
QA Contact: Phil Berkland CLA
URL:
Whiteboard:
Keywords: contributed
Depends on:
Blocks:
 
Reported: 2008-07-22 23:28 EDT by Wang Wei CLA
Modified: 2010-03-03 11:12 EST (History)
4 users (show)

See Also:
thatnitind: review+


Attachments
demo java source file (3.33 KB, application/octet-stream)
2008-07-22 23:30 EDT, Wang Wei CLA
no flags Details
Made the suggested update (940 bytes, patch)
2009-03-23 17:57 EDT, Chris Jaun CLA
thatnitind: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Wang Wei CLA 2008-07-22 23:28:36 EDT
Build ID: I20080617-2000

Steps To Reproduce:
1. Please use the source of attachment file, and run it.

2. Output will be "myTextInput1 : {mouseout : func_deemphasizemouseover : func_emphasizeclick : func_eventListener}".

3. ObjectLiteralFields have no spacing. step2's result was incorrect, 
and correct one should be "myTextInput1 : {mouseout : func_deemphasize, mouseover : func_emphasize, click : func_eventListener}"

More information:

I think the function of ASTRewriteFlattener#visit(ObjectLiteral node) should be fixed. 
Line 402: visitList(node, ObjectLiteral.FIELDS_PROPERTY, null);
should be changed as following:
visitList(node, ObjectLiteral.FIELDS_PROPERTY, String.valueOf(','));

Thanks for your patience and best regards!
Wang Wei
Comment 1 Wang Wei CLA 2008-07-22 23:30:48 EDT
Created attachment 108156 [details]
demo java source file
Comment 2 Chris Jaun CLA 2009-03-23 17:57:52 EDT
Created attachment 129646 [details]
Made the suggested update
Comment 3 Chris Jaun CLA 2009-03-23 17:59:04 EDT
Confirmed the problem that was reported and created a patch based on the suggestion from Wang Wei.

Can be fixed in 3.0.5 and 3.1.
Comment 4 Wang Wei CLA 2009-03-23 22:22:28 EDT
(In reply to comment #3)
> Confirmed the problem that was reported and created a patch based on the
> suggestion from Wang Wei.
> Can be fixed in 3.0.5 and 3.1.

Thank you for your confirm.
and I will recheck this, after Galileo was released.

Best Regards.
Wang Wei


Comment 5 Nitin Dahyabhai CLA 2009-04-02 01:44:24 EDT
Applied to 3.1m7
Comment 6 Nitin Dahyabhai CLA 2009-04-13 15:21:45 EDT
Applied to 3.0.5.  Thanks, Chris.
Comment 7 Wang Wei CLA 2009-05-07 22:12:24 EDT
(In reply to comment #6)
> Applied to 3.0.5.  Thanks, Chris.
> 

This Bug was fixed by using WTP3.0.5, Thanks a lot.

Best Regards.
Wang Wei