Skip to main content



      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 08:24 Go to next message
Eclipse UserFriend
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 04:26 Go to previous messageGo to next message
Eclipse UserFriend
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
Re: Attribute of Enumeration type cannot change default value [message #1795985 is a reply to message #1795906] Wed, 03 October 2018 10:27 Go to previous messageGo to next message
Eclipse UserFriend
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 04:58 Go to previous message
Eclipse UserFriend
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
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: Wed Jul 16 13:54:02 EDT 2025

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

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

Back to the top