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

Bug 338437

Summary: compositeEditors extension point cannot be used to register user types
Product: z_Archived Reporter: Nicolas Bros <nicolas.bros>
Component: EMF-FacetAssignee: Nicolas Bros <nicolas.bros>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: fabien.giquel, gdupe
Version: unspecifiedFlags: nicolas.bros: indigo+
gdupe: review+
fabien.giquel: review+
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Bug Depends on:    
Bug Blocks: 335003    
Attachments:
Description Flags
patch
none
patch v2 nicolas.bros: iplog+

Description Nicolas Bros CLA 2011-02-28 11:37:25 EST
CompositeEditorFactoriesRegistry uses Class.forName to load the "targetType" of the extensions defined using the compositeEditors extension point.
So, it fails on types which are not on the classpath of plug-in "org.eclipse.emf.facet.widgets.celleditors".
Comment 1 Nicolas Bros CLA 2011-02-28 11:44:37 EST
I think the extension point org.eclipse.emf.facet.widget.celleditors.compositeEditors must be refactored so that instead of taking the type as a String, it asks for a class that must return the type (Class<?>). This way, it moves the instantiation requirement to the client plug-in, which must have the type on its bundle classpath.
Comment 2 Nicolas Bros CLA 2011-03-01 05:34:27 EST
Created attachment 190030 [details]
patch
Comment 3 Fabien Giquel CLA 2011-03-01 07:44:10 EST
I reviewed the code. It seems to be ok for me.

(No existing documentation for org.eclipse.emf.facet.celleditors -> no update)
Comment 4 Gregoire Dupe CLA 2011-03-01 08:27:23 EST
Hello Nicolas,

You must not change the indentation the lines you did not have modifier. This cause too many noise in the SVN log. I'm agree for the other modifications.

Regards,
Grégoire
Comment 5 Nicolas Bros CLA 2011-03-01 08:41:39 EST
Created attachment 190036 [details]
patch v2

this new patch minimizes whitespace changes
Comment 6 Nicolas Bros CLA 2011-03-01 11:32:13 EST
Committed in revision 332.
Comment 7 Gregoire Dupe CLA 2011-06-06 11:51:55 EDT
This bug can be closed.