--- Begin Message ---
Thanks Peter, really useful for readability
Davide
--
View this message in context:
http://forum.world.st/Code-formatting-preserving-newlines-and-comments-tp4773967p4815079.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
--- End Message ---
actually it should be:
-
formatStatementCommentsFor: aStatementNode
originalSource isNil
ifTrue: [ ^ self ].
FormatCommentWithStatements
ifFalse: [ ^ self ].
aStatementNode statementComments
do: [ :each |
| count |
count := self newLinesBeforeStartingAt: each first.
(count) > 0
ifTrue:
Ah!
RBConfigurableFormatter class>>settingsOn: is missing one setting
(aBuilder setting: #retainBlankLinesBetweenStatements)
label: 'Retain blank lines between statements'.
As for the comments, I looked at
RBConfigurableFormatter>>formatStatementCommentsFor:
one idea might be to look a
Hi peter
Is it possible to configure formatter to preserve empty lines and line
comments?
I do not know :)
e.g.
--
myMethod
someCode.
< empty line that I would like to preserve >
moreCode.
---
But I think that should be customizable.
the formatter also automatical
Is it possible to configure formatter to preserve empty lines and line
comments?
e.g.
--
myMethod
someCode.
< empty line that I would like to preserve >
moreCode.
---
the formatter also automatically puts comments on the end of the previous
statement.
e.g.
--
someCode.