One more:

        | nav oldSelectors senders |

    nav := SystemNavigation new.
    oldSelectors := OrderedCollection new.
    ( GSLLibrary allMethodsInCategory:'public-old' ) do:[ :each |
        oldSelectors add:each.
    ].

    senders := OrderedCollection new.
    oldSelectors do:[ :each |
        senders addAll:( nav allSendersOf:each ).
    ] displayingProgress:'Old selectors'.
    senders := senders copyWithoutDuplicates.

    nav
        browseMessageList:senders
        name: 'Methods sending old GSL methods'
        autoSelect:'gsl'.

Because of the loop over 1400 or so methods, it takes several minutes to run.  
It found 18 violators that I was easily able to fix in the resulting method 
list.  Hopefully the GSL wrapper is now purged of the old methods and structs.

Bill


________________________________
From: pharo-project-boun...@lists.gforge.inria.fr 
[pharo-project-boun...@lists.gforge.inria.fr] on behalf of Schwab,Wilhelm K 
[bsch...@anest.ufl.edu]
Sent: Thursday, March 22, 2012 1:53 PM
To: pharo-project@lists.gforge.inria.fr
Subject: [Pharo-project] Custom method browser "trick"

Hello all,

I'm working on my re-underscoring of GSL.  It's been a lot of work, but I 
really believe it will pay off in the future in terms of being able more easily 
find methods of interest because with underscores, they look like the things 
one might find in the manual.   It was *really* important with PLplot which has 
names that are surprisingly cryptic to start.

Back to GSL, I wanted a list of methods that contain the "old" structure prefix 
(SGsl - not sure why I chose that...), are not in a category of old items, and 
are not simply in the old stucts (#fields, accessors).  The following seems to 
do the job:

        | nav suspects |

    nav := SystemNavigation new.
    suspects := nav
                            allMethodsWithSourceString:'SGsl'
                            matchCase:true.
    suspects := suspects reject:[ :each |
        each category = 'public-old'
            or:[ each classSymbol beginsWith:'SGsl' ] ].

    nav
        browseMessageList:suspects
        name: 'Methods referencing old GSL structs'
        autoSelect:'SGsl'.

It might be a useful trick for some of you??  HTH.

Bill



Reply via email to