Provided Transformation Operations

The DEFT research prototype comes with a number of predefined operations which generate document content, such as code listings or images, from artifacts, such as source code or model diagrams. Some work only for ODF Text projects, some work only for LaTeX projects and some work for both.

Operations for the DEFT UMLSpec Release

Supported artifacts are the UML metamodel, specified in Ecore (provided on the download page), Ecore diagrams and OCL constraints for the Dresden OCL toolkit.

The only supported chapter type is Open Document Text.

Ecore UML Metamodel Operations

Generalizations Listing creates a bullet point listing with all superclasses of a UML metaclass. A dialog lets you select the metaclass for which to generate the listing.

Dialog for metaclass selection
Dialog for metaclass selection
Attribute Listing transforms the attributes of a UML metaclass to a bullet point listing. A dialog lets you select the metaclass for which to generate the listing.

Associations Listing transforms the associations (operations) of a UML metaclass to a bullet point listing. A dialog lets you select the metaclass for which to generate the listing.

OCL Operations

Styled Code generates a code listing for OCL constraints and OCL operations. A dialog lets you select the concrete constraint or operation for which to generate the code listing.

Dialog for OCL selection
Dialog for OCL selection

Ecore Diagram Operations

Ecore Diagram generates an image from an Ecore diagram. A dialog lets you select the concrete diagram for which to generate the image, because an Ecore diagram file may contain multiple diagrams.

Dialog for Diagram selection
Dialog for Diagram selection

Operations for the DEFT General Release

Supported artifacts are Java 1.6 source code files, PL/0 source code files, (Dresden) OCL source code files, Ecore metamodels and Ecore diagrams.

Supported chapter types are Open Document Text and LaTeX.

Java Code File Operations

Styled Code generates a code listing from the code file. An AST Filter dialog lets you select the elements of the code file (classes, methods, individual statements) to be included in the code listing.

Works for ODF Text projects only.

Dialog for source code selection
Dialog for source code selection

Ecore Operations

Content as Text creates a set of listings with the content from an EClass. This comprises the superclass, known subclasses, attributes and references. A dialog lets you select the EClass for which to generate the content listing.

Works for LaTeX projects only.

Dialog for Ecore class selection
Dialog for Ecore class selection
The final result looks like this:

"Content as Text" example
"Content as Text" example
This operation has originally been implemented for one concrete specification document. It works under the following assumptions:

  • Each class of the Ecore model is documented in its own section or subsection. For the cross references to work, the sections must have labels with a special format. The label must start with sec:ccmspec:, followed by a colon-separated list of packages and the class name. For example, the section for class Resource in the package ccm/variant must be labeled as \label{sec:ccmspec:ccm:variant:Resource}

  • The labelcas package must be used. Add the directive \usepackage{labelcas} to your main LaTeX file.

  • The documentation text for attributes and associations (references) must be annotated directly in the Ecore model via the standard GenModel annotations. You might also want to try EMFDoc.

    Documentation of Ecore elements
    Documentation of Ecore elements
Identifier prints an identifier (class name, attribute name, ...) from an Ecore model. A dialog lets you select the element for which to add the name.

Works for LaTeX projects and ODFText projects (kind of).

Dialog for Identifier selection
Dialog for Identifier selection
The identifier is rendered as a special LaTeX directive. In order to produce valid output, add the directive \newcommand{\deftreferenceecore}[2]{\texttt{#2}} to your main LaTeX file.

Note: This operation can also be invoked by pressing Alt+I and selecting the desired artifact in the first dialog.

Ecore Diagram Operations

Ecore Diagram generates an image from an Ecore diagram. A dialog lets you select the concrete diagram for which to generate the image, because an Ecore diagram file may contain multiple diagrams.

Dialog for Diagram selection
Dialog for Diagram selection
Identifier This is nearly the same as the Identifier operation for Ecore diagrams. In order to produce valid output, add the directive \newcommand{\deftreferenceecorediag}[2]{\texttt{#2}} to your main LaTeX file.

Works for LaTeX projects and ODFText projects (kind of).

OCL Operations

Styled Code generates a code listing for OCL constraints and OCL operations. A dialog lets you select the concrete constraint or operation for which to generate the code listing.

Dialog for OCL selection
Dialog for OCL selection

PL/0 Operations

Styled Code generates a code listing from the PL/0 file. An AST Filter dialog lets you select the elements of the code file (declarations, blocks, statements) to be included in the code listing.

Works for ODF Text projects only.

Dialog for code selection
Dialog for code selection