Commenting class category
amtween at hotmail.com
Mon Feb 11 09:28:43 UTC 2008
"Keith Hodges" <keith_hodges at yahoo.co.uk> wrote in message
news:47AEFD91.6090706 at yahoo.co.uk...
> Your suggestion of Documentation classes comes but one month after I
> suggested the very same. Since each class in squeak may nominate its
> #compilerClass and #parserClass it is possible to override these in such
> a way as to ignore the method text.
> I liked the idea but had several questions as to how to make the idea
> work well. I had no replies to these questions, but there was some
> debate as to the concept. (If you look in older versions of Sake, in
> http://www.squeaksource.com/Sake you will find an implementation lurking
> in there some where as SakeDocumentation)
> Question 1. As far as my experiments show overriding #compilerClass to
> point to a null compiler works. However it only works for instance side
> methods. I wanted to know where one can select the #compilerClass for
> class side methods.
> Question 2. With this scheme no one tells "Shout", so it continues to
> try and auto format the text thinking it is a normal method. Is there a
> way to make shout aware on a per-class basis what language it is
To prevent Shout from styling these non-normal methods...
Look for all the implementors of #shoutAboutToStyle:
Make them answer false if the compilerClass of the class being browsed is
e.g. in Browser>>#shoutAboutToStyle: add the following line...
self selectedClassOrMetaClass compilerClass ifNull: [^false].
> My personal conclusion was to experiment with the idea to see how useful
> it was within a particular domain... my experiment simply causes the
> compiler/parser to ignore code after a line consisting of """""".
> My second idea is to use the symbol ˚ in methods that are documentation,
> such that #task˚ documents #task.
> again this is all experimental.
> You can get the code to experiment yourself by loading Kernel-Ext from
> package 311 on squeaksource.
> best regards
More information about the Squeak-dev