Explainer.st
changeset 4110 e3ae7a6cc004
parent 4100 2cb9290bd5dc
child 4143 821161064375
equal deleted inserted replaced
4109:7f7db5791c19 4110:e3ae7a6cc004
  2642 
  2642 
  2643     sel := aMethod selector.
  2643     sel := aMethod selector.
  2644     inheritedClass := methodsSuperclass whichClassIncludesSelector:sel.
  2644     inheritedClass := methodsSuperclass whichClassIncludesSelector:sel.
  2645     inheritedClass notNil ifTrue:[
  2645     inheritedClass notNil ifTrue:[
  2646         mthd := inheritedClass compiledMethodAt:sel.
  2646         mthd := inheritedClass compiledMethodAt:sel.
  2647         (mthd sends:#'subclassResponsibility') ifTrue:[
  2647         (mthd sendsSelector:#'subclassResponsibility') ifTrue:[
  2648             msg := '%1 overrides subclassResponsibility in %2'.
  2648             msg := '%1 overrides subclassResponsibility in %2'.
  2649         ] ifFalse:[
  2649         ] ifFalse:[
  2650             msg := '%1 overrides implementation in %2'.
  2650             msg := '%1 overrides implementation in %2'.
  2651         ].
  2651         ].
  2652         selectorString := sel contractTo:30.
  2652         selectorString := sel contractTo:30.
  2660                     info:('Browse %1 » %2' bindWith:inheritedClass name with:sel)
  2660                     info:('Browse %1 » %2' bindWith:inheritedClass name with:sel)
  2661                     to:(self actionToBrowseClass:inheritedClass selector:sel)).
  2661                     to:(self actionToBrowseClass:inheritedClass selector:sel)).
  2662     ].
  2662     ].
  2663 
  2663 
  2664     ^ msg
  2664     ^ msg
       
  2665 
       
  2666     "Modified: / 05-02-2017 / 01:24:25 / cg"
  2665 !
  2667 !
  2666 
  2668 
  2667 methodRedefinitionInfoFor:aMethod
  2669 methodRedefinitionInfoFor:aMethod
  2668     "return a user readable string telling in how many subclasses
  2670     "return a user readable string telling in how many subclasses
  2669      a method is redefined.
  2671      a method is redefined.