Data type options
UML is theoretically a modeling language independent to particular programming language(s). Yet, it is possible to transform between UML models to a software applications or systems. While the pre-defined data-type set works well in the UML world, there is enormous need to ensure the design can be applied to programming source code. Problems comes from the fact that programming languages, by nature, are unlikely to share the same set of data-types suggested by UML. A typical example is about the use of boolean. 'boolean', 'bool' and 'Boolean' are adopted by UML and Java, C# and VB.NET respectively. But they are all referring to the same thing - boolean.
Visual Paradigm lets you choose a programming language that your UML project should be based on. When modeling, you can easily select a data-type that is allowed for the chosen language, without typing it. Besides, new languages and data types can be added, which increase the flexibility of working under different domains.
Configure programming language
- Select Window > Configuration > Configure Programming Language... from the toolbar.
- In the Programming Language window, select the language to switch to. The way how data-type will be mapped from the current language to the chosen language is listed in the table following the data-type definition of that language.
Customizing programming language and data types
By default, there are six types of predefined (programming) languages. Each of them consists of a set of supported data types. Besides working with those default languages and types, you can add your own languages and add data types. To do so:
- Open the Project Options window by selecting Window > Project Options from the main menu.
- Choose Data Type from the list on the left hand side of the Project Options window.
- In the Data Type page, click the + button under Languages: to add a language.
- Enter its name, and press OK button to confirm.
- Press Add... button to add a data-type to the chosen language.
- Enter its name and press OK to confirm. From now on, once you have set your own language as the language for your project, you can pickup the associated data-types as attribute type, operation return type and parameter type.
The following resources may help you to learn more about the topic discussed in this page.
|Chapter 5. Data Type||Table of Contents||Chapter 6. Code Synchronization|