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

Bug 360792

Summary: JavaScript generation errors on basic handler of type ENTITY
Product: z_Archived Reporter: Kathy Carroll <carrollk>
Component: EDTAssignee: Project Inbox <edt.javascriptgen-inbox>
Status: CLOSED FIXED QA Contact:
Severity: major    
Priority: P3 CC: greer
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Kathy Carroll CLA 2011-10-13 06:46:25 EDT
This code

// basic handler

handler basicTest type ENTITY 
end

results in

- IWN.JavascriptGen.9998.e 0/0 Exception occurred: java.lang.IllegalArgumentException: No such field named: onConstructionFunction in EClass  eglx.persistence.Entity
- IWN.JavascriptGen.9999.e 0/0 Stack Trace: java.lang.IllegalArgumentException: No such field named: onConstructionFunction in EClass eglx.persistence.Entity
Comment 1 Scott Greer CLA 2011-10-13 23:03:10 EDT
As I understand it, ENTITY isn't supported in JS....  This is analogous to Java gen not supporting RUIHandlers;  currently, it just does nothing for those kinds of EGL parts.  

There are two things that should be done for this bug:  First, the reported symptom is caused by JS gen assuming that the only possible stereotype is RUIWidget;  I've already developed a fix for that (as well as a similar fix for RUIHandler).     Second, we need to find some mechanism by which a generator can identify parts for which it should not emit anything;  we should also consider whether this should result in a warning or informational message.
Comment 2 Scott Greer CLA 2011-10-14 10:05:18 EDT
Regarding the previous comment, I'm committing the first part of the fix, however, I was unable to come up with a mechanism for the first part.  So I've opened https://bugs.eclipse.org/bugs/show_bug.cgi?id=360973 to cover that issue separately.  As a result, JS gen will no longer fail on Entity parts, however, the resulting JS is obviously meaningless (even if it is syntactically correct).
Comment 3 Kathy Carroll CLA 2011-10-17 17:59:36 EDT
Verfied with build 201110170901 & closed.