file [SOLVED] Function arguments as table when generating java code

2 years 5 months ago - 2 years 5 months ago #4675 by Lapin-Blanc
Hi !
I'm experimenting with modelio for the first time, and I'm trying to generate this kind of code from class diagram
    public String function1(String[] p1) {
    }

btw, when I define the function in the class diagram and generate the code, I get
import java.util.List;
...
    public String function2(List<String> p1) {
    }
...

If I manually make the change, and switch back to diagram view, I can't see any changes in the operation definitions and settings (params, etc.)
I've made screenshots to illustrate my question. I would like for example to create the "public static void main(String[] args)" in my classes...


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

2 years 5 months ago #4687 by phv
Hi,

1- Just select the operation parameter in the model browser tree.
2- In the Java property tab click on the 'Collection to use' option and choose "Array" in the drop-down list.

Generate the code. You should be done with it.

BR.
The following user(s) said Thank You: Lapin-Blanc

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

2 years 5 months ago #4688 by Lapin-Blanc
Perfect ! Thank you very much...

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

Moderators: tmaebr
Time to create page: 0.039 seconds
^ Back to Top