Skip to content

Textual Editors in Modeling Environment

julifan edited this page Jan 12, 2018 · 7 revisions

The textual editors use a textual syntax to represent UML diagrams. The syntaxes are tailored to the specific diagrams, so for every diagram, there is a specific syntax. For a detailed description of the syntaxes, please refer to the list in a paragraph below.

General Editor Usage

It is important to understand that the textual editor is no plain text editor but operates on formal UML models. This leads to the following restrictions compared to old fashioned text editors:

  • Saving is only possible if there is no error in the diagram. A dialog will notify users about existing errors when they attempt to save the diagram.
  • Creating new elements requires an explicit create operation. Users execute this operation via quick fixes that are explained in the paragraph quick fixes.

Besides these restrictions, the textual editors provide commonly known features that allow efficient editing of diagrams. The features are covered in the section editor features.

Editor Features

The editors provide state of the art editing support as described below.

Problems View

The problems view provides information about errors in the diagram. Errors are shown as soon as they occur in the editor. Saving the broken model is not required. This is different compared to the Java problems view, for which you have to save the document in order to see the issues. Jumping from the issue to the corresponding location the text editor is possible.

Quick Fixes

Quick fixes provide automated repairments of issues in the diagram. Quick fixes do not exist for all issues but for the most common issues. The most common task is creating an element in the text editor. If the element has never been created before, the editor will issue an error stating that the respective UML element could not be found. A quick fix allows creating the element. Afterwards, the error will vanish.

Error Notification

The textual editors provide the capability to issue an audio notification when moving the cursor in an area containing an issue. By default, this functionality is disabled. Users can active the notification in the Eclipse preferences. When running Windows, the setting can be found via Window - Preferences - Cooperate. On the preference page, users can choose one of three options:

  • No Audio Indicator - Disables audio noficiations.
  • Line Audio Indicator - Issues a beep if the cursor enters a line that contains an error.
  • Area Audio Indicator - Issues a beep if the cursor enters an error such as a wrongly typed keyword that contains an error.

Outline

The outline provides a coarse-grained overview of the UML diagram. The hierarchy of model elements covers the most important aspects of the diagram and allows jumping into the according text. Users can active the Link with Editor option to synchronize the focus of the cursor in the text editor and the outline.

Template Usage

There are templates for all elements in the textual editor. They can be used through pressing STRG and SPACE. Templates allow the faster creation of new elements through providing the specific keywords for each element and the possibility to select among fitting items in the diagram, e.g., if an interface needs to be specified, it shows all the existing interfaces. They are displayed context-sensitive, that means, only when the context allows the insertion of the element at this place in the editor. To navigate within a template, the TAB key is used. If there is a selection, key down and up allow selecting between the alternatives.

Textual Syntax

The Cooperate Modeling Environment provides the following specific textual syntaxes for the UML diagram types. The linked wiki pages provide detailed descriptions of the syntaxes.

Clone this wiki locally