How to assign default values to parameters of an operation?
When I create an operation, I can add parameters and adjust their properties. However, there isn't an obvious way to assign a default value, for example to a Boolean type parameter which should have a default value of false.
How to do it?
Hello, To set default types, go to configuration - preferences - Project default values Under Operation you can find Parameters default type.
Regards, Irina
@IrinaNeculita Thank you, but my question is slightly different:
I need to state a default VALUE for a parameter of a specific operation, not the default TYPE for ALL parameters.
Please reopen this question as it is not solved.
When we create a parameter
from explorer : in property view - we have the default value - there you can set the value
in diagram : operation edition view - add the parameter and on the column value can add the value you want.
Let me know if this is the information you look for.
regards, Irina
Thank you, now I was able to set the default value in the tree view.
Next question: How to get this to show on the class diagram? For example, I have this text shown in the Operations pane of the class:
+beginParse(in encoding: string, in is_endian_be: boolean)
+endParse()
(etc.)
I would like to see this:
+beginParse(in encoding: string, in is_endian_be: boolean = false)
+endParse()
Thanks!
I am using Modelio 5.3 on Linux Ubuntu 22.04. The "Edit Operation" dialog does not show any column headers for the parameter attributes, as your example has them.
Here is a screenshot of what I see:
For now is not possible to display the value of a parameter in diagram. I will send the request to development team.
Thank you for reporting the problem from operation edition window.
Irina.