2016-05-06 10:26 GMT+02:00 Peter Uhn��k <i.uhnak@gmail.com>:
Hi,

I thought that I already asked about this but apparently not...

Right now when I have an array like

observations := {
MElement -> {
#change -> #(name owner uuid).
#add -> #().
#remove -> #()
}.

MContainer -> {
#change -> #().
#add -> #(add:).
#remove -> #(remove:).
}.
}.

it gets formatted into

observations := {(MElement
->
{(#change -> #(#name #owner #uuid)).
(#add -> #()).
(#remove -> #())}).
(MContainer
->
{(#change -> #()).
(#add -> #(#add:)).
(#remove -> #(#remove:))})}.

Which is really ugly with all the _uneeded_ parenthesis.

I tried to look into BlConfigurableFormatter>>needsParenthesisFor: where it is being added, but any change I try to make I end up breaking some test as the behavior is not very obvious for me.

would this help (added to the very start of needsParenthesisFor: , after checking that parent isn't nil) :

��parent isArray ifTrue: [ ^ false ].


��

Can this be changed/fixed easily?


And second, perhaps less important... do we really need to reformat #(name owner uuid) into #(#name #owner #uuid)? Seems a bit superfluous too.

Thanks,
Peter