Instant Generator

Hi,

is it possible to have the following settings during code generation for associations?

  • add import statement instead of using fully qualified type name

  • java generics association with List, Set, Collection (interface instead of Implementation)

thanks for the help

Best regards

Hello lagson,

You can set these in the Code Synchronization page of the Options dialog box (Tools > Options).

Best regards,
Jick

Hi Jick,

i made this settings but the instant generator diaglog doen’t consider it…

must i do something after the setting it?

Best regards
Rodrigue

Hello lagson,

The settings was available for code synchronization, not instant generator. For instant generator, I just have a quick try, and found that the generated code has already using import statements instead of fully qualified type name. Were you referring to attribute in collection type, such as Linked List?

Concerning the second issue, I will discuss with our engineers and come back to you.

Best regards,
Jick

Hi Jick,

i just have problem with associations, instead to define attributes for associations in the uml class diagramm, i let the instant-generator do it for me, since i don’t have the possibility to use “generic type” definition (java 1.5) in the class definition.

By doing this the instant-generator:

  • allow me only to choose among implementation of collection typs (e.g ArrayList, Vector, HashSet etc…) and i would like (if it’s possible) to use there
    List or Set…

  • uses there the full qualified name instead of the import statement…

If these settings in options are available for the code synchronization, i would like to know, if there’s another way to define generic type in the model…

thanks
Best regards

Rodrigue

Thanks lagson, I will discuss with our engineers.

Dear lagson,

We decided to support your need. This will be done in the coming build. I will contact you once it is available.

Best regards,
Jick

hello lagson,

I am happy to inform you that you requests were supported in the latest release. Please run the product updater to advance to the latest release. You can find the updater inside the bin folder of $vp-suite-install-dir. I am also attaching a screenshot to show you the generated code after the fix is made.

Best regards,
Jick

School.png

hello lagson,

I would like to let you know that Service Pack is released. As I know both of your requested fixes are ready in this release. Therefore, please run the product updater (inside the bin folder of VP Suite) to advance to Service Pack 2.

Please feel free to let me know if there are any questions.

Best regards,
Jick