file taggedvalues : list of values instead of free text

6 years 2 months ago #2656 by jcantoniochamp
Hello,

I saw that it was possible in a module to add tagged values.
<taggedvalues name="Property1" label="Property 1" parameter-card="1" is-hidden="false" is-signed="false"/>

I would like to set for a given tagged value a list of possible values (drop drown box).

I understood it was possible, but I do not see it in the documentation.

Thanks in advance,

JClaude

Please Log in or Create an account to join the conversation.

6 years 2 months ago #2659 by ebr
Hi,

I guess that is possible through the Java code of your module not inside the module.xml file.

Regards,

EBR

Please Log in or Create an account to join the conversation.

6 years 2 weeks ago #2830 by vatsala
I am new to Modelio and I am also looking for similar options, where we can add a dropdown, instead of plain text in a stereotype tagged value.
Could anyone please provide me some reference using which I can start it?
Thank you..

Please Log in or Create an account to join the conversation.

6 years 2 weeks ago #2831 by ebr
take a look at the Module developer's guide and more specifically at this section .

You will also find an example in SysML module source code i.e. here .

Please Log in or Create an account to join the conversation.

6 years 2 weeks ago #2833 by jcantoniochamp
Hello Vatsala,

What I did was to checkout the source code for the Java Designer Module.
Basically you need to:
- create your tagged value in the module.xml file
- create module
- in your module add a property page
this.propertyPages.add(new YourPropertyPage(this, "yourPage", "yourPage","res/bmp/yourIcon.png"));
- In this property page you have a method
public void update(List<MObject> selectedElements,
IModulePropertyTable table)
where you would update the property table with the propertyModel
propertyModel.update(table);

you need to create and instantiate the propertyModel.

Say you have the class YourPropertyModel, you will need to override the method update(IModulePropertyTable table)

and add your property list
table.addProperty("your property", "yourKey", list);

Hope this helps,

JClaude

Please Log in or Create an account to join the conversation.

Moderators: tmachmaab
Time to create page: 0.044 seconds
^ Back to Top