list of dots Digital Research Alliance of Canada logo  NSERC logo  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 elements (such as classes) into your current model, or to include optional code blocks defined in mixsets.

A model file or mixset is included only once; subsequent "use" commands for the same file will be ignored. Preceding a mixset name with '!' 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 function similarly to 'include' statements 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

Example

use Core.ump;
      

Load the above code into UmpleOnline

 

Syntax


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