Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to assign default values to parameters of an operation? #71

Open
bobhairgrove opened this issue Jul 22, 2023 · 6 comments
Open

How to assign default values to parameters of an operation? #71

bobhairgrove opened this issue Jul 22, 2023 · 6 comments
Labels
bug Something isn't working enhancement New feature or request

Comments

@bobhairgrove
Copy link

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?

@IrinaNeculita
Copy link

Hello,
To set default types, go to configuration - preferences - Project default values
Under Operation you can find Parameters default type.

image

Regards,
Irina

@bobhairgrove
Copy link
Author

bobhairgrove commented Jul 24, 2023

@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.

@IrinaNeculita IrinaNeculita reopened this Jul 24, 2023
@IrinaNeculita
Copy link

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.

modelio_5EljawDKK1

regards,
Irina

@bobhairgrove
Copy link
Author

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!

@bobhairgrove
Copy link
Author

bobhairgrove commented Jul 24, 2023

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:
modelio_edit_operation_dialog

@IrinaNeculita
Copy link

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.

@IrinaNeculita IrinaNeculita added bug Something isn't working enhancement New feature or request labels Jul 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants