Mantis - Squeak
Viewing Issue Advanced Details
6734 Tools minor always 10-19-07 01:38 10-22-07 05:49
chris  
 
normal  
new 3.9  
open  
none    
none  
0006734: Rectangular Block code formatting, courtesy of Refactoring Browser.
This change set formats your code per the well-reasoned "Rectangular Block" and "Indented Control Flow" patterns championed by Kent Beck in his book, "Smalltalk Best Practice Patterns".

I also found them referenced from Ward's site:

  http://c2.com/ppr/formatting.html [^]

To work, first make sure the Refactoring Browser is loaded. Then file in the attached change-set. It also fixes problems associated with RbFormat where, in >= 3.9 only, it was deleting comments! I think I have all of these fixed.

Be sure to check "useRBASTForPrettyPrint" in Preferences panel.
 RbFormat-M6734.3.9.cs.gz [^] (6,582 bytes) 10-19-07 01:40
 AST-dc.151.mcz [^] (117,122 bytes) 10-19-07 06:31
 AST-cmm.152.mcz [^] (117,187 bytes) 10-21-07 16:45

Notes
(0011353)
Damien Cassou   
10-19-07 06:31   
I've put the changes to the RefactoringBrowser in its repository ( RefactoringEngine-dc.38).
(0011354)
Damien Cassou   
10-19-07 06:32   
I've attached the changes made to the AST package to the bug report because I can't publish them to the AST repository (don't have write access). Can someone have a look and integrate them please?
(0011355)
Damien Cassou   
10-19-07 06:33   
In my opinion, the changes to ParagraphEditor are not mandatory; I may be wrong, tell me if it's the case.

(0011360)
chris   
10-21-07 16:05   
Yes, the changes to ParagraphEditor are necessary for good usability. They allow reformat to be invoked with Alt+Shift+S and don't needlessly refuse when no method category is selected.
(0011361)
chris   
10-21-07 16:47   
Just added AST-cmm.152.mcz which is merged with AST-ms.151.
(0011363)
Damien Cassou   
10-22-07 05:49   
Reminder sent to: mathk

Can you please verify this?