Skip to main content



      Home
Home » Eclipse Projects » Sirius » Sirius Editor loads the wrong class at runtime
Sirius Editor loads the wrong class at runtime [message #1695981] Wed, 20 May 2015 14:50 Go to next message
Eclipse UserFriend
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 Go to previous messageGo to next message
Eclipse UserFriend
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
Re: Sirius Editor loads the bad class at runtime [message #1696212 is a reply to message #1696019] Sat, 23 May 2015 02:57 Go to previous message
Eclipse UserFriend
Hi Maxime,

Thank you, it works perfectly.

Regards,
Benedek

[Updated on: Sat, 23 May 2015 02:57] by Moderator

Previous Topic:Edit value in a table
Next Topic:Change Diagram Representations Within a Single Editor
Goto Forum:
  


Current Time: Sun May 18 17:01:43 EDT 2025

Powered by FUDForum. Page generated in 0.03323 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top