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

Bug 359937

Summary: NoSuchFunctionError when referencing a strlib function as an annotation
Product: z_Archived Reporter: Brian Svihovec <svihovec>
Component: EDTAssignee: Project Inbox <edt.compiler-inbox>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P1 CC: greer, pharmon
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Brian Svihovec CLA 2011-10-04 22:23:18 EDT
While working on MVC support for EGL Rich UI, I coded the following record:

record accountRecord
	state String{@uppercase}; 
end

Since there is no support for the upperCase annotation yet, this resolved (I believe) to StrLib.upperCase.  When the part is saved, the following exception is reported (see below).  I have assigned this to compiler, because it seems like it should be a validation error.

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:389)
	at org.eclipse.edt.mof.codegen.api.TemplateContext.invoke(TemplateContext.java:261)
	at org.eclipse.edt.gen.javascript.templates.StatementTemplate.genStatementNoBraces(StatementTemplate.java:30)
...
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)
	... 87 more
Comment 1 Paul Harmon CLA 2011-10-10 15:57:50 EDT
I have updated the following to add validation for this case:

SettingsBlockAnnotationBindingsCompletor
IProblemRequestor
EGLValidationResources.Properties
AbstractBinder
Comment 2 Brian Svihovec CLA 2011-11-30 14:35:58 EST
Verified and closed in build 20111130.