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

Bug 357977

Summary: NoSuchFunctionError when generating a qualified function invocation
Product: z_Archived Reporter: Brian Svihovec <svihovec>
Component: EDTAssignee: Project Inbox <edt.mofmodel-inbox>
Status: CLOSED FIXED QA Contact:
Severity: major    
Priority: P3 CC: pharmon
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Testcase. none

Description Brian Svihovec CLA 2011-09-16 14:32:08 EDT
Created attachment 203512 [details]
Testcase.

Import the attached RUIHandler.

When the file is generated you will get the following exception:
org.eclipse.edt.mof.codegen.api.TemplateException: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
	at org.eclipse.edt.mof.codegen.api.TemplateContext.doInvoke(TemplateContext.java:384)
	at org.eclipse.edt.mof.codegen.api.TemplateContext.invoke(TemplateContext.java:260)
	at org.eclipse.edt.gen.javascript.templates.StatementTemplate.genStatement(StatementTemplate.java:25)
	at org.eclipse.edt.gen.javascriptdev.templates.StatementTemplate.genStatement(StatementTemplate.java:26)
	at sun.reflect.GeneratedMethodAccessor351.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.eclipse.edt.mof.codegen.api.TemplateContext.doInvoke(TemplateContext.java:357)

Caused by: java.lang.reflect.InvocationTargetException
	at sun.reflect.GeneratedMethodAccessor179.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.eclipse.edt.mof.impl.AbstractVisitor.invokeVisit(AbstractVisitor.java:125)
	... 81 more
Caused by: java.lang.RuntimeException: org.eclipse.edt.mof.egl.NoSuchFunctionError
	at org.eclipse.edt.mof.egl.impl.QualifiedFunctionInvocationImpl.getTarget(QualifiedFunctionInvocationImpl.java:53)
	at org.eclipse.edt.mof.egl.impl.QualifiedFunctionInvocationImpl.getTarget(QualifiedFunctionInvocationImpl.java:1)
	at org.eclipse.edt.gen.ReorganizeCode.processInvocationConstantParameters(ReorganizeCode.java:491)
	at org.eclipse.edt.gen.ReorganizeCode.processInvocation(ReorganizeCode.java:500)
	at org.eclipse.edt.gen.ReorganizeCode.visit(ReorganizeCode.java:475)
	... 85 more
Caused by: org.eclipse.edt.mof.egl.NoSuchFunctionError
	at org.eclipse.edt.mof.egl.impl.QualifiedFunctionInvocationImpl.resolveFunction(QualifiedFunctionInvocationImpl.java:123)
	at org.eclipse.edt.mof.egl.impl.QualifiedFunctionInvocationImpl.getTarget(QualifiedFunctionInvocationImpl.java:51)
	... 89 more
Comment 1 Brian Svihovec CLA 2011-09-16 15:08:06 EDT
This blocks the RUI Technical Sample.
Comment 2 Paul Harmon CLA 2011-09-19 08:08:58 EDT
I have updated TypeUtils to fix this. The code was only searching the source type (in this case EGLAny) for a conversion. I have updated it to search the target type (in this case Widget) for a conversion to the source type in it's supertype chain
Comment 3 Lisa Lasher CLA 2011-10-11 16:20:25 EDT
Closing this defect.