Home » Modeling » Papyrus » Versioning for UML Models like for Profiles(Automatic Versioning of Models might be a very useful new feature)
|
Re: Versioning for UML Models like for Profiles [message #1117226 is a reply to message #1116805] |
Thu, 26 September 2013 04:08   |
Eclipse User |
|
|
|
Hi,
In Profiles, there is no real "versionning". Only the "definitions" are versionned, and this is really different, because the UML Profile itself exists in a single version (And doesn't have a version number).
The versionned definitions exist only for a compatibility/migration purpose (Between Applied Profile N-1 and Applied Profile N)
If you want an actual versionning (Version number + history + diff/merge...), then you need to rely on a true versionning system (CDO, SVN, Git, ...). AFAIK, the Papyrus integration of CDO doesn't support versionning yet.
Regards,
Camille
|
|
| |
Re: Versioning for UML Models like for Profiles [message #1117619 is a reply to message #1117316] |
Thu, 26 September 2013 12:33   |
Eclipse User |
|
|
|
Hi,
The UML2 API maintains the "version" of a profile in an annotation, or
to be more precise, in the distinct namespace URIs of the EPackage
definitions stored in an annotation. You might do something similar if
you are using the UML2EcoreConverter to generate EPackages from your
UML models.
Talking of M1, M2, etc. when dealing with metamodels quickly gets
confusing. Is the "generated M1 library" that your client applications
use an EPackage conversion of your UML model?
Cheers,
Christian
On 2013-09-26 09:59:10 +0000, Furkan Eke said:
> Hello Camille,
>
> thanks for your reply. What i am looking for is definitely not a kind
> of repo like git, svn etc. I use such systems already.
>
> What i am looking for is a kind of automatically updated version
> attribute which is intrinsic to the model. That i could than read let's
> say from templates (for example acceleo but not).
>
> This sounds like having definitions for M1 models right? My use case is
> as follows:
> 1- UML model will constitute "a kind of" M1 model, from which a M1
> library will be generated
>
> 2- In runtime, some application which does not know my M1 model will
> use the generated M1 library as an objects factory.
>
> 3- This application will save some data tree conforming a specific
> version of M1 library for later use.
>
> 4- If M1 library gets redesigned, the application must be able to check
> the M1 library version which in turn comes from the "automatically
> saved version attribute of M1 model".
|
|
| | |
Re: Versioning for UML Models like for Profiles [message #1219008 is a reply to message #1218996] |
Fri, 29 November 2013 09:57   |
Eclipse User |
|
|
|
Hi Furkan,
Papyrus provides a mean to register Save listeners (Pre-save and post-save). Using a pre-save listener, you could automatically increment the version number of the model.
Of course, automatic versioning only makes sense for minor/qualifier increments, so you'll also need a manual versioning system.
Basically, you need to implement and register a Papyrus service, which depends on the Papyrus ILifeCycleEventsProvider service. When the service is started (At model startup), you need to register a Save listener on the ILifeCycleEventsProvider. Then, when you receive the save event, increment the version number of the model (For example in an EAnnotation, or in a specific "Version" stereotype applied to your model)
If you are using a Stereotype, the user can also increment manually (From the profile tab of the properties view) the version, for "Major" releases.
Have a look at the "org.eclipse.papyrus.infra.core.service" extension point, for registering a service.
Regards,
Camille
|
|
| | | |
Goto Forum:
Current Time: Wed Jul 23 16:32:34 EDT 2025
Powered by FUDForum. Page generated in 0.08383 seconds
|