Defining an Artifact

Artifacts can replace the standard generation of files; by default, an artifact generates the same code as the generated file but only for selected instances of a metaclass.

An artifact has the following properties:

Property

Description

Name

Name of the artifact.

Comment

Descriptive comment for the artifact.

Stereotype

Sub-classification used to extend the semantics of an object without changing its structure; it can be predefined or user-defined.

Encoding

Allows you to modify the default file encoding of the files to reverse engineer.

An artifact definition also includes the following properties:

Property

Description

Template

Template used to generate the content of the generated file.

Objects

List of objects associated with the current artifact.

Prerequisites

List of artifacts that must be generated before the current artifact.

Preview

Allows to visualize the generated code of the artifact.

  1. Double-click the symbol of an object with generated files, for example a class in C# language.
  2. Click the Generated Files tab.

    The Target column displays the resource file where the generated file is defined and the File Type column displays the type of the generated file.

    Each row in the list corresponds to a generated file type available for the current instance of a metaclass, you can customize the generation of this file using an artifact.

  3. Click the Create tool in the Artifact(s) column to add an artifact. This artifact will replace the standard file generation for the current object.

  4. Click Apply and click the Properties tool to define artifact properties.
  5. Click OK in both property sheets.