[ENH]browserNagIfNoClassComment (v5)

Lex Spoon lex at cc.gatech.edu
Thu Oct 30 21:46:17 UTC 2003


> So why not
> 
> Class >>
> 	instanceVariableNames: someVarNames
> 	classVariableNames: someClassNames
> 	poolDictionaries: somePoolDics
> 	category: categoryName
> 	comment:
> aCommentText

What to do about comments that have Text attributes in them, however? 
Is anyone planning to modify the Scanner so that you can enter Text
literals?  :)

I like this approach, because it keeps using real Smalltalk syntax. 
However, it is awkward if you have general text instead of simple
String's.

If anyone is still interested in hacking, about doing it as follows? 
Insert a divider in the pane such as "----- Comment: ------".  Then, the
contents:notifying: method of Browser can divide the input into two
sections: one before the delimiter and one after.  The class definition
is before the delimiter, and the comment is afterwards.  As a bonus, you
don't have to double " or ' marks within the comment.

Best of all might be to have two completely separate panes, but it seems
a bit tougher to write the code.




> 	A preference called browserNagIfNoClassComment
> 	is added and set to true. When a class with no comment is 
> 	selected in the browser a notifier pops up 
> 	telling the class is not commented.
> 	
> I'm not at all sure that that's the right time for the notifier.
> It punishes people who have to look at the class, but these are
> almost always the wrong people.

Yeah, that sounds like good reasoning.  It's also consistent with
existing practice: you get nagged about questionable code when you save
the code, not when you try to look at it.


-Lex



More information about the Squeak-dev mailing list