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

Bug 351931

Summary: Use local cell editor in table
Product: z_Archived Reporter: Vincent Lorenzo <vincent.lorenzo>
Component: EMF-FacetAssignee: Gregoire Dupe <gdupe>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P1 CC: emft.facet-inbox, gdupe, nicolas.bros
Version: unspecifiedFlags: gdupe: indigo+
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Bug Depends on:    
Bug Blocks: 351681    
Attachments:
Description Flags
a patch for the plugin example to reproduce the bug
gdupe: iplog-
This patch add the possibility to use local editors (editors not declared in the plugin.xml)
gdupe: iplog-
This patch add the possibility to use local editors (editors not declared in the plugin.xml)
gdupe: iplog+, gdupe: review+
unit test gdupe: iplog+, gdupe: review+

Description Vincent Lorenzo CLA 2011-07-13 05:34:55 EDT
Sometimes we want declare local CellEditor, that is to say, CellEditor which will be used only in a specific table. In order to do that, 
	- I forced the CellEditor in the table customization file
	- I didn't declare the file modelcelleditors in the plugin.xml (to hide this cell editor for others tables)
			-> doing that, there is no active editor in the cell : we have neither the default editor nor the new editor.
Comment 1 Vincent Lorenzo CLA 2011-07-13 05:44:40 EDT
Created attachment 199554 [details]
a patch for the plugin example to reproduce the bug

This patch provides a Custom EString editor (which display a message in the console.
I added my custom cell editor in the 2 tableconfigurations files. Currently, the file modelcelleditors is not registered in the plugin.xml, therefore you don't have cell editor for EString...

If you declare it, you will use my custom CellEditor

I would like to be able to use my custom celleditor without declaring it in the plugin.xml.

(1) I, Vincent Lorenzo, wrote 100% of the code I've provided.
(2) This code contains no cryptography
(3) I have the right to contribute the code to Eclipse.
(4) I contribute the content under the EPL.
Comment 2 Vincent Lorenzo CLA 2011-07-19 09:04:45 EDT
Created attachment 199897 [details]
This patch add the possibility to use local editors (editors not declared in the plugin.xml)

(1) I, Vincent Lorenzo, wrote 100% of the code I've provided.
(2) This code contains no cryptography
(3) I have the right to contribute the code to Eclipse.
(4) I contribute the content under the EPL.
Comment 3 Vincent Lorenzo CLA 2011-07-19 10:03:27 EDT
Created attachment 199904 [details]
This patch add the possibility to use local editors (editors not declared in the plugin.xml)

(1) I, Vincent Lorenzo, wrote 100% of the code I've provided.
(2) This code contains no cryptography
(3) I have the right to contribute the code to Eclipse.
(4) I contribute the content under the EPL.
Comment 4 Nicolas Bros CLA 2011-08-10 03:29:33 EDT
Created attachment 201209 [details]
unit test

Here is a unit test for this bug.
Comment 5 Nicolas Bros CLA 2011-08-17 05:38:47 EDT
I committed the unit test in revision 763.
Comment 6 Gregoire Dupe CLA 2011-08-17 05:48:43 EDT
Comment on attachment 199904 [details]
This patch add the possibility to use local editors (editors not declared in the plugin.xml)

Here is a contribution smaller than 250 lines (135). I've committed this patch with the following modifications:

- I’ve renamed registerLocalCellEditor to registerLocalCellEditors
- I’ve removed the @SuppressWarnings("static-method") on isInCellEditorRegistry.
- I’ve moved the method getBundleNameFor in the class org.eclipse.emf.facet.widgets.celleditors.CellEditorsUtils
- I’ve replaced the use of  getAllContents() by getContents in the method getBundleNameFor 
- In getBundleNameFor, I’ve checked that the URI is a plug-in before to get value of the segment 1.

Committed revision 764.
Comment 7 Gregoire Dupe CLA 2011-08-17 05:58:12 EDT
Comment on attachment 199904 [details]
This patch add the possibility to use local editors (editors not declared in the plugin.xml)

I've committed this contribution in the trunk (revision 764) and in the branch 0.1 (revision 768).
Comment 8 Gregoire Dupe CLA 2011-08-17 05:59:30 EDT
This bug can be marked as fixed.
Comment 9 Nicolas Bros CLA 2011-08-17 06:12:40 EDT
I've merged the unit test into branch 0_1 (revision 770)
Comment 10 Gregoire Dupe CLA 2012-05-23 06:39:20 EDT
Hello Vincent,

Please, can you close this bug, if your problem has been solved ?

Regards,
Grégoire
Comment 11 Gregoire Dupe CLA 2012-05-23 12:31:06 EDT
Sorry Vincent, but this bug has to be closed for the IP log generation.
Comment 12 Gregoire Dupe CLA 2013-05-23 08:58:51 EDT
Comment on attachment 201209 [details]
unit test

According to comment #5, this patch has been committed.
Comment 13 Gregoire Dupe CLA 2013-05-23 09:03:09 EDT
Comment on attachment 199554 [details]
a patch for the plugin example to reproduce the bug

I've search for the string "EStringCellEditor" in the sources and I found nothing. That's why I assume that this path has not be committed.

=> iplog-