Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 363466

Summary: Add event function in properties view can introduce wrong function
Product: z_Archived Reporter: Yu Hao <yuhaodl>
Component: EDTAssignee: Yun Feng Ma <mayunf>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P1 CC: chenzhh, svihovec
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Yu Hao CLA 2011-11-10 08:58:57 EST
Build Identifier: 201111092101

Add event function via Properties view, EDT can introduce some invalid function such as:

    function e.widget_onChange(event Event in)
    	
    end
Then there will be Syntax error in egl source code.

Reproducible: Always

Steps to Reproduce:
1.Create a egl web project and create a RUI handler in this project
2.DnD a widget(dojo or RUI) into the handler. such as a CheckBox
3.Manually added below function into source:

    function dojo_onWidgetLoad(e event in)
    	syslib.writestdout(e.widget.getId() + " was loaded!");
    end
4.Open Properties->Events, selected function dojo_onWidgetLoad to be the function of Event onWidgetLoad
5.Select another Event such as onChange then click the "+" button in the right
You will found a function named e.widget_onChange will be created and it will introduce syntax error
Comment 1 Huo Zhen Zhong CLA 2011-11-10 22:34:18 EST
It is caused by JS runtime send to wrong variable name to VE. The variable name is get from eze$$variableName, it may caused by JS Gen to gen a wrong variable name after the user operation. So change the owner to Jimmy.
Comment 2 Yun Feng Ma CLA 2011-11-15 03:13:23 EST
Fixed. Thanks.
Comment 3 Yu Hao CLA 2011-11-17 20:42:44 EST
Verified in 201111170946