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

Bug 505945

Summary: Multi-String attribute are not displayed and can't be edited in Sirius table
Product: [Modeling] Sirius Reporter: Axel RICHARD <axel.richard>
Component: TableAssignee: Florian Barbin <florian.barbin>
Status: CLOSED FIXED QA Contact: Pierre Guilet <pierre.guilet>
Severity: normal    
Priority: P3 CC: laurent.redor, maxime.porhel, pierre-charles.david
Version: 3.1.0Keywords: triaged
Target Milestone: 3.1.7   
Hardware: PC   
OS: Mac OS X   
See Also: https://git.eclipse.org/r/83532
https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=23c6be2da7215b3cf300eac31470b62635f59a5c
Whiteboard:
Bug Depends on:    
Bug Blocks: 506084, 506085    
Attachments:
Description Flags
Metamodel-Test
none
ODEsign-Test
none
new Metamodel to test multi-valued boolean and int attributes
none
New odesign and model to test int and booleans
none
new metamodel
none
New odesign and model none

Description Axel RICHARD CLA 2016-10-14 03:28:27 EDT
Created attachment 264842 [details]
Metamodel-Test

I found a bug/lack in Sirius 3.1.6 on multi-valuated Estring attributes.

If I create  a table representation, this table is not able to display and edit such attribute.

You can easily reproduce the bug with the metamodel & viewpoint test associated.
Comment 1 Axel RICHARD CLA 2016-10-14 03:28:54 EDT
Created attachment 264843 [details]
ODEsign-Test
Comment 2 Pierre-Charles David CLA 2016-10-17 04:19:02 EDT
Some pointers to the relevant code:
* org.eclipse.sirius.table.ui.tools.internal.editor.provider.DFeatureColumnEditingSupport.getBestCellEditor(EObject, boolean) is where the table editor decides which CellEditor implementation to use
* EMF Edit has some standard code in org.eclipse.emf.edit.ui.provider.PropertyDescriptor.createPropertyEditor(Composite composite) to obtain the appropriate CellEditor for editing a given feature.

The fix may be as simple as calling the actual EMF Edit code for the feature associated to the column in this case. Note that Sirius already has some custom logic for handling some cases (e.g. booleans). Maybe (probabaly) in the long term using the normal EMF Edit stuff everywhere would be better, but in the context of a maintenance release we'll want to reduce the risk of impacts to specific scenarios and keep the existing idiosyncrasies for the rest.
Comment 3 Eclipse Genie CLA 2016-10-19 10:41:29 EDT
New Gerrit change created: https://git.eclipse.org/r/83532
Comment 4 Florian Barbin CLA 2016-10-20 04:21:03 EDT
Created attachment 264948 [details]
new Metamodel to test multi-valued boolean and int attributes
Comment 5 Florian Barbin CLA 2016-10-20 04:21:40 EDT
Created attachment 264949 [details]
New odesign and model to test int and booleans
Comment 6 Florian Barbin CLA 2016-10-21 05:15:42 EDT
Created attachment 264983 [details]
new metamodel
Comment 7 Florian Barbin CLA 2016-10-21 05:16:19 EDT
Created attachment 264984 [details]
New odesign and model
Comment 9 Florian Barbin CLA 2016-10-21 08:34:20 EDT
Fixed by commit 23c6be2da7215b3cf300eac31470b62635f59a5c
Comment 10 Pierre-Charles David CLA 2016-11-04 10:03:19 EDT
Available in Sirius 3.1.7. See https://wiki.eclipse.org/Sirius/3.1.7.