1. To tell whether a class is abstract:

isAbstract := [ :aClass |
(aClass whichSelectorsReferTo: #subclassResponsibility) isNotEmpty or: [
(aClass respondsTo: #isAbstract) and: [ aClass isAbstract ] ]
]

Just be aware that some classes are "abstract", but you can actually
instantiate them, because in #new they return something else.

isAbstract value: String "true"


2. To change an icon for a single class (and it's children), add a method
to class-side named "systemIcon"

3. To conditionally change an icon for all classes

3.a.) override Object>>systemIcon and make a test based on the isAbstract
in 1)
3.b.) or do the same, but in AbstractNautilusUI>>#classIconFor: , this is
where test icons are added for example

Peter

On Mon, Apr 4, 2016 at 11:49 AM, Hilaire <hila...@drgeo.eu> wrote:

> Hi,
>
> Can Nautilius indicate when a class is abstract (i.e.  at least one
> method in the class, then its hierarchy is definted respond
> subclassResponsability?)
>
> I did not find it in the Analyze menu.
>
>
> Thanks
>
> Hilaire
>
> --
> Dr. Geo
> http://drgeo.eu
>
>
>

Reply via email to