Using the Documentation Template Designer

Introduction
Creating and opening projects

Setting Resource options

Report Designing Basics

Inserting Data

Formatting Data

Zones
Sections
Areas
Stock Sections
Designing your own documentation template
Tips and Tricks

 

Introduction

The Main Template Designer Window is divided into 2 main regions or panes. They allow to create templates used then by GenDoc in creating documentation reports.

Scope pane (left pane) - represents the scope of template's objects;
Area pane (right pane) - represents sections (hereinafter "areas") definitions connected with the appropriate template's objects;

Each report which has been created using Together's Document Template Designer, is divided into 5 main sections (hereinafter "Zones"):

  - Report Header
  - Page Header
  - Details
  - Page Footer
  - Report Footer

Both panes including all five zones are shown below.

How does it work?

GenDoc needs to know how to generate a report: how to traverse the model, which elements to collect, in which order to represent and group them within the report and so on. First, it will look at Scope pane, where are all zones the report will be created from. Next, GenDoc needs to know which data should be put in the particular report's area and how they should appear. In order to do that, GenDoc will analyze each existing report zone area. Some of them are grouped in sections, some do not. Actually, each area represents some kind of procedure the GenDoc should execute while generating the report.

Terminology

Zone: a distinct part of a report (Ex. Report Header).
For more information, see Zones topic.
Sections: logical grouped (based on grouping criteria) informational parts (areas) within a zone (Ex. Folder Section). There are five main sections:

  1). "Element Iteration" section
  2). "Static" section
  3). "Property Iteration" section
  4). "Folder" section
  5). "Stock" section

Sections may contain one area (for example Static section) or other sub-sections (for example Element Iteration section) with corresponding them areas.
For more information, see Sections topic.
Area: the smallest piece of information of the report. It describes which data must be inserted into particular report area field. (Ex. any Static Section). For more information, see Areas topic.

This tutorial will cover the creation of reports in Together using Documentation Template Designer.

Creating and opening projects

Opening existing projects

To open an existing Documentation Template Designer file:

Creating a new file (e.g. NoName.dtf)

To create a new file:

Setting Resource options

To set options for a template, first you must open/create it and then modify any or all of the following:

Report Designing Basics

A report can be divided into five major zones, which are:

Page Header

Elements of this zone will be seen once per page in the upper half of the report.

Report Header

Placing elements here will allow them to only be seen on the very first page of the final report.

Details

The Details zone represents all report's data, and it is divided into sequence of areas (sometime grouped by sections), each of them representing a piece of information of the report. This zone contains at least one Element Iteration section (by default, only one).

Report Footer

Placing elements here will allow them to only be seen on the very last page of the final report. It is often used to print summary data for the report.

Page Footer

Elements of this zone will be seen once per page in the upper half of the report.

Note:

- if you don't want to define in your report all zones, Documentation Template Designer supports the ability to hide them. See Tips and Tricks for more information.
- the "Details" zone is divided into sequence of areas. Page header/footer and report header/footer contain only one area each.

Inserting Data

Click with the right mouse button on one area background and choose Insert control.

This command lets you create a blank element exactly at that position in the template area, where the box appears.

The text entered in this box will appear in the created label field. On the bottom of that box there is another box to preview all changes (font, color, border) you make to the typed text. See below the

In a Report header you can also insert an image. Just navigate to the directory containing the file, select the file and click Open. A preview of the image will appear on the bottom of the control panel.

A panel is an element, within you can insert all elements which are available for inserting into that zone, including new panels too. After creating, you have the possibility to set the alignment parameter for coming inside elements. Use panels to show areas in a more compact way.

Formulas provide an important mechanism to manipulate and display data inside the report that could otherwise not be available directly from the data source. Sometimes data can be missing from data sources even though you have to put them on your report therefore is it necessary to use formulas in reports. Each Formula control is connected with an expression which calculates a value printed in the report (for the first time it may be a value returned by some predefined function). For example, it may be the function which returns a property value by the property name. Example of using formulas: To display a property name and value, two predefined function may be used: "thisPropertyName()" and "thisProipertyValue()". This functions should be set as expressions in Formula controls which should be put in detail zone of the Property Iteration section.

This is the most important control type because it contains that information you need to see in a report: documentation, name, stereotype, version, package, author and more. There may be two different types of data source for this control:

Note: The information you can insert into Data Control, always depends on Element Iteration area you are working in e.g. you can't have in a Page Header's data field stereotypes.

Note: You can come back to each control panel by right-clicking on element and choosing "Properties".

Formatting Data

Here you can set the family, style and size of the font and also text alignment. All settings are applied to the all typed text in the field.
Note: After you finished, click Ok to apply formatting to the field

Pick the needed color and using the left/right mouse button, change the text color/fill the label with selected color. Note: If the background color is with cross hash in the text window, that means that background color of this field is transparent. To specifiy a color, first uncheck the Transparent option.

Here you can set the border color and thickness of the label border lines one-by-one or all together. This features will help you when you want to highlight an element which is important for you.

Note: Use the "Preview box", which reflects your selections, to synchronize all changes you make with the typed text.

Zones, sections, areas

Documentation Template Designer divides a report into sections called "zones". For example Page Footer is a zone.

Operations with Zones

Sections are logical groups containing informational report parts (areas). There are 5 types of sections used in the template:

  1). "Element Iteration" section
  2). "Static" section - the smallest section of a template, represented by only one area.
  3). "Property Iteration" section - contains properties of a iteration element. By default each "Property Iteration" section iterates through all properties of the object.
  4). "Folder" section - usually, this section is used to keep compact a short description of the whole iteration element
  5). "Stock" section

Operations with Sections

An area is the smallest piece of information of the report. For example, Report Header contains just one area so it can be called area too. Each area in the report always have some prototype definition in the report which shows how data should be put in the particular report's area and how should they appear.

Operations with Areas

Element Iteration Section

This section consists of the following objects:

  - the header section
  - nested sections
  - the footer section

Header and footer sections are represented by only one area each. Their meanings are similar to headers/footers zones meanings.

Nested sections are used by GenDoc while a report is created. When GenDoc meets an Element Iteration section, it looks at its properties in order to know for which type of model elements this section was designed. For example, if the Iteration element is "package", then GenDoc will ask the model all packages it has, will take the "root package" and generate a report for it using existing sections. Some of those sections may contain incompatible (nonexistent) information for the "root packages", so they will be skipped. If there are packages in the "root package", then GenDoc will process all Element Iteration section list for each of them. Suppose, your template has only two Folder sections: first - a list of packages, the second one - a list of diagrams. Now, let's take a "root package" containing only packages containing diagrams. First time when the list is passed, the second folder will be skipped. Then, for each of packages, the first folder will be skipped.

Stock Sections

Stock sections are sections that may be called and inserted as modules. If a fragment of your template is repeated, you can create a stock sections from this fragment, delete it from the template and call it there by using only one row of design. In this way, you don't need to describe iterations you already inserted, twice.

Operations with Stock Sections

Designing you own documentation template

Page Header (first zone)

Save Changes

Remember to click on the button "File | Save" when you are finished making any adjustments to the text in your template.

Note: If you don't use this button after making changes to your template all changes will be lost.

Report Header (second zone)

Element Iteration (third zone)

Iteration by "Class Diagram"

Page footer

Report footer

Tips and Tricks

Launching Documentation Template Designer

Documentation Template Designer can be launched in two ways: direct launch selecting Tools | Design Documentation and through Tools | Generate Documentation selecting Design from the pop-up dialog box. Note: In the last case a project must be already opened. Template Designer will automatically the project which has been specified as default in the Template name line.

Hide/show zones and sections

At times it is needed to hide certain fields or zones of a report. This may be necessary when you are concentrating on a particular zone or section and don't want other zones/sections created. DTD provides the ability to hide zones or sections within them.

To hide a zone, uncheck it in Setting Resource options box.

To hide a section within a zone, click on that section in the left pane and check Hidden from Properties.

Move an element (or group of elements) within sections areas

Moving and scaling of elements is done using the left mouse button. To move an element or a collection of elements to a new place, first select it (them) so that it is highlighted, using Ctrl + the left mouse button. Next press the left mouse button inside the element and move him (them) to its new position.

Moving sections up/down

Every section is being inserted according to the place of your clicks and right-clicks in the Scope pane. If a current order of sections doesn't fit your requirements you may delete the section and insert it again into another place or use "Move up/down" options. These actions can be reached from a pop-up menu, by right-clicking on the needed section

Setting attributes

To set attributes like type, color, label, etc., of an element first select it (using the right mouse button) and next select "Properties". Even if you select more than one element you'll be able to set the properties of only one element.

Cut, Copy and Paste

You can remove elements from the zone by first selecting them, right-clicking the right mouse button and next selecting "Cut" or "Delete". If you choose "Cut", the elements will disappear but are in fact saved in a buffer. You can put them back in the field, or in another zone, by pasting them using Properties | Paste.

For pasting, you can also select the Copy option from Properties and then "Paste". This will have the same effect.

Also, for increasing speed, you can copy whole section into clipboard and paste them in needed places. Just right-click in the Scope pane on a section you need to copy and select "Copy to clipboard". Then, to paste that section, right-click in the Scope pane, select "Insert sibling/nested section", and choose "Paste from clipboard" from the pop-up menu.

Closing tabs

Sometime you need to have all sections tabs opened, sometime you don't. If you want to close one of them, right-click on it in Main pane and click on ''Close".

Aligning elements

Sometimes you have a number of elements and you want to align them in some way, e.g. centered or all starting at the same left position, etc. Select the elements you want to align, then choose one of the alignment options: Left Side, Right Side, Top Side, Bottom Side. There are three more options in that menu: Make same width, Make same height and Make same size. Use them for a more compact form of the zone.

Enabling Conditions

This options is used when the user wants to hide a section (it may be done by checking "Hidden" box), but during one session only. For example: in your created template, right-click on the first Static section of the Element Iteration section, and select Properties. In the Enabling Condition field you'll see next value: < ! $fullName='' >. It means, that the root package name (in this situation) will be not printed, though for all other packages (except "root"), this option will be ignored.

Resizing fields

To re-size a zone/area, position the cursor over its split bar. After the cursor takes the shape of an arrow, click the left button and drag and drop the split bar to its desired position.

Collapse/Extend zones and sections

After you finished working with a zone, for a better navigation in the left pane, Collapse (click on sign "+") or Extend (click on sign "-") located in the upper-left cornet of each zone or section.

Multiple items selection

To select more than one item (labels, data controls, images) from pop-up lists or sections, keep "Ctrl" key pressed. Note: Sometime, you'll need to have Scope option set to "Set of properties".