Bug 537135 - Custom widget model operations are ignored
Summary: Custom widget model operations are ignored
Status: CLOSED FIXED
Alias: None
Product: Sirius
Classification: Modeling
Component: Properties (show other bugs)
Version: 6.0.0   Edit
Hardware: PC Windows 10
: P4 normal (vote)
Target Milestone: 6.2.0   Edit
Assignee: Project Inbox CLA
QA Contact: Florian Barbin CLA
URL:
Whiteboard: backport
Keywords: triaged
: 548454 (view as bug list)
Depends on:
Blocks: 543902
  Show dependency tree
 
Reported: 2018-07-18 05:14 EDT by Pierre Guilet CLA
Modified: 2020-05-05 11:20 EDT (History)
6 users (show)

See Also:


Attachments
project to reproduce (45.71 KB, application/x-zip-compressed)
2018-07-18 05:14 EDT, Pierre Guilet CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Pierre Guilet CLA 2018-07-18 05:14:55 EDT
Created attachment 275033 [details]
project to reproduce

When defining a custom widget, the API allowing to execute a model operation defined in the VSM is not working. The model operation is not found and thus not executed.

Steps to reproduce:

1-import the plugin org.eclipse.eef.sample.custom.widget.colorpicker
2-launch a runtime
3-import BugCustomWIdget project
4-open new LayoutingMode Diagram
5-select an epackage and in properties view click on the tiny button.
6-the color picker wizard opens. Click on ok.
KO the ePackage should be renamed
Comment 1 Pierre Guilet CLA 2018-07-18 05:21:17 EDT
The problem is in org.eclipse.sirius.properties.core.api.DefaultDescriptionPreprocessorWithFiltering.processManyValuedFeatureByCopying(EStructuralFeature, SIRIUS, SIRIUS, TransformationCache, IInterpreter, IVariableManager, OverridesProvider)

where the object is not an instance of InitialOperation.

All widgets excepted the custom one have the begin just after the widget item in VSM.
Custom widget has an additional CustomOperation item between the widget and the begin items.

org.eclipse.sirius.properties.core.internal.preprocessor.CustomDescriptionPreprocessor should do more to handle this case.
Comment 2 Pierre-Charles David CLA 2018-07-25 06:00:50 EDT
Moving to 6.1 with low priority, mostly to make sure we have a look. We'll try to fix it if there is a simple solution, and see if it's worth backporting it in 6.0.x in this case.
Comment 3 Guillaume Coutable CLA 2019-01-23 04:16:08 EST
A little mistake slept into the ColorPickerController in the org.eclipse.eef.sample.custom.widget.colorpicker plugin.

To be sure to test the right thing, between the step 1 and 2, you need to change the ColorPickerController#EDIT_EXPRESSION_ID, in the org.eclipse.eef.sample.custom.widget.colorpicker plugin, from "bla2" to "bla".

With this modification the ColorPickerController will try to execute the "CustomOperation" instead of the "CustomExpression", which is the thing we want to test in this issue.
Comment 4 Eclipse Genie CLA 2019-01-23 04:27:10 EST
New Gerrit change created: https://git.eclipse.org/r/135604
Comment 6 Pierre-Charles David CLA 2019-01-28 09:18:44 EST
Fixed by b254e4642d4dceaeb6709f902d64427f689181de.
Comment 7 Florian Barbin CLA 2019-02-28 08:35:31 EST
Verified with build	6.2.0.201902251539
Comment 8 Pierre-Charles David CLA 2019-04-01 05:52:03 EDT
Available in Sirius 6.2.0, see https://wiki.eclipse.org/Sirius/6.2.0 for details.
Comment 9 Pierre-Charles David CLA 2020-05-05 11:20:15 EDT
*** Bug 548454 has been marked as a duplicate of this bug. ***