1. Home
  2. Docs
  3. Chapter 30. Project Options
  4. 5. Data Type
  5. Data Type

Data Type

Download PDF

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

  1. Select Window > Configuration > Configure Programming Language… from the toolbar.
  2. 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:

  1. Open the Project Options window by selecting Window > Project Options from the main menu.
  2. Choose Data Type from the list on the left hand side of the Project Options window.
  3. In the Data Type page, click the + button under Languages: to add a language.
  4. Enter its name, and press OK button to confirm.
  5. Press Add… button to add a data-type to the chosen language.
  6. 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.