RBConfigurableFormatter bug/question

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

RBConfigurableFormatter bug/question

Pieter Emmelot-2
1) When I set formatterClass=RBConfigurableFormatter in the User Preferences
and do a ctrl-w to format a method I get a walkback.
It seems like RBConfigurableFormatter needs to be initialized first.
(RBConfigurableFormatter initialize).

2) There are some formatter bugs with respect to comments in blocks, for
example:

test
   [self statement "comment"]

results in:

test
   [self statement "comment"] "comment"

And

test
   ["comment"
   self statement]

results in:

test
   "comment"

   [self statement]

3) How do I tell the formatter *not* to insert a blank line after a comment
or move "comment" to the same line as statement in the example below?


test

   "Method comment"

   self statement.

   "comment"

   self statement1


 - Pieter

P.S. Dolphin 5 PL3


Reply | Threaded
Open this post in threaded view
|

Re: RBConfigurableFormatter bug/question

Pieter Emmelot-2
For people (like me) who don't read all messages:
The fix is posted by John Brant in the 'Evaluating Dolphin' thread.

File in:

!StBlockNode methodsFor!

statementComments
 ^self comments! !


!StCascadeNode methodsFor!

statementComments
 | statementComments |
 statementComments := OrderedCollection withAll: self comments.
 statementComments addAll: messages first receiver statementComments.
 messages do:
   [:each |
   each arguments
    do: [:arg | statementComments addAll: arg statementComments]].
 ^statementComments asSortedCollection: [:a :b | a first < b first]! !