Hi Ben, its a cool idea. To use this physiological "stress factor" to force developers to stop coding really long method. I looked at the class, i only disliked the statement self warningLimit negative ifTrue:[ ^ self basicColor]. you could do : warningLimit: aNumber warningLimit := aNumber max: 0. Fernando On Wed, May 4, 2011 at 11:18 AM, Benjamin <benjamin.vanryseghem.pharo@gmail.com> wrote:
Hello Smalltalkers,
I'm currently working on new code editing tools, and I've implemented a new subclass of PluggableTextMorph named PluggableTextMorphWithLimits , with a code oriented feature:
You have a warningLimit ( 350 by default ) and an alertLimit ( 2* warningLimit by default ), and the number of characters of the text displayed is counted ( without space, tabs, cr etc).
If you are below the warning limit, the background is white ( or the default color ), if you are between warningLimit and alertLimit, the background turn more and more yellow, and if you are above the alertLimit, the background turn orange :)
After using it for ten minutes, you start shivering when the background turn yellow ;)
    Gofer new         squeaksource: 'Nautilus';         package: 'PluggableTextMorphWithLimits';         load.
You can test it by evaluating:
PluggableTextMorphWithLimits example.
I think it will be used by Nautilus, but maybe more code editing tools should used it.
Thanks in advance for your feedback :)
Ben