The Inbox: Tools-eem.259.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-eem.259.mcz

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

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

Name: Tools-eem.259
Author: eem
Time: 14 August 2010, 6:46:40.165 pm
UUID: 64e20ed2-ac79-4656-8601-b39a4c182f90
Ancestors: Tools-eem.258

Eliminate find method wildcard... unneeded given the new form of
find method, and so it gets in the way.
Adding to inbox because this could be controversial.

=============== Diff against Tools-eem.258 ===============

Item was changed:
  ----- Method: Browser>>classListMenu:shifted: (in category 'class functions') -----
  classListMenu: aMenu shifted: shifted
  "Set up the menu to apply to the receiver's class list, honoring the #shifted boolean"
  (self menuHook: aMenu named: #classListMenu shifted: shifted) ifTrue:[^aMenu].
  shifted ifTrue:[^ self shiftedClassListMenu: aMenu].
  aMenu addList: #(
  -
  ('browse full (b)' browseMethodFull)
  ('browse hierarchy (h)' spawnHierarchy)
  ('browse protocol (p)' browseFullProtocol)
  -
  ('printOut' printOutClass)
  ('fileOut' fileOutClass)
  -
  ('show hierarchy' hierarchy)
  ('show definition' editClass)
  ('show comment' editComment)
  -
  ('inst var refs...' browseInstVarRefs)
  ('inst var defs...' browseInstVarDefs)
  -
  ('class var refs...' browseClassVarRefs)
  ('class vars' browseClassVariables)
  ('class refs (N)' browseClassRefs)
  -
  ('rename class ...' renameClass)
  ('copy class' copyClass)
  ('remove class (x)' removeClass)
  -
  ('find method...' findMethod)
- ('find method wildcard...' findMethodWithWildcard)
  -
  ('more...' offerShiftedClassListMenu)).
  ^ aMenu
  !

Item was removed:
- ----- Method: Browser>>findMethodWithWildcard (in category 'class functions') -----
- findMethodWithWildcard
- "Pop up a list of the current class's methods, and select the one chosen by the user"
-
- | aClass selectors reply cat messageCatIndex messageIndex |
- self classListIndex = 0 ifTrue: [^ self].
- self okToChange ifFalse: [^ self].
- aClass := self selectedClassOrMetaClass.
- selectors := aClass selectors asSortedArray.
- selectors isEmpty ifTrue: [self inform: aClass name, ' has no methods.'. ^ self].
-
- reply := UIManager default request: 'Enter partial method name:'.
- (reply isNil or: [reply isEmpty])
- ifTrue: [^self].
- (reply includes: $*)
- ifFalse: [reply := '*', reply, '*'].
- selectors := selectors select: [:each | reply match: each].
- selectors isEmpty ifTrue: [self inform: aClass name, ' has no matching methods.'. ^ self].
- reply := selectors size = 1
- ifTrue: [selectors first]
- ifFalse: [
- UIManager default
- chooseFrom: selectors
- values: selectors].
- reply == nil ifTrue: [^ self].
-
- cat := aClass whichCategoryIncludesSelector: reply.
- messageCatIndex := self messageCategoryList indexOf: cat.
- self messageCategoryListIndex: messageCatIndex.
- messageIndex := (self messageList indexOf: reply).
- self messageListIndex: messageIndex!