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 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

 


Back to the top