Promela Editor

Promela Editor is a special case of a text editor, which helps a user to specify models in Promela. It is the largest part of the default SpinRCP perspective. Many instances of the Promela Editor containing Promela (or other) files can be opened simultaneously, but only one editor can be active at any one time. The active editor is the one, the title of which is highlighted. By right-clicking anywhere within the Promela Editor, a drop-down menu opens, which offers a subset of the Eclipse editor functions.

For ease of viewing and editing models the following features are available: syntax highlighting, code folding, content assist, and marking a place of a syntax error.

Syntax highlighting is a feature of Promela Editor that displays the text of the source file in different colors according to the category of terms. Highlighting does not affect the meaning of the text itself; it is only intended for human readers. The colors for different groups of reserved words, comments, and default text can be selected on the Promela Editor preference page. The default colors for text and comments are black and blue, respectively. Promela reserved words can be grouped into seven sections. All the reserved words in a section will be displayed in the same color. In each section a different color can be set. By default, reserved words from all seven sections are displayed in the same (violet) color.

Code folding allows the user to selectively hide or display sections of a currently edited file. This allows the user to manage large amounts of text whilst viewing only those subsections of the text that are specifically relevant at any given time. Code folding is possible between an opening curly bracket '{' and closing curly bracket '}'. This feature is commonly used to hide/display the bodies of large proctype declarations and is essential for studying the specifications in real systems.

Content assist or autocomplete is a functionality provided by SpinRCP which helps you to write the code faster. You can just type in the first letter(s) of the reserved word and then press Ctrl+Space to be offered all the choices that match the entered letters that are valid for the current context. You simply select the wanted word. This help is especially useful for a beginner who is not yet well acquainted with Promela syntax.

Marking a place of a syntax error is described in Syntax Check option.