Formatting Blocks
This section describes the options for formatting blocks.
Block Arguments on the Start Line
If this option is enabled, block arguments are kept on the same line as the open square bracket.
OFF
(do not keep the arguments on the start line)
self verify: [
:a |
temp := a.
a]
ON
(keep the arguments on the start line)
self verify: [:a |
temp := a.
a]
Block Variables on a New Line
If this option is enabled, block variables are placed on a new line.
OFF
(do not place the variables on a new line)
self verify: [| var1 |
var1 := 2.
var1 + 4]
ON
(place the variables on a new line)
self verify: [
| var1 |
var1 := 2.
var1 + 4]
Line up Brackets
If this option is enabled, brackets are lined up. They are lined up only if the expression does not fit on one line.
OFF
(do not line up brackets)
aBlock :=
[
self sizeOf: myCollection.
self enable]
ON
(line up brackets)
aBlock := [
self sizeOf: myCollection.
self enable
]
Space between Square Brackets
If this option is enabled, a space is inserted after opening square brackets and before closing square brackets.
OFF
(do not insert spaces)
[self sizeOf: myCollection]
ON
(insert spaces)
[ self sizeOf: myCollection ]
Start Open Brackets on the Same Line
If this option is enabled, opening brackets follow the selector.
OFF
(brackets do not follow the selector)
self myCollection do:
[:element|
...]
ON
(brackets follow the selector)
self myCollection do:[:element|
...]
Last modified date: 06/30/2015