Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [mdt-papyrus.dev] [Control Mode] No warning when resource is about to be overriden

Hi Juan,

 

If you need help with the control mode code it was wrote by Arthur but we thought it together, I don’t have a lot of time but if you are stuck or don’t understand something please fire me an email.

The control mode was mainly rewrote to better handle undo/redo because the EMF transactional framework doesn’t work well (at all ?) at the ResourceSet/Resource level : the goal was to stay coherent whatever sequence of undo/redo/save the user does.

 

Regards

 

Mathieu

 

De : mdt-papyrus.dev-bounces@xxxxxxxxxxx [mailto:mdt-papyrus.dev-bounces@xxxxxxxxxxx] De la part de CADAVID Juan
Envoyé : jeudi 3 avril 2014 16:19
À : Papyrus Project list
Objet : Re: [mdt-papyrus.dev] [Control Mode] No warning when resource is about to be overriden

 

Hi Christian,

 

Thanks a lot for your reply. I agree it's a sound approach to leave the creation or not of the resource to the down-stream loading mechanism - so it's probably true this was intentionally left empty.

 

It is still impossible to "control" objects on an existing resource though (nothing is appended to the existing resource :(  ) - but the problem comes when creating the ControlModeRequest. I'll continue looking.

 

Juan

 

De : mdt-papyrus.dev-bounces@xxxxxxxxxxx [mailto:mdt-papyrus.dev-bounces@xxxxxxxxxxx] De la part de Christian W. Damus
Envoyé : mercredi 2 avril 2014 17:10
À : Papyrus Project list
Objet : Re: [mdt-papyrus.dev] [Control Mode] No warning when resource is about to be overriden

 

Hi, Juan,

 

The implementation of that statement is implicit in the down-stream loading of that resource URI in the resource set.  If the resource doesn't exist, it will be created, otherwise it will be reused and the "fragmented" model element will be added as another root of that resource.  Thus, a single "controlled resource" could contain several "controlled elements" instead of having them all stored in separate resources.  I *think* this is intentional, and personally I find it useful.  :-)

 

So, in a sense, the resource indicated by the user will never be overridden, but only appended, and created if it didn't exist.

 

HTH,

 

Christian

 

 

On Apr 2, 2014, at 4:53 PM, CADAVID Juan <Juan.CADAVID@xxxxxx> wrote:




Hi Papyrus team,

 

my name is Juan Cadavid and I'm currently doing some bug fixing around the Papyrus control model ("submodel units") and reintegration. I noticed that when the user controls an object and puts in the dialog the URI for an existing resource, there is no warning if the resource should be overriden. By inspecting the code (in the master branch), I found this comment in org.eclipse.papyrus.infra.services.controlmode.ui.CreateModelFragmentDialog:

 

"Creates and, if it already exists, loads the specified resource. This implementation verifies that a resource can be opened for that URI, that the resource is not the object's current container, and that it is not read-only in the editing domain. If there is an existing resource with that URI, it prompts before overriding or adding to it"

...however there's no implementation below this comment! Does anyone know if this was implemented elsewhere? I notice there's an unused dialog ControlResourceDialog in the same package with somewhat like this implemented, but the transactional domain is not available in the new dialog.

 

Thanks,

 

Juan Cadavid

 

Juan CADAVID

Ingénieur-chercheur

Commissariat à l’énergie atomique et aux énergies alternatives (CEA)

Laboratoire d’Ingénierie dirigée par les modèles pour les Systèmes Embarqués (LISE)

 

_______________________________________________
mdt-papyrus.dev mailing list
mdt-papyrus.dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/mdt-papyrus.dev

 


Ce message et les pièces jointes sont confidentiels et réservés à l'usage exclusif de ses destinataires. Il peut également être protégé par le secret professionnel. Si vous recevez ce message par erreur, merci d'en avertir immédiatement l'expéditeur et de le détruire. L'intégrité du message ne pouvant être assurée sur Internet, la responsabilité du groupe Atos ne pourra être engagée quant au contenu de ce message. Bien que les meilleurs efforts soient faits pour maintenir cette transmission exempte de tout virus, l'expéditeur ne donne aucune garantie à cet égard et sa responsabilité ne saurait être engagée pour tout dommage résultant d'un virus transmis.

This e-mail and the documents attached are confidential and intended solely for the addressee; it may also be privileged. If you receive this e-mail in error, please notify the sender immediately and destroy it. As its integrity cannot be secured on the Internet, the Atos group liability cannot be triggered for the message content. Although the sender endeavors to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted.


Back to the top