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

Bug 466412

Summary: Provide additional variables for FeatureColumnMapping.featureParentExpression and LabelEditTool
Product: [Modeling] Sirius Reporter: Benjamin Esterl <esterl>
Component: TableAssignee: Pierre Guilet <pierre.guilet>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: denis.nikif, esterl, jessy.mallet, laurent.redor, maxime.porhel, pierre-charles.david
Version: 2.0.0Keywords: triaged
Target Milestone: 5.0.0M7   
Hardware: All   
OS: All   
See Also: https://git.eclipse.org/r/93481
https://git.eclipse.org/r/93482
https://git.eclipse.org/r/93480
https://git.eclipse.org/r/94810
https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=4e7c0bd36e40bcde83c65ceaca4979426ce177fa
https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=e6b04b9c506e229cf86701ae036c2178e845ff06
https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=5f3839d69589b9a0eb799b42d7e585e6dbf7759e
https://git.eclipse.org/r/95060
https://git.eclipse.org/r/95169
https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=32cc6111d4349f26fc5ebb5c5e6f6b618d9d15c9
Whiteboard: trivial

Description Benjamin Esterl CLA 2015-05-05 07:39:45 EDT
For the FeatureParentExpression of a FeatureColumnMapping there is only access to root (semantic element of the current table) and container (semantic element of the current line).

It would be useful to also have access to two additional variables like table and line, so that one could navigate in the table structure and then use the target reference to retrieve the corresponding domain element.


For further information please also refer to the corresponding topic in the Eclipse Forum for Sirius, see https://www.eclipse.org/forums/index.php/m/1694337/#msg_1694337
Comment 1 Maxime Porhel CLA 2015-05-06 04:24:45 EDT
Adding the current line and table in the available variables for the evaluation of FeatureColumnMapping.featureParentExpression will allow to use the already computed lines/table structure to retrieve the element we want to use. In some cases, having only the semantic element of the current line (without any indication on the current line) is not sufficient.

This two variables should also be available in the LabelEditTool (+ the column in case of cross table). 

Other tools might require to be heck, new bugs might have to be created to handle each case.
Comment 2 Denis Nikiforov CLA 2015-10-20 01:56:07 EDT
It would be great. I have a similar issue: https://www.eclipse.org/forums/index.php/t/1071255/

There is a cross table with duplicate sublines in my project. So I need to know the parent line of the current one to detect exact cell position in my table. lineSemantic is not enough in my scenario.
Comment 3 Pierre-Charles David CLA 2016-05-11 07:04:52 EDT
It's too late for 4.0 (we've passed M7), but this will probably be done for 4.1 which will be released around november.
Comment 4 Pierre-Charles David CLA 2016-09-07 09:34:52 EDT
Sorry to move this again, but we won't have the resources to work on this before the 4.1.0 release.
Comment 5 Eclipse Genie CLA 2017-03-21 04:49:32 EDT
New Gerrit change created: https://git.eclipse.org/r/93481
Comment 6 Eclipse Genie CLA 2017-03-21 04:49:36 EDT
New Gerrit change created: https://git.eclipse.org/r/93482
Comment 7 Eclipse Genie CLA 2017-03-21 04:49:39 EDT
New Gerrit change created: https://git.eclipse.org/r/93480
Comment 8 Eclipse Genie CLA 2017-04-11 05:49:46 EDT
New Gerrit change created: https://git.eclipse.org/r/94810
Comment 14 Eclipse Genie CLA 2017-04-14 08:20:08 EDT
New Gerrit change created: https://git.eclipse.org/r/95060
Comment 15 Eclipse Genie CLA 2017-04-18 09:03:45 EDT
New Gerrit change created: https://git.eclipse.org/r/95169
Comment 17 Pierre-Charles David CLA 2017-04-19 03:46:47 EDT
Fixed.
Comment 18 Jessy Mallet CLA 2017-05-15 09:29:17 EDT
Validated with Sirius 5.0.0.201705121003
Comment 19 Pierre-Charles David CLA 2017-05-17 03:20:52 EDT
Verified by Jessy.
Comment 20 Pierre-Charles David CLA 2017-06-29 03:32:09 EDT
Available in Sirius 5.0.0, see https://wiki.eclipse.org/Sirius/5.0.0 for details.