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

Bug 354044

Summary: The javaName annotation for external JavaObject functions is missing
Product: z_Archived Reporter: Jeff Douglas <jeffdouglas>
Component: EDTAssignee: Matt Heitz <mheitz>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: carrollk, greer, jqian, jspadea, mheitz, tww
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Jeff Douglas CLA 2011-08-05 14:40:59 EDT
This javaName alias for the function was allowed in RBD and seems to be missing for EDT.

Here's the example code .... the javaName="handler" part is not allowed.

package x;

externaltype myET type JavaObject{packageName="etPkg", javaName="etName"}
    function test();
    function alias(){javaName="handler"};
end

program c2
e myET{};
	function main()
		e.alias();
		i int = 14;
	end
end
Comment 1 Matt Heitz CLA 2011-08-12 15:46:57 EDT
Done, but I called it externalName instead of javaName.  I also renamed the javaName field of JavaObject to externalName, and renamed JavaScriptObject's javaScriptName to externalName.

Now everything is consistent and we don't need both a javaName and javaScriptName: two annotations which serve the same purpose, and won't work for other languages.

I considered calling it "alias" but decided not to since the name in EGL is more of an alias then the value of externalName.

I mentioned the new name on the wiki at http://wiki.eclipse.org/EDT:EGL_Language_Stereotypes_and_Annotations (it's footnote #4).

I updated the Java generator to use the new name.  I didn't find any references to javaScriptName in the JavaScript generator, so it hasn't been touched.

NOTE: the Java generator hasn't yet been updated to recognize externalName on fields and functions, but that's outside the scope of this bug.
Comment 2 Matt Heitz CLA 2011-08-16 13:21:27 EDT
*** Bug 354771 has been marked as a duplicate of this bug. ***
Comment 3 Lisa Lasher CLA 2011-11-02 10:38:13 EDT
closing this defect, which was fixed several months ago