The Trunk: Tools-eem.657.mcz

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

The Trunk: Tools-eem.657.mcz

commits-2
Eliot Miranda uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-eem.657.mcz

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

Name: Tools-eem.657
Author: eem
Time: 2 December 2015, 3:38:00.319 pm
UUID: 8ffda57b-575c-4398-8067-5e310d2fde82
Ancestors: Tools-kfr.656

Provide local senders... in the system browser which will browse methods that reference a selector or a literal within the selected class's hierarchy.

Modify selection in MessageNames so that if one selects a different selector and an implementation exists in the same class as the current method, select that method.

Provide a canonical message name for CompiledMethod for creating methods from exceptions in the debugger.

=============== Diff against Tools-kfr.656 ===============

Item was changed:
  ----- Method: Browser>>shiftedClassListMenu: (in category 'class functions') -----
  shiftedClassListMenu: aMenu
  <classListMenuShifted: true>
  "Set up the menu to apply to the receiver's class list when the shift key is down"
+ ^ aMenu
+ addList: #(
-
- ^ aMenu addList: #(
  -
+ ('local senders...' browseLocalSenders 'browse senders local to this class')
  ('unsent methods' browseUnusedMethods 'browse all methods defined by this class that have no senders')
  ('unreferenced inst vars' showUnreferencedInstVars 'show a list of all instance variables that are not referenced in methods')
  ('unreferenced class vars' showUnreferencedClassVars 'show a list of all class variables that are not referenced in methods')
  ('subclass template' makeNewSubclass 'put a template into the code pane for defining of a subclass of this class')
  -
  ('sample instance' makeSampleInstance 'give me a sample instance of this class, if possible')
  ('inspect instances' inspectInstances 'open an inspector on all the extant instances of this class')
  ('inspect subinstances' inspectSubInstances 'open an inspector on all the extant instances of this class and of all of its subclasses')
  -
  ('add all meths to current chgs' addAllMethodsToCurrentChangeSet
  'place all the methods defined by this class into the current change set')
  ('create inst var accessors' createInstVarAccessors 'compile instance-variable access methods for any instance variables that do not yet have them'));
+ yourself!
- yourself!

Item was added:
+ ----- Method: CompiledMethod>>canonicalArgumentName (in category '*Tools-Debugger') -----
+ canonicalArgumentName
+ ^ 'CompiledMethod'!

Item was changed:
  ----- Method: MessageNames>>selectorListIndex: (in category 'selector list') -----
  selectorListIndex: anInteger
  "Set the selectorListIndex as specified, and propagate consequences"
+ | methodClass index |
+ methodClass := currentCompiledMethod ifNotNil: [currentCompiledMethod methodClass].
-
  selectorListIndex := anInteger.
  self changed: #selectorListIndex.
 
  messageList := self computeMessageList.
  self changed: #messageList.
+ methodClass ifNotNil: [index := messageList findFirst: [:methodRef| methodRef actualClass = methodClass]].
+
+ "If a method of the same class exists, select that, otherwise select the first message if any."
+ self messageListIndex: (index ifNil: [1 min: messageList size])!
-
- "Select the first message if any."
- self messageListIndex: (1 min: messageList size).!

Item was added:
+ ----- Method: StringHolder>>browseLocalSenders (in category '*Tools') -----
+ browseLocalSenders
+ self selectedClass ifNotNil:
+ [:cls| | token |
+ token := UIManager default request: 'browse for selector or literal'.
+ token isEmpty ifTrue: [^self].
+ Scanner new
+ typedScan: token
+ do: [:scannedToken :tokenType|
+ token := tokenType = #word
+ ifTrue:
+ [(Symbol findInterned: token)
+ ifNil: [^UIManager default  inform: 'no such selector: ', token]
+ ifNotNil: [:symbol| symbol]]
+ ifFalse:
+ [scannedToken].
+ self systemNavigation browseAllCallsOn: token localTo: cls]]!