Sirius Editor loads the wrong class at runtime [message #1695981] |
Wed, 20 May 2015 14:50  |
Eclipse User |
|
|
|
Hello,
I have a Diagram Description created by Sirius (.odesign). I have a Node whose Domain Class refers to a Class which is common in some metamodels.
Although I carefully choose the correct one (stepping one by one on the suggested class names, carefully looking at the metamodel name), in my editor (viewpoint; defined by the mentioned .odesign) it quite offen happens, that the incorrect class is tried to be loaded. To be more specific, if I create a Node Creation in the Section, when I want to create that Node instance, the bad classes is tried to be instantiated, which results in a long exception.
For example, I have a Signal class in my Metamodel (called prefix.railway). However, Signal class can be found in the Eclipse in the UML2 package as well (org.eclipse.uml2.uml.internal.impl.SignalImpl). It is definitely a different Signal class, than my metamodel demands.
Although I specified the class correctly in the odesign, it does not work at runtime, in my editor.
What has gone wrong?
(Installed Sirius version: 2.0.0)
Best regards,
Ben
[Updated on: Wed, 20 May 2015 14:51] by Moderator
|
|
|
Re: Sirius Editor loads the bad class at runtime [message #1696019 is a reply to message #1695981] |
Thu, 21 May 2015 04:10   |
Eclipse User |
|
|
|
Hi Benedek,
Le 20/05/2015 20:50, Benedek Horvath a écrit :
> Hello,
>
> I have a Diagram Description created by Sirius (.odesign). I have a Node
> whose Domain Class refers to a Class which is common in some metamodels.
As mentioned in [1], the syntax for the domain class name can be the
basic name, like Package or a qualified name using name of the EMF
EPackage which defines the type, like uml.Package. In your case, you
should use railway.Signal (epackageName.EClassName).
You should also indicate with wich metamodels you want to work (still in
[1]): " It is recommended that the Diagram Description be explicitly
associated with the meta-model(s) of the semantic elements it will
represent. You can add referenced meta-models from different sources in
the Metamodels property section of the Diagram Description. Sirius will
work even without this association, but setting it explicitly will give
you better feedback when validating your VSM".
>
> Although I carefully choose the correct one (stepping one by one on the
> suggested class names, carefully looking at the metamodel name), in my
> editor (viewpoint; defined by the mentioned .odesign) it quite offen
> happens, that the incorrect class is tried to be loaded. To be more
> specific, if I create a Node Creation in the Section, when I want to
> create that Node instance, the bad classes is tried to be instantiated,
> which results in a long exception.
>
> For example, I have a Signal class in my Metamodel (called
> prefix.railway). However, Signal class can be found in the Eclipse in
> the UML2 package as well
> (org.eclipse.uml2.uml.internal.impl.SignalImpl). It is definitely a
> different Signal class, than my metamodel demands.
>
> Although I specified the class correctly in the odesign, it does not
> work at runtime, in my editor.
>
> What has gone wrong?
>
> (Installed Sirius version: 2.0.0)
>
> Best regards,
> Ben
Regards
--
Maxime - Obeo
Need professional services for Sirius?
http://www.obeodesigner.com/sirius
--
[1]
https://www.eclipse.org/sirius/doc/specifier/diagrams/Diagrams.html#diagram_description
|
|
|
|
Powered by
FUDForum. Page generated in 0.03323 seconds