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
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@xxxxxxxxxxxhttps://dev.eclipse.org/mailman/listinfo/mdt-papyrus.dev
|