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

Bug 425568

Summary: Table CSV export should export complete labels
Product: [Modeling] Sirius Reporter: Maxime Porhel <maxime.porhel>
Component: TableAssignee: Project Inbox <sirius.table-inbox>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: pierre-charles.david
Version: unspecifiedKeywords: triaged
Target Milestone: 1.0.0M5   
Hardware: PC   
OS: Windows NT   
Whiteboard:
Attachments:
Description Flags
Use case to reporduce the CSV export issue.
none
Sample table with cropped label
none
Expected export result none

Description Maxime Porhel CLA 2014-01-13 09:58:40 EST
Created attachment 238919 [details]
Use case to reporduce the CSV export issue.

In a table, labels on several lines are automatically truncated when displayed. In some cases, the DCell label itself is truncated (see label provider used to set the label for FeatureColumns).
When the user enters the edition mode (using a direct edit tool) the complete label is then displayed but the line separators are removed so the label is displayed on a single line.

The CSV export feature exports the displayed labels (truncated ones), it should export the complete label/feature content.



Steps to reproduce:
 * Import the attached use case in your workspace. 
 * Open the csvExportTableTest edition table.
 * Check that the second line has a cropped label in the Name columns: mutli...
 * Right clic the table and select Export > CSV. 
 * Open the CSV (separator: ;, textSeparator: '): the full name of the second EPackage should be exported.
Comment 1 Maxime Porhel CLA 2014-01-13 10:01:48 EST
Created attachment 238920 [details]
Sample table with cropped label
Comment 2 Maxime Porhel CLA 2014-01-13 10:02:04 EST
Created attachment 238921 [details]
Expected export result
Comment 3 Maxime Porhel CLA 2014-01-13 10:05:31 EST
When a cell belongs to a column defined by a FeatureColumnMapping with an empty label computation expression, the item property descriptor is used to compute the DCell label to display (see: org.eclipse.sirius.table.business.internal.refresh.DTableElementSynchronizerSpec.setLabelWithFeatureValue(DCell, ColumnMapping, String) when there is no label expression)

For non Boolean and non EEnum data types, org.eclipse.emf.edit.provider.ItemPropertyDescriptor.ItemDelegator.convert(EDataType, Object) crops the obtained value at the first found char on which Character.isISOControl return true and add "..." at the end of the cropped label.

The displayed label in DCell and semantic property view tab is the cropped label, the complete label is displayed during direct edit. 

The CSV export and html export should use the complete semantic value and not the cropped label.
Comment 4 Maxime Porhel CLA 2014-01-13 10:12:05 EST
Viewpoint maintenance correction has been adapted to Sirius, see https://git.eclipse.org/r/20579
Comment 5 Maxime Porhel CLA 2014-01-15 08:49:49 EST
The proposed correction has been reviewed, accepted and merged.
Comment 6 Pierre-Charles David CLA 2014-01-27 10:50:15 EST
Verified using the scenario in comment #c0 and Sirius Sirius 1.0M5RC1 (1.0.0-N20140127-060036).
Comment 7 Pierre-Charles David CLA 2014-01-31 05:38:08 EST
Available in Sirius 1.0.0M5, see https://wiki.eclipse.org/Sirius/1.0.0M5 for availability details.