[squeak-dev] The Trunk: Tools-mt.955.mcz

commits at source.squeak.org commits at source.squeak.org
Thu Mar 5 14:19:53 UTC 2020


Marcel Taeumel uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-mt.955.mcz

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

Name: Tools-mt.955
Author: mt
Time: 5 March 2020, 3:19:50.650454 pm
UUID: c6edc6b3-361b-1c40-ba50-686fe7cb3e3d
Ancestors: Tools-mt.954

Complete the "#classHierarchy -> #browseClassHierarchy" rename-method refactoring, which was started in 2018 for the ObjectExplorer.

=============== Diff against Tools-mt.954 ===============

Item was added:
+ ----- Method: Browser>>browseClassHierarchy (in category 'multi-window support') -----
+ browseClassHierarchy
+ 	"Overridden to consider multi-window state and hierarchy browser."
+ 
+ 	| behavior newBrowser |
+ 	(behavior := self selectedClassOrMetaClass) isNil ifTrue:
+ 		[^self].
+ 
+ 	(self isPackage "PackageBrowser panes can't support a hierarchy browser; not sure why."
+ 	 or: [self multiWindowState isNil]) ifTrue:
+ 		[^super browseClassHierarchy].
+ 
+ 	(newBrowser := HierarchyBrowser new initHierarchyForClass: behavior)
+ 		selectMessageCategoryNamed: self selectedMessageCategoryName;
+ 		selectMessageNamed: self selectedMessageName;
+ 		editSelection: editSelection.
+ 
+ 	self multiWindowState addWindow: newBrowser!

Item was removed:
- ----- Method: Browser>>classHierarchy (in category 'multi-window support') -----
- classHierarchy
- 	| behavior newBrowser |
- 	(behavior := self selectedClassOrMetaClass) isNil ifTrue:
- 		[^self].
- 
- 	(self isPackage "PackageBrowser pains can't support a hierarchy browser; not sure why."
- 	 or: [self multiWindowState isNil]) ifTrue:
- 		[^super classHierarchy].
- 
- 	(newBrowser := HierarchyBrowser new initHierarchyForClass: behavior)
- 		selectMessageCategoryNamed: self selectedMessageCategoryName;
- 		selectMessageNamed: self selectedMessageName;
- 		editSelection: editSelection.
- 
- 	self multiWindowState addWindow: newBrowser
- !

Item was changed:
  ----- Method: Browser>>mainMessageListMenu: (in category 'message functions') -----
  mainMessageListMenu: aMenu
  	<messageListMenuShifted: false>
  	^ aMenu addList: #(
  			('what to show...'			offerWhatToShowMenu)
  			('toggle break on entry'		toggleBreakOnEntry)
  			-
  			('browse full (b)' 			browseMethodFull)
+ 			('browse hierarchy (h)'		browseClassHierarchy)
- 			('browse hierarchy (h)'			classHierarchy)
  			('browse protocol (p)'			browseFullProtocol)
  			-
  			('fileOut'					fileOutMessage)
  			('printOut'					printOutMessage)
  			('copy selector (c)'			copySelector)
  			('copy reference (C)'		copyReference)
  			-
  			('senders of... (n)'			browseSendersOfMessages)
  			('implementors of... (m)'		browseMessages)
  			('inheritance (i)'			methodHierarchy)
  			('versions (v)'				browseVersions)
  			-
  			('references... (r)'			browseVariableReferences)
  			('assignments... (a)'			browseVariableAssignments)
  			('class refs (N)'			browseClassRefs)
  			-
  			('remove method (x)'			removeMessage)
  			('explore method'			exploreMethod)
  			('inspect method'			inspectMethod));
  		yourself
  !

Item was changed:
  ----- Method: CodeHolder>>messageListKey:from: (in category 'message list menu') -----
  messageListKey: aChar from: view
  	"Respond to a Command key.  I am a model with a code pane, and I also
  	have a listView that has a list of methods.  The view knows how to get
  	the list and selection."
  	| sel class |
  	aChar == $D ifTrue: [^ self toggleDiffing].
  	sel := self selectedMessageName.
  	aChar == $m ifTrue:  "These next two put up a type in if no message selected"
  		[^ self useSelector: sel orGetSelectorAndSendQuery: #browseAllImplementorsOf: to: self ].
  	aChar == $n ifTrue: 
  		[^ self useSelector: sel orGetSelectorAndSendQuery: #browseAllCallsOn: to: self ].
  	aChar == $d ifTrue: [^ self removeMessageFromBrowser].
  	"The following require a class selection"
  	(class := self selectedClassOrMetaClass) ifNil: [^ self arrowKey: aChar from: view].
  	aChar == $b ifTrue: [^ ToolSet browse: class selector: sel].
  	aChar == $N ifTrue: [^ self browseClassRefs].
  	aChar == $i ifTrue: [^ self methodHierarchy].
+ 	aChar == $h ifTrue: [^ self browseClassHierarchy].
- 	aChar == $h ifTrue: [^ self classHierarchy].
  	aChar == $p ifTrue: [^ self browseFullProtocol].
  	aChar == $r ifTrue: [^ self browseVariableReferences].
  	aChar == $a ifTrue: [^ self browseVariableAssignments].
  	(aChar == $Y and: [self canShowMultipleMessageCategories])
  		ifTrue: [^ self showHomeCategory].
  	"The following require a method selection"
  	sel ifNotNil: 
  		[aChar == $o ifTrue: [^ self fileOutMessage].
  		aChar == $c ifTrue: [^ self copySelector].
  		aChar == $v ifTrue: [^ self browseVersions].
  		aChar == $x ifTrue: [^ self removeMessage].
  		aChar == $C ifTrue: [ self copyReference ]].
  	^ self arrowKey: aChar from: view!

Item was changed:
  ----- Method: CodeHolder>>optionalButtonPairs (in category 'controls') -----
  optionalButtonPairs
  	"Answer a tuple (formerly pairs) defining buttons, in the format:
  			button label
  			selector to send
  			help message"
  
  	| aList |
  
  	aList := #(
  	('browse'			browseMethodFull			'view this method in a browser')
  	('senders' 			browseSendersOfMessages	'browse senders of...')
  	('implementors'		browseMessages				'browse implementors of...')
  	('versions'			browseVersions				'browse versions')), 
  
  	(Preferences decorateBrowserButtons
  		ifTrue:
  			[{#('inheritance'		methodHierarchy 'browse method inheritance
  green: sends to super
  tan: has override(s)
  mauve: both of the above
  pink: is an override but doesn''t call super
  pinkish tan: has override(s), also is an override but doesn''t call super' )}]
  		ifFalse:
  			[{#('inheritance'		methodHierarchy			'browse method inheritance')}]),
  
  	#(
+ 	('hierarchy'		browseClassHierarchy				'browse class hierarchy')
- 	('hierarchy'		classHierarchy				'browse class hierarchy')
  	('vars'			browseVariableReferences			'references...')).
  
  	^ aList!

Item was added:
+ ----- Method: Debugger>>browseClassHierarchy (in category 'toolbuilder') -----
+ browseClassHierarchy
+ 	"Create and schedule a class list browser on the receiver's hierarchy."
+ 	
+ 	(self selectedMessageName = #doesNotUnderstand: and: [ self selectedClassOrMetaClass = Object ])
+ 		ifTrue:
+ 			[ self systemNavigation
+ 				spawnHierarchyForClass: self receiverClass
+ 				selector: self selectedMessageName ]
+ 		ifFalse: [ super browseClassHierarchy ]!

Item was removed:
- ----- Method: Debugger>>classHierarchy (in category 'toolbuilder') -----
- classHierarchy
- 	"Create and schedule a class list browser on the receiver's hierarchy."
- 	(self selectedMessageName = #doesNotUnderstand: and: [ self selectedClassOrMetaClass = Object ])
- 		ifTrue:
- 			[ self systemNavigation
- 				spawnHierarchyForClass: self receiverClass
- 				selector: self selectedMessageName ]
- 		ifFalse: [ super classHierarchy ]!

Item was changed:
  ----- Method: Debugger>>shiftedContextStackMenu: (in category 'context stack menu') -----
  shiftedContextStackMenu: aMenu
  	"Set up the menu appropriately for the context-stack-list, shifted"
  	<contextStackMenuShifted: true>
  	^ aMenu addList: #(
+ 			('browse class hierarchy'				browseClassHierarchy)
- 			('browse class hierarchy'				classHierarchy)
  			('browse class'							browseClass)
  			('implementors of sent messages'		browseAllMessages)
  			('change sets with this method'			findMethodInChangeSets)
  			-	
  			('inspect instances'						inspectInstances)
  			('inspect subinstances'					inspectSubInstances)
  			-	
  			('revert to previous version'			revertToPreviousVersion)
  			('remove from current change set'		removeFromCurrentChanges)
  			('revert & remove from changes'		revertAndForget));
  		yourself
  !

Item was changed:
  ----- Method: Inspector>>inspectorKey:from: (in category 'menu commands') -----
  inspectorKey: aChar from: view
  	"Respond to a Command key issued while the cursor is over my field list"
  
  	aChar == $i ifTrue: [^ self selection inspect].
  	aChar == $I ifTrue: [^ self selection explore].
  	aChar == $b ifTrue:	[^ self browseClass].
+ 	aChar == $h ifTrue:	[^ self browseClassHierarchy].
- 	aChar == $h ifTrue:	[^ self classHierarchy].
  	aChar == $c ifTrue: [^ self copyName].
  	aChar == $p ifTrue: [^ self browseFullProtocol].
  	aChar == $N ifTrue: [^ self browseClassRefs].
  	aChar == $t ifTrue: [^ self tearOffTile].
  	aChar == $v ifTrue: [^ self viewerForValue].
  
  	^ self arrowKey: aChar from: view!

Item was changed:
  ----- Method: Inspector>>mainFieldListMenu: (in category 'menu commands') -----
  mainFieldListMenu: aMenu
  	"Arm the supplied menu with items for the field-list of the receiver"
  	<fieldListMenu>
  	"gets overriden by subclasses, _whithout_ the <fieldListMenu>"
  	aMenu addStayUpItemSpecial.
  
  	aMenu addList: #(
  		('inspect (i)'						inspectSelection)
  		('explore (I)'						exploreSelection)).
  
  	self addCollectionItemsTo: aMenu.
  
  	aMenu addList: #(
  		-
  		('method refs to this inst var'		referencesToSelection)
  		('methods storing into this inst var'	defsOfSelection)
  		('objects pointing to this value'		objectReferencesToSelection)
  		('chase pointers'					chasePointers)
  		('explore pointers'				explorePointers)
  		-
  		('browse full (b)'					browseClass)
+ 		('browse hierarchy (h)'				browseClassHierarchy)
- 		('browse hierarchy (h)'				classHierarchy)
  		('browse protocol (p)'				browseFullProtocol)
  		-
  		('references... (r)'					browseVariableReferences)
  		('assignments... (a)'				browseVariableAssignments)
  		('class refs (N)'						browseClassRefs)
  		-
  		('copy name (c)'					copyName)		
  		('basic inspect'						inspectBasic)).
  
  	Smalltalk isMorphic ifTrue:
  		[aMenu addList: #(
  			-
  			('tile for this value	(t)'			tearOffTile)
  			('viewer for this value (v)'		viewerForValue))].
  
  	^ aMenu
  
  
  "			-
  			('alias for this value'			aliasForValue)
  			('watcher for this slot'			watcherForSlot)"
  
  !

Item was changed:
  ----- Method: MessageSet>>mainMessageListMenu: (in category 'message list') -----
  mainMessageListMenu: aMenu
  	"Answer the message-list menu"
  	<messageListMenuShifted: false>
  	aMenu addList: #(
  			('what to show...'			offerWhatToShowMenu)
  			('toggle break on entry'		toggleBreakOnEntry)
  			-
  			('browse full (b)' 			browseMethodFull)
+ 			('browse hierarchy (h)'			browseClassHierarchy)
- 			('browse hierarchy (h)'			classHierarchy)
  			('browse protocol (p)'			browseFullProtocol)
  			-
  			('fileOut'				fileOutMessage)
  			('printOut'				printOutMessage)
  			('copy selector (c)'		copySelector)
  			('copy reference (C)'	copyReference)
  			-
  			('senders of... (n)'			browseSendersOfMessages)
  			('implementors of... (m)'		browseMessages)
  			('inheritance (i)'			methodHierarchy)
  			('versions (v)'				browseVersions)
  			-
  			('references... (r)'			browseVariableReferences)
  			('assignments... (a)'			browseVariableAssignments)
  			('class refs (N)'			browseClassRefs)
  			-
  			('remove method (x)'			removeMessage)
  			('explore method'			exploreMethod)
  			('inspect method'			inspectMethod)).
  	^ aMenu!

Item was changed:
  ----- Method: ObjectExplorer>>browseClassHierarchy (in category 'menus - actions') -----
  browseClassHierarchy
  	"Create and schedule a class list browser on the receiver's hierarchy."
  
  	self systemNavigation
  		spawnHierarchyForClass: self selectedClass
+ 		selector: nil.!
- 		selector: nil
- !

Item was added:
+ ----- Method: StringHolder>>browseClassHierarchy (in category '*Tools') -----
+ browseClassHierarchy
+ 	"Create and schedule a class list browser on the receiver's hierarchy."
+ 
+ 	self systemNavigation
+ 		spawnHierarchyForClass: self selectedClassOrMetaClass "OK if nil"
+ 		selector: self selectedMessageName!

Item was removed:
- ----- Method: StringHolder>>classHierarchy (in category '*Tools') -----
- classHierarchy
- 	"Create and schedule a class list browser on the receiver's hierarchy."
- 
- 	self systemNavigation
- 		spawnHierarchyForClass: self selectedClassOrMetaClass "OK if nil"
- 		selector: self selectedMessageName
- !

Item was changed:
  ----- Method: StringHolder>>messageListKey:from: (in category '*Tools') -----
  messageListKey: aChar from: view
  	"Respond to a Command key.  I am a model with a code pane, and I also
  	have a listView that has a list of methods.  The view knows how to get
  	the list and selection."
  
  	| sel class |
  	aChar == $D ifTrue: [^ self toggleDiffing].
  
  	sel := self selectedMessageName.
  	aChar == $m ifTrue:  "These next two put up a type in if no message selected"
  		[^ self useSelector: sel orGetSelectorAndSendQuery: #browseAllImplementorsOf: to: self systemNavigation].
  	aChar == $n ifTrue: 
  		[^ self useSelector: sel orGetSelectorAndSendQuery: #browseAllCallsOn: to: self systemNavigation].
  
  	"The following require a class selection"
  	(class := self selectedClassOrMetaClass) ifNil: [^ self arrowKey: aChar from: view].
  	aChar == $b ifTrue: [^ ToolSet browse: class selector: sel].
  	aChar == $N ifTrue: [^ self browseClassRefs].
  	aChar == $i ifTrue: [^ self methodHierarchy].
+ 	aChar == $h ifTrue: [^ self browseClassHierarchy].
- 	aChar == $h ifTrue: [^ self classHierarchy].
  	aChar == $p ifTrue: [^ self browseFullProtocol].
  
  	"The following require a method selection"
  	sel ifNotNil: 
  		[aChar == $o ifTrue: [^ self fileOutMessage].
  		aChar == $c ifTrue: [^ self copySelector].
  		aChar == $C ifTrue: [^ self copyReference].
  		aChar == $v ifTrue: [^ self browseVersions].
  		aChar == $x ifTrue: [^ self removeMessage]].
  
  	^ self arrowKey: aChar from: view!



More information about the Squeak-dev mailing list