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

commits at source.squeak.org commits at source.squeak.org
Fri Oct 30 16:43:58 UTC 2020


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

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

Name: Tools-mt.1012
Author: mt
Time: 30 October 2020, 5:43:57.205709 pm
UUID: 4d5b840d-943d-2e4a-ba5d-35d6a4c3aaff
Ancestors: Tools-eem.1011

Speed up updates in inspectors -- and thus debuggers --, which results in a quicker response when clicking "step into/over/through" many times in a row.

Removes last traces of polling updates in debugger, which is not needed because of how #updateInspectors is used there.

Also fixes a bug with "step through", which was not updating both inspectors correctly.

=============== Diff against Tools-eem.1011 ===============

Item was changed:
  ----- Method: BasicInspector>>streamInstanceVariablesOn: (in category 'fields - streaming') -----
  streamInstanceVariablesOn: aStream
  
+ 	| attributesForInstVars |
+ 	attributesForInstVars :=  (UserInterfaceTheme current get: #instVar for: #SHTextStylerST80) ifNil: [#()].
+ 	
  	(thisContext objectClass: self object) allInstVarNames withIndexDo: [:name :index |		
  		aStream nextPut: ((self newFieldForType: #instVar key: name)
+ 			name: name; styleName: attributesForInstVars;
- 			name: name asString;
- 			shouldStyleName: true;
  			valueGetter: [:object | thisContext object: object instVarAt: index];
  			valueGetterExpression: ('thisContext object: {1} instVarAt: {2}' format: { 'self'. index }); 
  			valueSetter: [:object :value | thisContext object: object instVarAt: index put: value];
  			yourself)].!

Item was removed:
- ----- Method: Debugger>>step (in category 'stepping - morphic') -----
- step 
- 	"Update the inspectors."
- 
- 	receiverInspector ifNotNil: [receiverInspector step].
- 	contextVariablesInspector ifNotNil: [contextVariablesInspector step].
- !

Item was changed:
  ----- Method: Debugger>>stepIntoBlock (in category 'context stack menu') -----
  stepIntoBlock
  	"Send messages until you return to the present method context.
  	 Used to step into a block in the method."
  
+ 	| currentContext newContext |
+ 	self okToChange ifFalse: [^ self].
+ 	self checkContextSelection.
+ 	currentContext := self selectedContext.
  	self handleLabelUpdatesIn:
+ 			[interruptedProcess stepToHome: currentContext]
- 			[interruptedProcess stepToHome: self selectedContext]
  		whenExecuting: self selectedContext.
+ 	newContext := interruptedProcess stepToSendOrReturn.
+ 	self contextStackIndex > 1
+ 		ifTrue: [self resetContext: newContext]
+ 		ifFalse:
+ 			[newContext == currentContext
+ 				ifTrue: [self changed: #contentsSelection.
+ 						self updateInspectors]
+ 				ifFalse: [self resetContext: newContext]].!
- 	self resetContext: interruptedProcess stepToSendOrReturn!

Item was removed:
- ----- Method: Debugger>>updateCodePaneIfNeeded (in category 'self-updating') -----
- updateCodePaneIfNeeded
- 	"Ignore. We must not update code but stick to particular compiled methods on the stack."!

Item was changed:
+ ----- Method: Debugger>>updateInspectors (in category 'self-updating') -----
- ----- Method: Debugger>>updateInspectors (in category 'stepping - morphic') -----
  updateInspectors 
  	"Update the inspectors on the receiver's variables."
  
  	receiverInspector == nil ifFalse: [receiverInspector update].
  	contextVariablesInspector == nil ifFalse: [contextVariablesInspector update]!

Item was removed:
- ----- Method: Debugger>>wantsSteps (in category 'stepping - morphic') -----
- wantsSteps
-  
- 	^ true!

Item was added:
+ ----- Method: Debugger>>wantsStepsIn: (in category 'self-updating') -----
+ wantsStepsIn: aWindow
+ 
+ 	^ false!

Item was changed:
  ----- Method: Inspector>>fieldSelf (in category 'fields') -----
  fieldSelf
  
  	^ (self newFieldForType: #self key: #self)
+ 		name: 'self'; styleName: ((UserInterfaceTheme current get: #self for: #SHTextStylerST80) ifNil: [#()]);
- 		shouldStyleName: true;
  		valueGetter: [:object | object];
  		valueSetter: [:object :value | self object: value]; "Switch to another object-under-inspection."
  		yourself!

Item was changed:
  ----- Method: Inspector>>streamInstanceVariablesOn: (in category 'fields - streaming') -----
  streamInstanceVariablesOn: aStream
  
+ 	| attributesForInstVars |
+ 	attributesForInstVars :=  (UserInterfaceTheme current get: #instVar for: #SHTextStylerST80) ifNil: [#()].
+ 	
  	(self object perform: #class "do not inline send of #class, receiver could be a proxy") allInstVarNames withIndexDo: [:name :index |		
  		aStream nextPut: ((self newFieldForType: #instVar key: name)
+ 			name: name; styleName: attributesForInstVars;
- 			shouldStyleName: true;
  			valueGetter: [:object | object instVarNamed: name];
  			valueSetter: [:object :value | object instVarNamed: name put: value];
  			yourself)].!

Item was changed:
  ----- Method: Inspector>>textColorForError (in category 'user interface') -----
  textColorForError
  
+ 	^ TextColor color: ((UserInterfaceTheme current get: #errorColor for: #TestRunner) ifNil: [Color red])!
- 	^ TextColor color: ((self userInterfaceTheme get: #errorColor for: #TestRunner) ifNil: [Color red])!

Item was changed:
  ----- Method: InspectorField>>deEmphasizeName (in category 'initialization') -----
  deEmphasizeName
  
  	self flag: #hardcoded.
+ 	self styleName:
+ 		{TextColor color:
+ 			((UserInterfaceTheme current get: #balloonTextColor for: #PluggableTextMorphPlus)
+ 				ifNil: [Color gray])}.!
- 	self name: (self name asText
- 		addAttribute: (TextColor color: (self userInterfaceTheme get: #balloonTextColor for: #PluggableTextMorphPlus));
- 		yourself).!

Item was changed:
  ----- Method: InspectorField>>emphasizeName (in category 'initialization') -----
  emphasizeName
  
- 	| regularEmphasis customEmphasis |
- 
  	self flag: #hardcoded.
+ 	self styleName: {
+ 		self isCustom
+ 			ifFalse: [TextEmphasis italic]
+ 			ifTrue: [TextColor color:
+ 				((UserInterfaceTheme current get: #highlightTextColor for: #SimpleHierarchicalListMorph)
+ 					ifNil: [Color red])]}!
- 	regularEmphasis := TextEmphasis italic.
- 	customEmphasis := TextColor color: ((self userInterfaceTheme get: #highlightTextColor for: #SimpleHierarchicalListMorph) ifNil: [Color red]).
- 
- 	self name: (self name asText
- 		addAttribute: (self isCustom ifTrue: [customEmphasis] ifFalse: [regularEmphasis]);
- 		yourself).!

Item was added:
+ ----- Method: InspectorField>>styleName: (in category 'initialization') -----
+ styleName: someTextAttributesOrColors
+ 
+ 	self name: (self name asText
+ 		addAllAttributes: (someTextAttributesOrColors
+ 			collect: [:ea | ea isColor ifTrue: [TextColor color: ea] ifFalse: [ea]]);
+ 		yourself).!



More information about the Squeak-dev mailing list