Code Formatting


The Wolfram Workbench can automatically reformat your code. The formatter is still quite simple and cannot be configured, however it can be useful for improving the visual appearance of your code.

The formatter is applied from the Source submenu of the code popup as shown in the following.

Formatter

If some code is selected, the formatter applies to the selection. Otherwise, the entire file is formatted.

Before formatting, some code might look like the following.

Formatter

After formatting it appears as below.

Formatter

Code formatting can be useful when the code has been imported, for example with the notebook code importer.