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

Bug 505763

Summary: When using a Dynamic Mapping, evaluation only goes into the first IF branch if it is true
Product: [Modeling] Sirius Reporter: Cedric Brun <cedric.brun>
Component: PropertiesAssignee: Project Inbox <sirius.properties-inbox>
Status: CLOSED FIXED QA Contact: Pierre Guilet <pierre.guilet>
Severity: normal    
Priority: P3 CC: maxime.porhel, pierre-charles.david
Version: 4.1.0Keywords: triaged
Target Milestone: 4.1.1   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
archived project with a .odesign definition showing the problem with Ecore none

Description Cedric Brun CLA 2016-10-12 04:55:41 EDT
I a'm trying to use the dynamic mappings to have several widgets generated for each EParameter.

To do so I create a dynamic mapping:
iterator: p
iterable expression: aql:self.eParameters

Then I have no other choice that having an 'IF'. I don't need it in my case but no problem, I write
predicateExpression: aql:true


Then I can create a Widget. Except I need several of them (For each parameter I'd like to have the name as a Text, the type as a combo and a button to delete the parameter.)
=> I can't add several widgets as childs of the IF. No problem, I create another IF (aql:true) with the other widgets.

=> when testing the solution, only the first widget is displayed. Reordering the IFs will make the other widgets appear but the first one disappear.

Seems like even if there are several IF's only the first one which is true will be used by the dynamic mapping.
Comment 1 Cedric Brun CLA 2016-10-12 05:07:57 EDT
Created attachment 264794 [details]
archived project with a .odesign definition showing the problem with Ecore

Import this project, enable the corresponding Viewpoint on a modeling project which has an Ecore file.

click on the EPackage, you should get a "Bug 505763" page.
In the page content, you'll get a group named "Group" with one Text field for each EClass contained by the EPackage to see the Name of the EClass.

What is expected is: for each EClass, a textfield for the name but another one for the "abstract" feature.
Comment 2 Pierre-Charles David CLA 2016-10-24 11:58:49 EDT
Fixed in EEF 1.7.2 via https://bugs.eclipse.org/bugs/show_bug.cgi?id=505772.
Comment 3 Pierre-Charles David CLA 2016-10-26 04:28:57 EDT
Available in Sirius 4.1.1, see https://wiki.eclipse.org/Sirius/4.1.1