Overview

The Modelio C# Designer parameter configuration window can be used to modify the behavior of the module.
To access the window used to configure Modelio C# Designer parameters, simply run the "Options/Set module parameters" command from the Modelio toolbar.

The "General" set of parameters

2
The "General" set of parameters

Keys:

  • Generation Mode: the mode selected for generation:

    • "Model Driven", based on complete generation from the UML model with marked zones to edit the C# code.

    • "Round Trip", allowing the C# content to be directly modified at code level, and reversed in order to update the model.

  • Default behavior for file retrieving: what to do during generation if the file on disk has been modified since last generation:

    • "Ask" the user confirmation.

    • "Keep" the model and overwrite the modified file.

    • "Retrieve" the file content.

  • Path to .NET Framework: The root directory of the .NET Framework. You must have it in order to develop a new program (compilation…). Ex: "C:\Windows\Microsoft.NET\Framework\v3.5"

  • SDK Version: Version of the Software Development Kit (SDK) to use for compatibility.

  • Command for invoking Visual Studio: The Visual Studio "devenv.exe" application.

Note: For further information on the model-driven generation mode and the round-trip generation mode, please see Model-driven mode and Round-trip mode.

The "Code generation" set of parameters

5
The "Code generation" set of parameters

Keys:

  • Code generation path: the path of the .cs files to generate.

  • Customization file: Where the default behaviour can be found in the "CsCustomizationFile" XML file, located in the module’s installation directory, into the workspace.
    Modelio C# Designer uses a specific XML file to define the mapping of base types, containers and the default creation of accessors.

  • Treat warnings as errors: If the specific C# consistency controls during generation is active. When active, the generation is stopped for each file containing a warning, rather than ignoring it. Ex: generate a class containing an attribute without type.

  • Use Cs naming rules: that during generation, the names of packages, classes, methods, attributes and parameters will be generated, according to C# recommendations concerning the case (upper or lower) of the first letter.

  • Prefix for fields: the prefix added for all property default implementation.

  • Generate full name for used classes: that the fully qualified name should be used for used classes.

  • Authorize auto-implemented properties: that whether properties should be generated with simplified syntax. Only available with C# 3.

The "Automation" set of parameters

6
The "Declaration visibility for attributes and associations" set of parameters

Keys:

  • Update classes implementing an interface: define the behaviour of the automatic model update after a modification on an interface. With the Ask value, a dialog box is opened each time to propagate the update.

  • Accessor generation: define the global running of accessor generation in the model. This can be activated, deactivated, or smart. For the latter, accessors are only created for attributes that are not public.

  • Visibility for getters generated from "Public" elements: declare the visibility of "get" type accessors for all public attributes.

  • Visibility for setters generated from "Public" elements: declare the visibility of "set" type accessors for all public attributes.

  • Visibility for getters generated from "Protected" elements: declare the visibility of "get" type accessors for all protected attributes.

  • Visibility for setters generated from "Protected" elements: declare the visibility of "set" type accessors for all protected attributes.

  • Visibility for getters generated from "Package" elements: declare the visibility of "get" type accessors for all package attributes.

  • Visibility for setters generated from "Package" elements: declare the visibility of "set" type accessors for all package attributes.

  • Visibility for getters generated from "Private" elements: declare the visibility of "get" type accessors for all private attributes.

  • Visibility for setters generated from "Private" elements: declare the visibility of "set" type accessors for all private attributes.

Note:  By default, attributes are created with a public accessor.

The "Constraints" set of parameters

7
The "Constraints" set of parameters

Keys:

  • Generate pre/post-conditions: That pre/post-conditions should be generated.

  • Generate invariants: That  invariants should be generated.

Note: By default, invariants and conditions are not generated.

The "External edition" set of parameters

8
The "External edition" set of parameters

Keys:

  • Use external edition: whether or not an external editor should be used instead of the internal Modelio editor.

  • Command for invoking external editor: the command used to launch an editor to modify the generated code. Ignored if the external edition is deactivated.

The "Compilation" set of parameters

9
The "Compilation " set of parameters

Keys:

  • Compiled files path: The root directory for compiled files.

  • Command for launching makefiles: The command used to activate makefile files. This is usually the path to nmake.exe.

  • Compiler: The C# compiler.

  • Compilation options: The options for the compilation.

  • Libraries: The path to additional libraries.

  • Debug: whether or not to add debug info to the compilation target.

  • Unsafe: that pointer passing is authorized during compilation.

  • Application’s parameters: the parameters to give to the application when the run command is launched.

The "Documentation" set of parameters

10
The "Documentation" set of parameters

Keys:

  • NDoc path: The path to the NDoc tool, used to generate the C# documentation.

  • Documentation generation: Whether or not to generate the documentation.

  • Generate "description" as "Csdoc": Wheter or not to activate the processing of "description" type notes as "Csdoc" type notes. If checked, during reverse operations, the file’s documentation is incorporated into the model in the form of a "description" note.

Note: For further details on documentation generation, please see Overview of C# documentation generation.

The "Model components" set of parameters

12
The "Model components" set of parameters

Keys:

  • Add C# source files in model component: that you wish to include C# source files in a model component that you are packaging.

  • Add Jar files in model component: that you wish to include C# libraries (dll) in a model component that you are packaging.