Refal Plus development tools — quick start guide

To use the Refal Plus development tools, switch to the Refal perspective (Window/Open Perspective/Other/Refal). In this perspective, the following wizards are available in your File/New menu:

Note that the use of these wizards is optional and an entire Refal Plus source tree can be copied into the src directory of a project. Remember to manually refresh (File/Refresh) the src directory after the copy is completed.

Building

Any Refal Plus source file that exists in the source directory will be compiled when the project is built. If Project/Build Automatically is enabled, Refal Plus source files will be recompiled whenever they are saved. Alternatively, otherwise, Refal Plus source files are recompiled when Project/Build Project and Project/Build All are selected. By default, classfiles are saved in the project's bin directory (to see it switch to Resource perspective). Project/Clean will delete all classfiles in the bin directory, as well as get rid of all project error markers. As in the Java development tool, compilation errors will appear as markers and as rows in the Problems view.

Editing

The Refal Plus plugin enhances the editing of Refal Plus source files with compilation information. This information is refreshed implicitly as you type the code. The following editing services are supported:

Compilation information is also used to implement syntax coloring and automatic source formatting. The coloring scheme used to highlight a file and formatter options can be configured at Window/Preferences/Refal Plus.

Note that the definition and the uses of a variable are highlighted differently by default, which is very helpfull with pattern matching.

Tip: Use Ctrl+I shortcut for re-indenting the selection (or the current line), Ctrl+Shift+F for re-indenting the whole file.

Running

Given a module that implements Main function, the module can be executed as an application inside Eclipse. The Main function must have the following format: $func Main /*empty*/ = e;.

Select the Run/Run As/Refal Plus Application menu item.

Program arguments and environment can be configured in the Run dialog (Run/Open Run dialog...).

Debugging

You can also debug a Refal Plus application. To do this, select Run/Debug As/Refal Plus Application menu item. Program arguments and environment can be configured in the Debug dialog (Run/Open Debug dialog...). Also you can set Stop in Main option there to stop the execution just after the program starts. Eclipse will switch to Debug perspective which will allow you to step through the program examining the execution state.

The following debugging services are supported: