Source Code Format Settings

Help index


This dialog allows for the formatting (pretty printer) parameters to be configured.

Basically, there are 2 major formatting styles:

  1. K&R (Kernighan & Richtie) Style
  2. Lisp Style

Kernighan & Richtie Style

This style is used by more than 90% of all programmers and is based on the style used in the UNIX operationg system's C programs. Its main difference to the other style is that opening and closing parentheses are each on a separate line from the enclosing statements or expressions. This makes inserting & deleting lines easy.

Lisp Style

This style is used by the rest, and most Smalltalkers (but not the ST/X author!). The opening parenthesis is on the same line as the first statement of a block, and the closing parenthesis is appended to the last line. This usually makes the code slightly denser (1 line per block), but makes insertion/deletion of text inside a block a little more work. The settings dialog allows for a quick change between these two styles.

Atomatic Code Formatting

If on, methods source code is formatted (pretty printed) automatically when a methods source is displayed.
For now, the formatter is not invoked on keyboard input; you can reformat a changed method source via the popup menu.
You may want to disable this, if you don't like the formatters output.

The formatter may be configured to either generate lisp-style or c-style block format.

Warning: the formatter is based on the BRFormatter code ported from the RefactoryBrowser package. Porting is still underway and there may be bugs especially with ST/X extended syntax. Use at your own risk.


Copyright © Claus Gittinger Development & Consulting, all rights reserved


Doc $Revision: 1.3 $ $Date: 2012/02/14 14:45:52 $