REXX Editor

Source files with .rexx file extensions use the NetPhantom REXX Editor in Eclipse. This editor supports the following features:

  • syntax coloring,
  • source outline,
  • procedure, label and comment folding,
  • occurrences marking,
  • matching Do/End keyword and parenthesis matching selection,
  • spell checking,
  • rename refactoring.

Syntax coloring

The REXX source is syntax colored for the elements:

  • comments,
  • strings,
  • numbers,
  • REXX keywords,
  • symbols,
  • variables (global, private and stem variables),
  • procedure and label sections,
  • REXX built-in and NetPhantom functions.

Content assist

Content assist is available for REXX keywords, REXX built-in and NetPhantom functions. It is activates using Ctrl+Space and will complete the word under the cursor, with parameters in case of a function. Functions are also completed when the left parenthesis '(' key is pressed. A pop-up listbox is presented for selection of content assist in case of an ambiguous word.

Outline

The Eclipse outline view shows the REXX source outline with the elements:

  • procedures,
  • label sections,
  • variables (global, procedure private in combination with stem variables or arrays).

Selections in the outline view will annotate all occurrences of the word in question in the editor, and moving between annotations can be done using the Next or Previous annotation buttons (Ctrl+. and Ctrl+,).

When double-clicking a word in the editor, the word is selected in the outline view. When double-clicking the word in the outline, the cursor is moved to the declaration of the word, e.g. the procedure or variable declaration.

Hyperlinks

Procedures, labels and variables are hyperlinked, i.e. if pressing the Ctrl key and clicking on the word in question, the cursor is moved to the definition of the word, e.g. the procedure, label or variable declaration.

Procedure, label and comment folding

Procedures, label sections and comments are foldable using the + and – icons in the left margin.

Occurrences marking

The occurrences marking select all occurrences of a word under the cursor after half a second of non-editing of the REXX source. Words marked are variables, functions, procedures, labels, and strings. The words are marked once the cursor has not been moved for half a second.

Matching Do/End keyword and parenthesis matching selection

When the cursor is placed before or after the Do or End keyword, the matching End or Do keyword is selected. The cursor may be moved to the matching location using the Next or Previous annotation buttons (Ctrl+. and Ctrl+,). This applies to the Do/End keywords.

Spell check

Spell checking is performed in Comments and Strings by default and is configurable. The spell check language and dictionary is configured using standard Eclipse preferences.

Refactoring

Variables, procedures and labels can be renamed globally, also called Rename refactoring. When the cursor is on a word of a variable, procedure or label, select the menu item Edit – Rename nn where nn is replaced with the word description, e.g. REXX variable 'first'. Refactoring is also available from the Outline view using the context pop-up menu. The rename dialog box is displayed and you fill in the new name:

Note: A refactoring operation can be undone and redone as other editor operations; however a message box may be displayed stating the operation will affect other files apart of the one being edited. This is due to background compilation process to NetRexx, then to Java.

Preferences

The REXX preferences are configured in Eclipse using the Window – Preferences menu item or with the REXX editor pop-up menu using Preferences: