searching for protocols

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

searching for protocols

Peter Uhnak
Hi,

is it possible to find which class uses particular protocol?

Typically I am not sure how to name a protocol so I would like to check out other classes.
For example the system offers me to name protocol as "enum primitives" but I don't know who uses it and for what exactly.

Thanks,
Peter
Reply | Threaded
Open this post in threaded view
|

Re: searching for protocols

Ben Coman
Also interested in this.  A few times I would have like to have done something like...
    'someProtocol' allMethods
and got a list like
    ClassA>>method1
    ClassB>>method1
    ClassB>>method2
 
but I haven't needed it enough to bother working it out.
 
Actually its the sort of thing that would fit well as a feature added to Finder.
cheers -ben

On Fri, Mar 20, 2015 at 5:16 AM, Peter Uhnák <[hidden email]> wrote:
Hi,

is it possible to find which class uses particular protocol?

Typically I am not sure how to name a protocol so I would like to check out other classes.
For example the system offers me to name protocol as "enum primitives" but I don't know who uses it and for what exactly.

Thanks,
Peter

Reply | Threaded
Open this post in threaded view
|

RE: searching for protocols

BriceG
In reply to this post by Peter Uhnak

Hi

I don't know if there is a graphical way to do it but in the play ground you can try the following piece of code:


protocolName := 'as yet unclassified'.
Smalltalk allClasses select:[:class|
    (class organization protocolOrganizer allProtocols collect:#name) includes:protocolName ].


Regards


--------------
Brice Govin
PhD student in RMoD research team at INRIA Lille
Software Engineer at THALES AIR SYSTEMS Rungis
ENSTA-Bretagne ENSI2014
64 chemin des boeufs 91220 PALAISEAU


De : Peter Uhnák [via Smalltalk] <ml-node+[hidden email]>
Envoyé : jeudi 19 mars 2015 22:06
À : Brice GOVIN
Objet : searching for protocols
 
Hi,

is it possible to find which class uses particular protocol?

Typically I am not sure how to name a protocol so I would like to check out other classes.
For example the system offers me to name protocol as "enum primitives" but I don't know who uses it and for what exactly.

Thanks,
Peter



If you reply to this email, your message will be added to the discussion below:
http://forum.world.st/searching-for-protocols-tp4813356.html
To unsubscribe from Pharo Smalltalk Users, click here.
NAML
Reply | Threaded
Open this post in threaded view
|

RE: searching for protocols

Sean P. DeNigris
Administrator
Forwarding. Apparently never made it to list...
BriceG wrote
Hi

I don't know if there is a graphical way to do it but in the play ground you can try the following piece of code:


protocolName := 'as yet unclassified'.
Smalltalk allClasses select:[:class|
    (class organization protocolOrganizer allProtocols collect:#name) includes:protocolName ].


Regards


--------------
Brice Govin
PhD student in RMoD research team at INRIA Lille
Software Engineer at THALES AIR SYSTEMS Rungis
ENSTA-Bretagne ENSI2014
64 chemin des boeufs 91220 PALAISEAU
Cheers,
Sean