Bug 241769

Summary: JSDT package's ASTRewriteFlattener class has problem
Product: [WebTools] JSDT Reporter: Wang Wei <wangwei>
Component: GeneralAssignee: Chris Jaun <cmjaun>
Status: RESOLVED FIXED QA Contact: Phil Berkland <berkland>
Severity: normal    
Priority: P3 CC: cmjaun, ryohei.m, thatnitind, zhouy
Version: 3.0Keywords: contributed
Target Milestone: 3.0.5Flags: thatnitind: review+
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
demo java source file
none
Made the suggested update thatnitind: iplog+

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