Protected category

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

Protected category

Keith Alcock-3
Does anyone have an implementation of a protected category that works in
the way that the public and private categories work: mutually exclusive
and having an special icon, maybe even a yellow circle (with black
outline)?  It would be nice to be able to show methods that can be
called from subclasses, but should not be from unrelated classes, for
example when template methods are used.  TIA.


Reply | Threaded
Open this post in threaded view
|

Re: Protected category

Chris Uppal-3
Keith Alcock wrote:

> Does anyone have an implementation of a protected category that works in
> the way that the public and private categories work: mutually exclusive
> and having an special icon, maybe even a yellow circle (with black
> outline)?

Personalised virtual method categories are cool and fun -- I have several --
but from a quick look extending the private/public duality would require you to
replace the existing private and public categories altogether (they "know" that
(private == public not), and probably replace the implementations of
CompiledMethod>>isPublic, etc, too.

Then the method icon is most easily changed by replacing CompiledMethod>>icon.
There don't seem to be any hooks for associating a method's icon in the CHB
with the categories except what's hardwired in that method.

Not a lot of help, I'm afraid, but no one had replied at all... ;-)

    -- chris