Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Attribute of Enumeration type cannot change default value
Attribute of Enumeration type cannot change default value [message #1795856] Mon, 01 October 2018 12:24 Go to next message
Gururaj Maddodi is currently offline Gururaj MaddodiFriend
Messages: 7
Registered: October 2018
Junior Member
Hi all,

I'm new to Sirius and trying to build a graphical editor for my meta-model. I have a class with an attribute which is of a custom Enumeration type. In my Sirius based editor, when I create an instance of the class, the value of the class's attribute keeps on going back to default literal of the Enumeration. The literals are shown as radio buttons, but if I select options other than the default, it goes back to default value. Any suggestions will be very helpful.

Thanks,
Gururaj
Re: Attribute of Enumeration type cannot change default value [message #1795906 is a reply to message #1795856] Tue, 02 October 2018 08:26 Go to previous messageGo to next message
Steve Monnier is currently offline Steve MonnierFriend
Messages: 572
Registered: May 2011
Senior Member
Hello,

Do you have an error or an exception? Can you describe the expression in your odesign that is executed?
It could be the same issue as in this thread: https://www.eclipse.org/forums/index.php/t/1073666/

Regards,
Steve


Steve Monnier - Obeo Canada
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: Attribute of Enumeration type cannot change default value [message #1795985 is a reply to message #1795906] Wed, 03 October 2018 14:27 Go to previous messageGo to next message
Gururaj Maddodi is currently offline Gururaj MaddodiFriend
Messages: 7
Registered: October 2018
Junior Member
Thanks for the reply. There is no error or exception in my host Eclipse instance. I can modify the attribute value in the tree editor but cannot in Sirius based editor. If I change the value in the tree editor, then new non-default literal starts acting as the default.

My odesign file for the class is link this:
new diagram element -> node
Id: ContextRole
Domain Class: ArchTest::ContextRole
Semantic Candidates Expression: feature:contextRoleSpecification

In the section I have the following:
new element creation -> node creation
Id: AddContextRole
Node Mappings: ContextRole

begin -> change context
Browse Expression: var:container

new operation -> create instance
Reference Name: contextRoleSpecification
Type Name: ArchTest::ContextRole
Variable Name: instance
Re: Attribute of Enumeration type cannot change default value [message #1796022 is a reply to message #1795985] Thu, 04 October 2018 08:58 Go to previous message
Steve Monnier is currently offline Steve MonnierFriend
Messages: 572
Registered: May 2011
Senior Member
Hello,

I am not sure to understand your issue. I think it is something about a missing "Set" operation[1] after your "Create Instance" operation, but I might be wrong.

[1]https://www.eclipse.org/sirius/doc/specifier/general/Model_Operations.html


Steve Monnier - Obeo Canada
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Previous Topic:create stand-alone application (RCP)
Next Topic:copy paste of designs in two different projects to a single project is possible?
Goto Forum:
  


Current Time: Thu Mar 28 08:16:58 GMT 2024

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

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

Back to the top