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 08:08 |
Camille Letavernier Messages: 952 Registered: February 2011 |
Senior Member |
|
|
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
Camille Letavernier
|
|
|
Re: Versioning for UML Models like for Profiles [message #1117316 is a reply to message #1117226] |
Thu, 26 September 2013 09:59 |
Furkan Eke Messages: 32 Registered: June 2012 |
Member |
|
|
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 restricted to acceleo).
This sounds like having definitions for M1 models right? My use case is as follows:
1- UML model will constitute an 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 model gets redesigned, the application must be able to check the generated M1 library version which in turn comes from the "automatically saved version attribute of M1 model"
5- Ath application will compare the version number of the linked library against the version number of the data tree saved priorly. If these match a read will be enabled.
[Updated on: Thu, 26 September 2013 10:04] Report message to a moderator
|
|
|
Re: Versioning for UML Models like for Profiles [message #1117619 is a reply to message #1117316] |
Thu, 26 September 2013 16:33 |
|
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 14:57 |
Camille Letavernier Messages: 952 Registered: February 2011 |
Senior Member |
|
|
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
Camille Letavernier
|
|
| | | |
Goto Forum:
Current Time: Mon Sep 23 06:52:17 GMT 2024
Powered by FUDForum. Page generated in 0.04935 seconds
|