The Inbox: Tools-jr.931.mcz

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

The Inbox: Tools-jr.931.mcz

commits-2
A new version of Tools was added to project The Inbox:
http://source.squeak.org/inbox/Tools-jr.931.mcz

==================== Summary ====================

Name: Tools-jr.931
Author: jr
Time: 8 February 2020, 4:04:49.220789 pm
UUID: 0aeedbc2-1c66-254f-aea4-c4ed08d7b753
Ancestors: Tools-jr.930

Also look up icons for selectors in superclasses.

This brings back icons for inherited methods in Lexicon if you loaded Protocols-jr.69.

=============== Diff against Tools-jr.930 ===============

Item was changed:
  ----- Method: Behavior>>toolIconSelector: (in category '*Tools-icons') -----
  toolIconSelector: aSymbol
  "Tools can annotate the method identified by aSymbol with an icon identified by the symbol this method returns.
  We customize this for, eg, overriden methods or methods with breaks.
  Defaults to no icon"
 
  self methodDictionary at: aSymbol ifPresent: [ :method |
  method hasBreakpoint ifTrue: [^ #breakpoint].
  method messagesDo: [:messageSelector |
  (#(halt halt: haltIfNil haltIf: haltOnce haltOnce: haltOnCount: halt:onCount: break) includes: messageSelector)
  ifTrue: [^ #breakpoint].
  (#(flag: needsWork notYetImplemented) includes: messageSelector)
  ifTrue: [^ #flag].
  (#(shouldBeImplemented subclassResponsibility) includes: messageSelector)
  ifTrue: [
  (self isSelectorOverridden: aSymbol)
  ifTrue: [^ #abstract]
  ifFalse: [^ #notOverridden]].
  messageSelector == #shouldNotImplement
  ifTrue: [^ #no]].
  method hasReportableSlip ifTrue: [^ #breakpoint]].
 
  (self isSelectorOverride: aSymbol)
  ifTrue: [
  (self isSelectorOverridden: aSymbol)
  ifTrue: [ ^ #arrowUpAndDown ]
  ifFalse: [ ^ #arrowUp ] ]
  ifFalse: [
  (self isSelectorOverridden: aSymbol)
  ifTrue: [^ #arrowDown ]].
 
  self methodDictionary at: aSymbol ifPresent: [ :method |
  (method primitive ~= 0 and: [method isQuick not])
  ifTrue: [^ #primitive]].
 
+ (self includesSelector: aSymbol) ifFalse:
+ [(self lookupSelector: aSymbol) ifNotNil: [ :method |
+ ^ method methodClass toolIconSelector: method selector]].
 
  ^ #blank!