uOttawaUniversity of Ottawa - Canadas University
list of dots

Umple User Manual    [Previous]   [Next]   

Loading

Types of Directives

Directives appear as the 'main' entries in an Umple file.

  • Use statements result in inclusion of other Umple files to allow for modularization and reuse.

  • Entity declarations define the top level model or code elements including classes, interfaces, associations and association classes. Other model or code elements, such as methods or attributes must be placed inside these entities.

  • Namespace directives gather entitles in logical groups. Within a namespace, entitles must have different names. Namespaces affect code generation; for example they correspond to packages in Java.

  • Strictness Directives tell the compiler to issue extra warnings or errors in certain situations, or to turn certain errors into warnings.

  • Generate directives tell Umple one or more generated outputs to create. You can omit these entirely and specify them on the command line or using UmpleOnline. As a second argument on the generate directive, you can specify a path (directory) where the output should be put. You can also specify --override-all to ensure subsequent directives are ignored.

  • The tracer directive is under development and tells Umple which tracing tool to use in order to trace execution of the code.

Syntax


// Directives are the top-level items in an umple file. See manual page TypesofDirectives
// A directive is either used to configure the system or else is
// an actual entity of the system to be modelled or generated
directive- : [[glossary]]
    | [[generate]]
    | [[distribute]]
    | [[generate_path]]
    | [[filter]]
    | [[useStatement]]
    | [[namespace]]
    | [[tracerDirective]]
    | [[entity]]
    | [[debug]]
    | [[strictness]]
    | [[toplevelExtracode]]
    | [[toplevelException]]

// The generate clause can be used to generate multiple outputs
// The --override is used to say that subsequent generate statements will be ignored
generate : generate [=language:Java
    |Php
    |RTCpp
    |SimpleCpp
    |Ruby
    |Cpp
    |Json
    |StructureDiagram
    |Yuml
    |Violet
    |Umlet
    |Simulate
    |TextUml
    |Scxml
    |GvStateDiagram
    |GvClassDiagram
    |GvClassTraitDiagram
    |GvEntityRelationshipDiagram
    |Alloy
    |NuSMV
    |Papyrus
    |Ecore
    |Xmi
    |Xtext
    |Sql
    |Umple
    |UmpleSelf
    |USE
    |Test
    |SimpleMetrics
    |Uigu2] ( [=suboptionIndicator:-s
    |--suboption] " [**suboption] " )* ;

generate_path : generate [=language:Java
    |Php
    |RTCpp
    |SimpleCpp
    |Ruby
    |Cpp
    |Json
    |StructureDiagram
    |Yuml
    |Violet
    |Umlet
    |Simulate
    |TextUml
    |Scxml
    |GvStateDiagram
    |GvClassDiagram
    |GvClassTraitDiagram
    |GvEntityRelationshipDiagram
    |Alloy
    |NuSMV
    |Papyrus
    |Ecore
    |Xmi
    |Xtext
    |Sql
    |UmpleSelf
    |USE
    |test] " [**output] " [=override:--override
    |--override-all]? ( [=suboptionIndicator:-s
    |--suboption] " [**suboption] " )* ;

// Use statements allow incorporation of other Umple files. See UseStatements
useStatement : use [use] ;

// Namespaces divide the code into logical groups. See NamespaceDirectives
namespace- : namespace [namespace] ;

// The main top level elements to be found in an Umple file
entity- : [[classDefinition]]
    | [[traitDefinition]]
    | [[fixml]]
    | [[interfaceDefinition]]
    | [[externalDefinition]]
    | [[associationDefinition]]
    | [[associationClassDefinition]]
    | [[stateMachineDefinition]]
    | [[templateDefinition]]
    | [[enumerationDefinition]]