list of dots University of Ottawa logo / Université d'Ottawa

User Manual    [Previous]   [Next]   

Use Statements

Use statements allow you to decompose your system by embedding or referencing files containing other model or program entities (i.e. classes) within your current model or to include optional blocks of code that are specified within mixsets.

A model file or mixset will only be included once, subsequent "use" commands for the same file will be ignored. If a mixset name is preceded by a ! then this indicates to not use the mixset, and cancels out any previous use statement that requested to use the mixset.

A common technique is to create a 'master' Umple file that does nothing but have a list of use statements.

Parts of an individual class can be specified in separate files, and brought together using several use statements. For example the associations or attributes could be in one (or several) files, and the methods could be in one (or more) additional files.

Another way to decompose a system is to have a 'core' set of files that can be included in several different systems using use statements.

Use statements work in a manner similar to 'include' directives in other languages.

A file referred to by a use statement must be in the same directory as the file that has the use statement, or in a parent directory, or in a subdirectory named lib. There are also some builtin Umple files that can be loaded, with the prefix lib:. Finally an https URL may be used to load a file from the Internet


use Core.ump;

Load the above code into UmpleOnline



// Use statements allow incorporation of other Umple files. See UseStatements
useStatement : use [use] ( , [extraUse] )*