Dear Papyrus developers,
I am working on integrating part of the model repair functionality [1], i.e., the profile migration, in EMF Compare.
Papyrus automatically triggers this profile migration for zombie stereotypes, i.e., stereotypes whose defining package cannot be found [2].
During the migration, zombies are grouped based on the expected package scheme in order to migrate to a newer profile / package.
This grouping is important, because all zombies of a group that cannot be migrated with a newer package get deleted [3] from the model and only the successfully migrated ones remain.
Currently, this grouping mechanisms is based on the pattern "^http://.*/([^/]+)/\\d" [4].
This means packages must have some kind of numbering at the end to produce separate groups, e.g., http://www.eclipse.org/my/profile/version/Language/7 is fine, but both http://www.eclipse.org/my/profile/version/7/Language/PackageA and http://www.eclipse.org/my/profile/version/7/Language/PackageB get reduced to http://www.eclipse.org/my/profile/version/7/Language#/ [5].
As a result, more stereotypes are assigned to a package than expected and those wrongly assigned will get deleted.
Is there a way (currently or planned) to extend this matching mechanism to also support different profile package naming schemes?
Thanks in advance!
Cheers,
Martin
[1] Package org.eclipse.papyrus.uml.modelrepair
[2] StereotypeApplicationRepairSnippet and ZombieStereotypesDescriptor
[3] StereotypeApplicationRepairParticipant::StereotypeApplicationMigrator::migrate
[4] ZombieStereotypesDescriptor::AUTO_NSURI_PATTERN
[5] ZombieStereotypesDescriptor::guessURI