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.
- Expand the package ocl and select the file querylib.oclx. You can open querylib.oclx in the OCL editor by double clicking on it.
- 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:
- Regular comments
- OCL doc comments
- Keywords
- Strings
- 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.
- In the outline view, select different elements and note that they are again displayed in a whole file view in the editor.
- 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.
OCL editor
OCL Editor Preferences