Bug 568782 - [Toolsmiths - ElementTypes] Allow specification of AdviceBindingConfiguration as children of ElementTypes
Summary: [Toolsmiths - ElementTypes] Allow specification of AdviceBindingConfiguration...
Status: RESOLVED FIXED
Alias: None
Product: Papyrus
Classification: Modeling
Component: Toolsmiths (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P2 enhancement (vote)
Target Milestone: 5.0.0   Edit
Assignee: Christian Damus CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 568852 568766
  Show dependency tree
 
Reported: 2020-11-13 03:53 EST by Camille Letavernier CLA
Modified: 2021-03-25 11:42 EDT (History)
0 users

See Also:


Attachments
Sibling advice example (37.49 KB, image/png)
2020-11-13 03:56 EST, Camille Letavernier CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Camille Letavernier CLA 2020-11-13 03:53:23 EST
Currently, AbstractAdviceBindingConfiguration are specified at the root of the ElementTypeSet, and must reference the corresponding ElementType(s). In most case, custom Advices (Especially the ones related to Stereotypes, which is what we care about in the generated ElementTypes models) are related to a single ElementType, so having them in a flat structure is error-prone.

The ElementTypesConfigurations model should allow defining AbstractAdviceBindingConfiguration as children of ElementTypeConfiguration (In addition to the current reference mechanism: it doesn't replace it).

Some challenges about this:

- Compatibility with existing ElementTypesConfiguration models must be preserved
- When an AbstractAdviceBindingConfiguration is defined as a child of an ElementTypesConfiguration, some of its attributes will become irrelevant; especially the "target" reference (Which should always be the parent ElementType in this case), and the newly added "Apply to all types" attribute (Which should be false in this case). Ideally, these attributes would not exist at all for AbstractAdviceBindingConfiguration owned by their element type. It may be difficult to adjust the metamodels for this; so alternatively, we can either automatically set these values, or add a validation rule to detect/avoid/fix inconsistencies.
- The infra.types (meta)model is extended by UML-specific metamodels (especially uml.types.core); we need to make sure such extensions remain consistent with the updated metamodel
Comment 1 Camille Letavernier CLA 2020-11-13 03:56:07 EST
Created attachment 284757 [details]
Sibling advice example

Here's an example of a generated ElementTypeSetConfiguration, where the advice is separated from its type. We want to make it possible to define the selected Advice as a child element of the selected Type
Comment 2 Camille Letavernier CLA 2020-11-13 03:58:03 EST
This task should cover the metamodels update, as well as the necessary runtime updates (So Advice Configurations defined as child element of Element Types should be properly registered/taken into account).

This task doesn't include changes to the Element Types generation, or builders/validators for these models.
Comment 3 Christian Damus CLA 2020-11-24 09:54:30 EST
The Gerrit patch 172390 (cf. See Also field) is merged to the bugs/568494-toolsmiths-dev branch.
Comment 4 Camille Letavernier CLA 2020-12-01 07:17:27 EST
Fixed on the bugs/568494-toolsmiths-dev branch
Comment 5 Eclipse Genie CLA 2021-03-22 05:26:53 EDT
New Gerrit change created: https://git.eclipse.org/r/c/papyrus/org.eclipse.papyrus/+/178168
Comment 6 Eclipse Genie CLA 2021-03-22 05:26:59 EDT
New Gerrit change created: https://git.eclipse.org/r/c/papyrus/org.eclipse.papyrus/+/178170
Comment 7 Eclipse Genie CLA 2021-03-22 05:27:00 EDT
New Gerrit change created: https://git.eclipse.org/r/c/papyrus/org.eclipse.papyrus/+/178171
Comment 8 Eclipse Genie CLA 2021-03-22 05:27:01 EDT
New Gerrit change created: https://git.eclipse.org/r/c/papyrus/org.eclipse.papyrus/+/178172
Comment 9 Eclipse Genie CLA 2021-03-22 05:27:02 EDT
New Gerrit change created: https://git.eclipse.org/r/c/papyrus/org.eclipse.papyrus/+/178176
Comment 10 Eclipse Genie CLA 2021-03-22 05:27:05 EDT
New Gerrit change created: https://git.eclipse.org/r/c/papyrus/org.eclipse.papyrus/+/178173
Comment 11 Eclipse Genie CLA 2021-03-22 05:27:07 EDT
New Gerrit change created: https://git.eclipse.org/r/c/papyrus/org.eclipse.papyrus/+/178174
Comment 12 Eclipse Genie CLA 2021-03-22 05:27:12 EDT
New Gerrit change created: https://git.eclipse.org/r/c/papyrus/org.eclipse.papyrus/+/178175