[ANN] AutomaticMethodCategorizer 1.0

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[ANN] AutomaticMethodCategorizer 1.0

Diego Fernández
Hi all!
This is just to announce my first package for Squeak :)

Package description:

This package allows you to categorize uncategorized methods based on rules.
For example you can put all uncategorized methods in SomeTest that begins with "test" under the "tests" category using:

(AutomaticMethodCategorizer
          for: SomeTest organization
          using: (PluggableMethodCategorizationRule
                     whenSelectorMatches: 'initialize*'
                     andClassInheritsFrom: TestCase
                     categorizeIn: #'tests')) value

Other rule to use the super class category is included (this is the standard behavior of Browser>>#categorizeAllUncategorizedMethods).

If the AutomaticMethodCategorizer is created with #for: a default list of rules will be used.
See AutomaticMethodCategorizer-ModelTests for more examples.

Also you can modify the System Browser to use the automatic method categorizer, evaluating:

AutomaticMethodCategorizerInstaller new modifySystemBrowsers

WARNING: The installer overwrites Browser>>#categorizeAllUncategorizedMethods

Acknowledgments: The idea of method categorization based on rules was taken from a VAST tool created by Maximiliano Contieri.


Reply | Threaded
Open this post in threaded view
|

Re: [ANN] AutomaticMethodCategorizer 1.0

stéphane ducasse-2
This is quite nice.
I will have a look this would be nice indeed to have a consistent  
system.

Stef


> Hi all!

> This is just to announce my first package for Squeak :)
> Package description:
> This package allows you to categorize uncategorized methods based  
> on rules. For example you can put all uncategorized methods in  
> SomeTest that begins with "test" under the "tests" category using:
> (AutomaticMethodCategorizer
>           for: SomeTest organization           using:  
> (PluggableMethodCategorizationRule                      
> whenSelectorMatches: 'initialize*'                      
> andClassInheritsFrom: TestCase                     categorizeIn:  
> #'tests')) value
> Other rule to use the super class category is included (this is the  
> standard behavior of Browser>>#categorizeAllUncategorizedMethods).
> If the AutomaticMethodCategorizer is created with #for: a default  
> list of rules will be used. See AutomaticMethodCategorizer-
> ModelTests for more examples.
> Also you can modify the System Browser to use the automatic method  
> categorizer, evaluating:
> AutomaticMethodCategorizerInstaller new modifySystemBrowsers
> WARNING: The installer overwrites  
> Browser>>#categorizeAllUncategorizedMethods
> Acknowledgments: The idea of method categorization based on rules  
> was taken from a VAST tool created by Maximiliano Contieri.
>


Reply | Threaded
Open this post in threaded view
|

Re: [ANN] AutomaticMethodCategorizer 1.0

Diego Fernández
Thanks.. :)

On 1/13/06, stéphane ducasse <[hidden email]> wrote:
This is quite nice.
I will have a look this would be nice indeed to have a consistent
system.

Stef


> Hi all!

> This is just to announce my first package for Squeak :)
> Package description:
> This package allows you to categorize uncategorized methods based
> on rules. For example you can put all uncategorized methods in
> SomeTest that begins with "test" under the "tests" category using:
> (AutomaticMethodCategorizer
>           for: SomeTest organization                  using:
> (PluggableMethodCategorizationRule
> whenSelectorMatches: 'initialize*'
> andClassInheritsFrom: TestCase                     categorizeIn:
> #'tests')) value
> Other rule to use the super class category is included (this is the
> standard behavior of Browser>>#categorizeAllUncategorizedMethods).
> If the AutomaticMethodCategorizer is created with #for: a default
> list of rules will be used. See AutomaticMethodCategorizer-
> ModelTests for more examples.
> Also you can modify the System Browser to use the automatic method
> categorizer, evaluating:
> AutomaticMethodCategorizerInstaller new modifySystemBrowsers
> WARNING: The installer overwrites
> Browser>>#categorizeAllUncategorizedMethods
> Acknowledgments: The idea of method categorization based on rules
> was taken from a VAST tool created by Maximiliano Contieri.
>