|
Re: Context of content in Sirius [message #1512298 is a reply to message #1512139] |
Mon, 15 December 2014 16:32 |
|
Hi.
Le 15/12/2014 14:39, Erlend Stav a écrit :
> What is the intended context of the content that is available in the
> diagrams of Sirius?
This context is the Sirius session (technically the Editing Domain's
ResourceSet), which includes all the semantic models referenced
(transitively) by the representations, and may include other models if
added explicitly.
If you are using the default UI based around "Modeling Projects", by
default all EMF models physically inside the project (except for the
Sirius-specific .aird) are considered semantic models of the underlying
session.
> The reason I ask is that we have experienced some unexpected behaviour
> from the diagram editors we have created, when it comes to what content
> is shown and what is available in the property editors.
[snip]
> Is there any known issue that could cause this behaviour, or is it by
> design?
This is by design, to ensure the consistency of inter-models references.
If you are modifying a model on a Sirius diagram, for example by
removing an element, any other model in the same session/project will be
correctly updated to avoid them keeping a stale reference (for example).
Because Sirius is often used to show many alternative and partial views
of the same underlying model (seen through different viewpoints), with
different edition capabilities, it is particularly important that the
global consistency of the whole is guaranteed and automatic.
> It seems that this could be a cause of much confusion if the
> behaviour remains different from than in the EMF-generated editors.
EMF-generated editors will also allow you to reference any compatible
elements from any model which are loaded in their ResourceSet (you can
load any model you want to add the scope using "Load Resource"), but
they only load referenced models when needed, and will not see
referecing models unless loaded manually each time. Sirius defaults to
automatically loading more models to ensure they remain globally
consistent.
Note that if that is a problem in your case, you can mitigate it by
either splitting our project into multiple Modeling Projects so that the
scope of each session is reduced (you can still explicitly use models
from outside the modeling project, see [1]), or use plain non-Modeling
projects [2] and avoid the automatic loading in the session of all
models in the same project.
[1]
https://www.eclipse.org/sirius/doc/user/general/Modeling%20Project.html#ProjectDependencies
[2]
https://www.eclipse.org/sirius/doc/user/general/Modeling%20Project.html#LegacyMode
--
Pierre-Charles David - Obeo
Need professional services for Sirius?
http://www.obeodesigner.com/sirius
Pierre-Charles David - Obeo
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
|
|
|
Re: Context of content in Sirius [message #1512329 is a reply to message #1512139] |
Mon, 15 December 2014 17:07 |
|
Hi.
Le 15/12/2014 14:39, Erlend Stav a écrit :
> What is the intended context of the content that is available in the
> diagrams of Sirius?
>
> The reason I ask is that we have experienced some unexpected behaviour
> from the diagram editors we have created, when it comes to what content
> is shown and what is available in the property editors.
>
> More concretely, when we have cross-references from one object to
> another, in the property editor it is possible to choose from all
> objects of all models in the current project. This is different from
> when we open the same model with the default tree-based editor generated
> by EMF through the .genmodel, which only lists the objects of the
> current model being edited (+ objects of any explicitly imported models).
> Similarly, we have also observed some behaviour in diagrams, where
> information belonging to other models have appeared unexpectedly.
Do you have empty semantic candidates expressions for the impacted
mapping in your Viewpoint Specification Model (.odesign file) ? For
those empty expressions, Sirius will look in every loaded semantic model
to find elements matching the domain class property of the mapping and
this could correspond to your "unexpectly" appearing elements. If you
put some non-empty expression they will be evaluated with the domain
element of the diagram element for which Sirius is computing the
children as context.
>
> Is there any known issue that could cause this behaviour, or is it by
> design? It seems that this could be a cause of much confusion if the
> behaviour remains different from than in the EMF-generated editors.
>
>
Regards
--
Maxime - Obeo
Need professional services for Sirius?
http://www.obeodesigner.com/sirius
Maxime Porhel - Obeo
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
|
|
|
|
Powered by
FUDForum. Page generated in 0.03213 seconds