Diagram Editor

Polarion provides the Diagram Editor tool for creating and editing diagrams. You can use it to create and edit diagrams in LiveDoc Documents, including Work Items contained in Documents, and in the Description field of Work Items in the Table view of the Work Items Tracker. After inserting a new diagram, you can insert a caption above of below it.

The Diagram Editor provides an extensive library of shapes and symbols that can be using to create a wide variety of diagrams including UML diagrams, flowcharts, and circuit diagrams.

Creating a New Diagram

You can create new diagrams in LiveDoc Documents or the Description field of Work Items in the Work Item Tracker. In Documents, you can create diagrams in the Document's plain text, or in Document-based Work Items.

LiveDoc Documents

To create a new diagram in a LiveDoc Document:

  1. Open the project containing the Document, and in Navigation browse to the space and Document, clicking on the Document to open it in the Document Editor.

    Alternatively, you can use the Search box in Navigation to search for the desired Document.

  2. In the Document, create a new line at the place you want to insert a new diagram. If you want to place the diagram inside a Work Item, place the caret inside the Work Item and use the Insert menu on the Work Item icon in the Document's left margin to add a new line above or below the current caret position.

  3. On the Diagram Editor toolbar, click on the Insert drop-down menu and choose Diagram.

Figure 2.6. Diagram in LiveDoc

Diagram in LiveDoc

Inserting a new diagram into a Document

Tracker-based Work Items

To insert a new diagram in a Work Item in the Tracker:

  1. In the project containing the Work Item, select Work Items in Navigation to open the Work Item Tracker. If the Table view is not the current view when the page opens, select that view.

  2. Browse or query Work Items, and in the upper pane of the Table view select the item in which you want to insert a diagram.

  3. Scroll the lower pane of the Table view until you can see the Description field of the selected Work Item.

    Click on the header to open the field for editing.

  4. On the Description field toolbar, click the Insert Diagram button.

Figure 2.7. Diagram in Tracker

Diagram in Tracker

Inserting a diagram into the Description field of a tracker-based Work Item

TIP

You can also create and edit diagrams in custom fields of the Rich Text type.

Editing a Diagram

When you edit a Document or the Description field of a Work Item containing a diagram, the diagram is not automatically editable. An additional action is required to open the diagram in the Diagram Editor. However, you can resize the diagram without opening it in the Diagram Editor.

To edit an existing diagram in a Work Item's Description field:

  1. Click the field header to open the field for editing.

  2. In field, click anywhere on the diagram.

  3. Click the Edit button that appears on the diagram to launch the Diagram Editor.

To edit an existing diagram in a Document:

  1. Click anywhere on the diagram.

  2. Click the Edit button that appears on the diagram to launch the Diagram Editor.

Resizing a Diagram

To resize an existing diagram, follow the same steps as for editing, except click the Resize button.

Enter the new pixel dimensions in the Resize Image dialog. Note that the aspect ratio is automatically maintained unless you toggle off the Keep Aspect Ratio button.

Shape and Symbol Palettes

The Diagram Editor provides an extensive library of shapes, symbols, and clip art images that can be placed into diagrams. These are grouped into categories, and each category appears as an expandable section in the symbol library panel on the left side of the Diagram Editor. Expand or contract any section by clicking on the name.

You can control which categories appear in the symbol library panel. Click More Shapes to display a menu listing all the categories. Categories showing check marks are visible in the panel, while all others are hidden. Check or uncheck any category to show or hide it in the symbol library panel.

When you finish editing a diagram, the visible symbol categories are saved and will appear in the symbol library panel next time the diagram is edited.

Inserting Shapes, Symbols and Images

Depending on the type of shape or symbol, you may need to use different actions to insert it into the diagram. Try clicking on a shape, symbol, or clip art image. A click inserts many elements, especially block-like elements. If clicking does not insert the element, use drag-and-drop from the library panel to the diagram background. Connector type elements in particular may require this action to insert them.

Using Custom Images

You can include an image attached to a Document or a contained Work Item into a diagram using the Insert Image action in Diagram Editor toolbar. Caveats:

  • When attaching an image to an item in the Diagram Editor, use the default "attachment" link, not the "direct link" for image URLs.

  • The image URL will typically be full URL, so there may be problems if the ID of the containing(Work Item or Document) is changed, or if it is moved to another project.

Copying a Diagram

If you want to copy an existing diagram to another Document, to another place in the same Document for subsequent modification, or to a Work Item, you should copy the diagram source code to your clipboard and paste it into a new diagram. Do not copy the diagram image, as it will not be editable in the new location.

To copy the diagram source code:

  1. In the Diagram Editor menu, choose File > Edit Source to launch the source code editor dialog.

  2. Select the entire source code in the dialog, copy it to your clipboard, and click the Cancel button.

To create a copy of the diagram:

  1. Open the Document or Work Item in which you want to create a copy of the first diagram, and create a new diagram.

  2. In the new diagram, in the Diagram Editor menu, choose File > Edit Source to launch the source code editor dialog.

  3. In the source code editor, paste the previously copied source code from your clipboard making sure you replace all the code that appears there when you open the source code editor dialog.

  4. Make sure the Replace existing drawing option is selected in the dialog and click OK button.

Deleting a Diagram

If a diagram is no longer needed, it is easily deleted. The action is the same regardless of whether the diagram is part of a Document or a tracker-based Work Item.

To delete a diagram:

  1. If viewing the diagram in the Description field of a Work Item in the Tracker, click the field header to place the field in Edit mode. (Ignore this step if working in a Document.)

  2. Place the caret after the diagram image and press the Backspace key (Windows) or Delete key (Mac). The diagram image is removed.

  3. Save the Document or Work Item to complete the delete operation.

Printing a Diagram

The File menu of the Diagram Editor includes the Page Setup command and the Print command. Use these to set up printing of the current diagram and print it to any accessible local or network printer. Only the currently open diagram is printed, not the Document that contains it.

Miscellaneous Notes

Several notes that may be of interest:

  • When a user begins editing a diagram, a lock us set and no other user can edit it until the diagram changes are saved, the user closes the Diagram Editor, or the lock timeout occurs. The duration of the lock before it times out is set by the system administrator. (See Administrator's Guide, Advanced Administration, Advanced System Tuning (com.polarion.ui.lock.timeout).

  • If the Duplicate Work Item function is invoked while a diagram is being edited, pending changes to the diagram are saved before the Work Item is duplicated. Subsequent changes to the diagram after the Work Item has been duplicated will not be reflected in the new duplicate Work Item.

  • Changes to diagrams in Work Items are tracked in the Work Item history. That is, if the only change to the Work Item is a diagram change, the revision of the Work Item in which the change was made contain the diagram in the state it was when the Work Item was saved. (Changes to a diagram are not saved to the history until the Work Item is saved.)