Data types

VP provides a set of built-in datatypes like boolean, int, short, etc. I didn’t found possibility to add new datatypes. What should I do, if I use unusual language with strange datatypes?
How can I represent standard library types, like String or DateTime? Is there something like “external types” mechanism?

Hi Jacenty,

Thank you for your post.

Currently, the only way that you can add your own type is by creating a class of that type (e.g. create java.lang.String for a String type) and reuse it in the project. If you are using Standard (or above) Edition, you can reverse engineer the library classes into your project through Instant Reverse (Tools | Instant Reverse).

We will allow user to customize data type in the future release.

Best regards,
Jick

you can add your own type is by creating a class of that type (e.g. create java.lang.String for a String type) and reuse it in the project

Of course I can, but it will be generated to my code. Even if I add the <> stereotype to it.
A propos, what is the difference between primitive and non-primitive classes?

Thank you for your response,
Jacek

Hi Jacenty,

If you use the Instant Reverse feature to reverse the ‘library class’ to the project, the reversed model won’t be generated to your code.

Hope this helps.

Best regards,
Jick

Hi, it’s ok for me. It would be even better, if I could “mark” classes added manually as ‘library class’ or ‘external class’.

Other thing - ff I have two or more classes with the same name in different packages, it’s difficult to choose a proper one as an attribute type in attribute specification dialog box. It would be nice to add package name after type name in type combo box.

Hi Jacenty,

Your opinion does make sense. I have asked our engineers to investigate if we can do anything to solve the problem. (Perhaps show the class name as fully qualified?)

Best regards,
Jick

Maybe it would be enough. I think, that short name is the most important and it should occur on the front. Owner name should be the next one, maybe in parentheses (like on a class diagram).

Something about using instant reverse to reuse libraries. What about really big libraries, like .NET Framework or Swing. I affraid, that my project will grow to much if I reverse such a big library, and sometimes I need only a few classes from it. Can I reverse a library to one big project, and then import only few types from it?

Hi Jacenty,

For Java Instant Reverse, you can reverse the source (.java, .class, .jar…) as an index tree, and reverse to the project when you really need it.

For details, please read:
http://resource.visual-paradigm.com/vpsuite2.2sp2/support_java_1.5_syntax_in_instant_reverse.html

Best regards,
Jick