Basically, there are 2 major formatting styles:
...
someCondition ifTrue:[
...
[another condition] whileTrue:[
...
].
...
[
someCode
] on:Error do:[
handlerCode
]
]
...
someCondition ifTrue:[
...
[another condition] whileTrue:[
...].
...
[
someCode]
on:Error do:[
handlerCode]]
The settings dialog allows for a quick change between these two styles.
Notice: all of ST/X has been written in the K&R style (with the exception of some imported code from friends and public domain sources). and is the favourite style used and accepted by the author. As it is mostly his task to fix bugs and maintain the code, and it makes a huge difference when code has to be read and understood, he highly recommends (actually demands) that tis style is used when code is to be brought into ST/X.
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. The original formatter completely lost any comment layout, which resulted in very ugly looking source code (and is probably one reason, why many people did not comment their code!). We tried to fix most of those issues (but who knows...). Use at your own risk, and check if you like the output. If not, indent your code manually.
Copyright © Claus Gittinger Development & Consulting, all rights reserved