Opening an OCL Library editor

In this section, you will learn how to open an editor for OCL libraries. You will also learn about some of the basic OCL editor features.

  1. Expand the package ocl and select the file querylib.oclx. You can open querylib.oclx in the OCL editor by double clicking on it.
  2. Notice the syntax highlighting. Different kinds of elements in the OCL code are rendered in unique colors. Examples of OCL code elements that are rendered differently are:

    Syntax highlighting

  3. Look at the Outline view. It displays an outline of the OCL library file including the library name, meta-model declaration, import declarations, definitions, queries, and tests.

    Outline view

  4. In the outline view, select different elements and note that they are again displayed in a whole file view in the editor.

    Range indicator

  5. The editor supports folding regions of text. Regions can be folded by clicking the folding indicators. Double-click on the vertical folding line collapses the folding region.

    Folding regions

Related concepts

OCL editor

Related reference

OCL Editor Preferences