Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[mdt-papyrus.dev] [DSML][Profile] To use or not to use the UML2 generation option

Hi,

 

Johan is asking in the following bug [1] what is the good practice to inherit/extends a profile (in our case SysML)

The main use case it how to add an attribute in a CustomRequirement stereotype while keeping the “hard-coded” functionalities such as getMaster…

 

Did someone has experience extending a profile (that has some custom code inside)?

 

There seems to be 3 generation options with a profile:

1 - Generation + @generated Not

Pro: Standard option

Con: unclear separation between hand coded and generated (already lost some work that were not having a generated not indication)

2 - Generation + override factory in extension point (The one used in SysML 1.4)

Pro: Clear separation of generated and hand coded files

Con: Seems a lot of work to extend (All custom factories needs to be re-extended)

3 – Generation (with UML2 option) + @generated Not (but only in specific packages named operation)

ð  Seems to be a “middle” solution still generated not but with a little separation from the rest of the code

 

Any suggestion? It may be good to share the same approach for all Profile used in papyrus project.

 

Regards,

Benoit

1 : https://bugs.eclipse.org/bugs/show_bug.cgi?id=489151

 


Back to the top