Two items.
I had a couple of change sets from 2.1, when 2.2 came out I filed them out. Then I filed them back in. But now the methods appear to have no line feeds in them. This is on a Mac, what gives?
Which brings me to item two. Am I the only one that uses the format menu option? As valuable as it is (to me), I'm surprised that it is under the more menu, and there's no apparent short cut key for this either. Everytime I want to format and accept, I have to do a number of more accurate than I would like clicks to get the code to look nice. Of course, given the above, it doesn't currently matter. :(
Travis Griggs
Which brings me to item two. Am I the only one that uses the format menu option? As valuable as it is (to me), I'm surprised that it is under the more menu, and there's no apparent short cut key for this either. Everytime I want to format and accept, I have to do a number of more accurate than I would like clicks to get the code to look nice. Of course, given the above, it doesn't currently matter. :(
Travis -
You are definitely not the only person interested in the 'format' command for prettyPrinting Squeak source code. There are two reasons that I did not bother to make 'format' more accessible in Version 2.2.
1. I installed it as a command-key (cmd-shift-p or ctrl-p for prettyPrint), so it is already much more accessible than before.
2. I put in a preference that causes Squeak always to prettyPrint any code that you are viewing. Use help.../preferences... to set it, if you are interested.
You will be glad to know that Version 2.2 is our first release (certainly in a while) that can successfully prettyPrint every method in the system. This was important for PDA support, where decompilation (and prettyPrinting by default) is the only access to system sources.
I must apologize that I only had time to put in the above two conveniences and fix all the bugs in the prettyPrinter. It had been my goal also to spend some time tweaking the algorithms to the point where most people would actually prefer prettyPrinting. There are still some problems with comment placement, and I feel a better job can be done with the heuristics that govern the format of keyword messages.
Here are two further thoughts about prettyPrinting...
1. In the process of tuning the formatting parameters, it would not be that hard to make a simple UI so that anyone could tune the prettyPrinter to their favorite conventions.
2. If we made the prettyPrinter good enough that everyone preferred it, or liked it equally, then we could greatly compress the system sources by only saving temp names and comments.
If anyone wants to take on prettyPrinting as a project, send me a message offline, and I'll coordinate so we work together and don't duplicate effort.
- Dan
Dan Ingalls wrote:
<snip>
Here are two further thoughts about prettyPrinting...
In the process of tuning the formatting parameters, it would not be that hard to make a simple UI so that anyone could tune the prettyPrinter to their favorite conventions.
If we made the prettyPrinter good enough that everyone preferred it, or liked it equally, then we could greatly compress the system sources by only saving temp names and comments.
If anyone wants to take on prettyPrinting as a project, send me a message offline, and I'll coordinate so we work together and don't duplicate effort.
Thanks Dan. I would personally like to see the formatter used by the RefactoringBrowser employed in Squeak. I would offer to port it, but I think others are already, I've done it once before (for ST/X), and I'm busy trying to get this Double Dispatching/Numeric Collections stuff done. The RB formatter was very educational for me because it had a pretty strict embodiment of some of the patterns found in the Gang-o-Four book. I also like that approach, because it sets a standard for ST code formatting between VW, Squeak, VSE, and others (I think a Dolphin port is under way).
-- Travis Griggs Key Technology tgriggs@keyww.com Member, Fraven Skreiggs Software Collective Status Quo Is Your Enemy
squeak-dev@lists.squeakfoundation.org