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

Bug 364777

Summary: wrong content assist generated for service
Product: z_Archived Reporter: Huo Zhen Zhong <huozz>
Component: EDTAssignee: Xiao Bin Chen <xiaobinc>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: chenzhh, jqian, jvincens, smythew, svihovec
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
patch for this defect xiaobinc: iplog+, xiaobinc: review?

Description Huo Zhen Zhong CLA 2011-11-24 20:56:48 EST
new a service in RUI project, new a RUI handler, input call and chose content assist, select "service invocation in Rich UI application", the generated code is "call serviceOrInterfaceReferance.functionName returning to callbackFunctionName onException ServiceLib.serviceExceptionHandler;ll"
There are two errors: 
1. There is no serviceExceptionHandler in serviceLib
2. There is a ll
Comment 1 Brian Svihovec CLA 2011-11-24 21:33:23 EST
Before I defer this, I would like to see the patch for this issue.
Comment 2 Xiao Bin Chen CLA 2011-11-24 21:49:50 EST
Created attachment 207513 [details]
patch for this defect

This is the problem of template. The ServiceLib does not contain serviceExceptionHandler function anymore.

So the fix will just remove the onexception ServiceLib.serviceExceptionHandler .
Comment 3 Brian Svihovec CLA 2011-11-24 22:02:38 EST
Where is the 'll' mentioned in the description coming from?
Comment 4 Xiao Bin Chen CLA 2011-11-24 22:09:05 EST
I think it's because ServiceLib.serviceExceptionHandler does not exist and did not use ${}//template grammar. So the template engine cause some problem(which produce "ll"). After change the template. It works fine.
Comment 5 Brian Svihovec CLA 2011-11-24 22:12:59 EST
I think we should change the template from 'ServiceLib.serviceExceptionHandler'
to 'exceptionHandlerFunctionName'
Comment 6 Xiao Bin Chen CLA 2011-11-24 22:18:11 EST
(In reply to comment #5)
> I think we should change the template from 'ServiceLib.serviceExceptionHandler'
> to 'exceptionHandlerFunctionName'

Ok. customer could use quick fix to generate the fucntion.
Comment 7 Brian Svihovec CLA 2011-11-24 22:27:19 EST
Go ahead and update the patch, test it to make sure that the 'll' characters are not added, and that quick fix will add the functions for callbackFunctionName and onExceptionHandlerFunctionName, and then commit the change.

I am allowing this fix for the .7 release because this is something new users will try to do when working with services for the first time, and creating this type of invalid code in content assist looks bad.
Comment 8 Xiao Bin Chen CLA 2011-11-24 22:37:00 EST
Ok, committed the code, and resolve the defect. The "ll" turns out to be the defect of calculating the cursor position, which exists in RBD. I will open another defect to track the problem of "ll".
Comment 9 Xiao Bin Chen CLA 2011-11-24 22:43:22 EST
https://bugs.eclipse.org/bugs/show_bug.cgi?id=364782  the new defect was opened.
Comment 10 Huo Zhen Zhong CLA 2011-11-27 21:04:45 EST
verified in 0.7.0.v201111270901