- Posts: 6
- Thank you received: 0
×
Modelio 4.0.0 released (07 Nov 2019)
Modelio 4.0.0 has been released ( www.modelio.org/forum/4-announcements/45...-4-0-0-released.html )
Using Enumerated Property Type in Module Development
5 years 5 months ago - 5 years 5 months ago #4590 by bbinder
Hello Community,
I have a seemingly simple problem while developing a Module which I just can't wrap my head around. When I use the Modelio GUI to create an Enumerated Property Type in the LocalModule, it is really quite straight forward. I create the Type, add some literals and use it later in a PropertyTableDefinition Property. When I apply this Stereotype to a class in the model, I have a nice drop down with the literals available. Exactly what I need.
Great so far. But now I want to publish a profile containing such EnumeratedPropertyTypes in a Module. The problem is: I cannot figure out how to do that in the module.xml file. I've tried a multitude of nodes in the xml but so far, the build process has always deleted them.
So here's my question: How can I use these Enumerated Property Types in a Module? Is it possible for you to post a very simple example, maybe even the one shown in the image? Any help would be appreciated.
Thanks a lot.
Edit:
OK, I have been able to add an EnumeratedPropertyType by using the following code in the module.xml file:
But I am still not quite sure how to add a PropertyTableDefinition with a Property of type "MyEnumeratedProperty" to the "Language" stereotype.
Best,
Bastian
I have a seemingly simple problem while developing a Module which I just can't wrap my head around. When I use the Modelio GUI to create an Enumerated Property Type in the LocalModule, it is really quite straight forward. I create the Type, add some literals and use it later in a PropertyTableDefinition Property. When I apply this Stereotype to a class in the model, I have a nice drop down with the literals available. Exactly what I need.
Great so far. But now I want to publish a profile containing such EnumeratedPropertyTypes in a Module. The problem is: I cannot figure out how to do that in the module.xml file. I've tried a multitude of nodes in the xml but so far, the build process has always deleted them.
So here's my question: How can I use these Enumerated Property Types in a Module? Is it possible for you to post a very simple example, maybe even the one shown in the image? Any help would be appreciated.
Thanks a lot.
Edit:
OK, I have been able to add an EnumeratedPropertyType by using the following code in the module.xml file:
<Module>
....
<Parameters>
<Parameter id="MyEnumeratedProperty" type="Enum">
<Enumeration>
<Literal value="german"/>
<Literal value="french"/>
<Literal value="german"/>
<Literal value="spanish"/>
</Enumeration>
</Parameter>
</Parameters>
</Module>
But I am still not quite sure how to add a PropertyTableDefinition with a Property of type "MyEnumeratedProperty" to the "Language" stereotype.
Best,
Bastian
Last Edit: 5 years 5 months ago by bbinder.
Please Log in or Create an account to join the conversation.
5 years 5 months ago - 5 years 5 months ago #4591 by bbinder
see edit of original post
Last Edit: 5 years 5 months ago by bbinder.
Please Log in or Create an account to join the conversation.
- jvalenzuela
-
- Offline
- Fresh Boarder
-
Less More
- Posts: 8
- Thank you received: 0
2 years 1 month ago #6284 by jvalenzuela
I have the same question, however, the original post seems to be missing information on how to add the enumeration to property table. So far, I have successfully created the enumeration parameter type in Module/Parameters/Parameter; now I'm trying to figure out how to reference it from the PropertyDefinition element.
Thank you,
Jason Valenzuela
Thank you,
Jason Valenzuela
Please Log in or Create an account to join the conversation.
Time to create page: 0.264 seconds