Marcel Taeumel uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-mt.922.mcz
==================== Summary ====================
Name: Tools-mt.922
Author: mt
Time: 29 November 2019, 11:45:06.040061 am
UUID: 2a67c032-4bcf-334d-898e-862aeafd93af
Ancestors: Tools-mt.921
Due to recurrent requests, add an #ifNil-check for the class argument in the label-formatting methods of all code holders. Still, also document the situation in a flag comment. At least, this makes this method more robust for the upcoming release. :-)
=============== Diff against Tools-mt.921 ===============
Item was changed:
----- Method: CodeHolder>>formattedLabel:forSelector:inClass: (in category 'message list') -----
formattedLabel: aString forSelector: aSymbol inClass: aClass
+ "Show deprecated messages differently so that users recognize them quickly to avoid them. This is a performance critical method in the user interface."
- "Show deprecated messages differently so that users recognize them quickly to avoid them."
| formattedLabel |
+ self flag: #investigate. "mt: aClass must never be nil!! Faulty tools should override this call themselves or fix the caller site."
+ aClass ifNil: [^ aString].
+
(aSymbol = #Definition or: [aSymbol = #Comment])
ifTrue: [aClass isDeprecated
ifFalse: [^ aString]]
ifFalse: [(aClass isDeprecated or: [(aClass compiledMethodAt: aSymbol ifAbsent: [^ aString]) isDeprecated])
ifFalse: [^ aString]].
formattedLabel := aString asText.
(self userInterfaceTheme deprecatedMessageAttributes ifNil: [{TextColor gray. TextEmphasis struckOut}]) do: [:textAttribute |
formattedLabel addAttribute: textAttribute].
^ formattedLabel.!
Marcel Taeumel uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-mt.921.mcz
==================== Summary ====================
Name: Tools-mt.921
Author: mt
Time: 29 November 2019, 11:42:49.542061 am
UUID: 73dad5fb-bcd1-f742-ab5b-e29d165d6d63
Ancestors: Tools-mt.920
Debugger: Implements the idea of inbox Tools-eem.915, which preserves inspectors' states when toggling the selected context.
Because it is model-only, should work also in MVC debuggers. There might be a quick with #update:with: in PluggableTextView, though.
=============== Diff against Tools-mt.920 ===============
Item was changed:
CodeHolder subclass: #Debugger
+ instanceVariableNames: 'interruptedProcess contextStack contextStackIndex contextStackList receiverInspector receiverInspectorState contextVariablesInspector contextVariablesInspectorState externalInterrupt proceedValue selectingPC savedCursor isolationHead failedProject labelString message untilExpression'
- instanceVariableNames: 'interruptedProcess contextStack contextStackIndex contextStackList receiverInspector contextVariablesInspector externalInterrupt proceedValue selectingPC savedCursor isolationHead failedProject labelString message untilExpression'
classVariableNames: 'ContextStackKeystrokes ErrorReportServer FullStackSize InterruptUIProcessIfBlockedOnErrorInBackgroundProcess NotifierStackSize SavedExtent StackSizeLimit WantsAnnotationPane'
poolDictionaries: ''
category: 'Tools-Debugger'!
!Debugger commentStamp: '<historical>' prior: 0!
I represent the machine state at the time of an interrupted process. I also represent a query path into the state of the process. The debugger is typically viewed through a window that views the stack of suspended contexts, the code for, and execution point in, the currently selected message, and inspectors on both the receiver of the currently selected message, and the variables in the current context.
Special note on recursive errors:
Some errors affect Squeak's ability to present a debugger. This is normally an unrecoverable situation. However, if such an error occurs in an isolation layer, Squeak will attempt to exit from the isolation layer and then present a debugger. Here is the chain of events in such a recovery.
* A recursive error is detected.
* The current project is queried for an isolationHead
* Changes in the isolationHead are revoked
* The parent project of isolated project is returned to
* The debugger is opened there and execution resumes.
If the user closes that debugger, execution continues in the outer project and layer. If, after repairing some damage, the user proceeds from the debugger, then the isolationHead is re-invoked, the failed project is re-entered, and execution resumes in that world. !
Item was changed:
----- Method: Debugger>>contextStackIndex:oldContextWas: (in category 'private') -----
contextStackIndex: anInteger oldContextWas: oldContext
"Change the context stack index to anInteger, perhaps in response to user selection."
+ | isNewMethod selectedContextSlotName |
+ self saveReceiverInspectorState.
+ self saveContextVariablesInspectorState.
- | isNewMethod selectedContextSlotName index |
contextStackIndex := anInteger.
anInteger = 0 ifTrue:
[currentCompiledMethod := contents := nil.
self changed: #contextStackIndex.
self decorateButtons.
self contentsChanged.
contextVariablesInspector object: nil.
receiverInspector object: self receiver.
^self].
+ selectedContextSlotName := contextVariablesInspector selectedFieldName.
- selectedContextSlotName := contextVariablesInspector selectedSlotName.
isNewMethod := oldContext == nil
or: [oldContext method ~~ (currentCompiledMethod := self selectedContext method)].
isNewMethod ifTrue:
[contents := self selectedMessage.
self contentsChanged.
self pcRange].
self changed: #contextStackIndex.
self decorateButtons.
contextVariablesInspector object: self selectedContext.
+ self restoreContextVariablesInspectorState.
- ((index := contextVariablesInspector fieldList indexOf: selectedContextSlotName) ~= 0
- and: [index ~= contextVariablesInspector selectionIndex]) ifTrue:
- [contextVariablesInspector toggleIndex: index].
receiverInspector object: self receiver.
+ self restoreReceiverInspectorState.
isNewMethod ifFalse:
[self changed: #contentsSelection]!
Item was added:
+ ----- Method: Debugger>>keyForContextVariablesInspectorState (in category 'user interface') -----
+ keyForContextVariablesInspectorState
+
+ ^ self contextVariablesInspector object ifNotNil: [:ctxt | ctxt method]!
Item was added:
+ ----- Method: Debugger>>keyForReceiverInspectorState (in category 'user interface') -----
+ keyForReceiverInspectorState
+
+ ^ self receiverInspector object!
Item was added:
+ ----- Method: Debugger>>restoreContextVariablesInspectorState (in category 'user interface') -----
+ restoreContextVariablesInspectorState
+ "For the user's convenience. Save field selection and user-typed content in the context-variables inspector. See #saveContextVariablesInspectorState."
+
+ contextVariablesInspectorState ifNotNil: [:stateForAll |
+ self keyForContextVariablesInspectorState ifNotNil: [:keyForState |
+ stateForAll
+ at: keyForState
+ ifPresent: [:state |
+ self contextVariablesInspector selectFieldNamed: state first.
+ state second ifNotNil: [:contentsTyped |
+ self contextVariablesInspector
+ setContentsTyped: contentsTyped]]]].!
Item was added:
+ ----- Method: Debugger>>restoreReceiverInspectorState (in category 'user interface') -----
+ restoreReceiverInspectorState
+ "For the user's convenience. Restore field selection and user-typed content in the receiver inspector. See #saveReceiverInspectorState."
+
+ receiverInspectorState ifNotNil: [:stateForAll |
+ self keyForReceiverInspectorState ifNotNil: [:keyForState |
+ stateForAll
+ at: keyForState
+ ifPresent: [:state |
+ self receiverInspector selectFieldNamed: state first.
+ state second ifNotNil: [:contentsTyped |
+ self receiverInspector
+ setContentsTyped: contentsTyped]]]].!
Item was added:
+ ----- Method: Debugger>>saveContextVariablesInspectorState (in category 'user interface') -----
+ saveContextVariablesInspectorState
+ "For the user's convenience. Save field selection and user-typed content in the context-variables inspector. See #restoreContextVariablesInspectorState."
+
+ | stateToSave keyForState |
+ (keyForState := self keyForContextVariablesInspectorState)
+ ifNil: [^ self].
+ contextVariablesInspectorState
+ ifNil: [contextVariablesInspectorState := IdentityDictionary new].
+ stateToSave := {
+ self contextVariablesInspector selectedFieldName.
+ self contextVariablesInspector contentsTyped }.
+ contextVariablesInspectorState
+ at: keyForState
+ put: stateToSave.!
Item was added:
+ ----- Method: Debugger>>saveReceiverInspectorState (in category 'user interface') -----
+ saveReceiverInspectorState
+ "For the user's convenience. Save field selection and user-typed content in the receiver inspector. See #restoreReceiverInspectorState."
+
+ | stateToSave keyForState |
+ (keyForState := self keyForReceiverInspectorState)
+ ifNil: [^ self].
+ receiverInspectorState
+ ifNil: [receiverInspectorState := IdentityDictionary new].
+ stateToSave := {
+ self receiverInspector selectedFieldName.
+ self receiverInspector contentsTyped }.
+ receiverInspectorState
+ at: keyForState
+ put: stateToSave.!
Marcel Taeumel uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-mt.1284.mcz
==================== Summary ====================
Name: Kernel-mt.1284
Author: mt
Time: 29 November 2019, 11:37:15.422061 am
UUID: 8058d02f-d2cd-b942-aa93-095fa963a523
Ancestors: Kernel-mt.1283
Adds a message to set new contents and notify all dependents. To be used by subclasses to remove extra #changed: calles and to provide a better hook to do something else when updating the contents.
=============== Diff against Kernel-mt.1283 ===============
Item was added:
+ ----- Method: StringHolder>>setContents: (in category 'initialize-release') -----
+ setContents: aString
+
+ self contents = aString ifTrue: [^ self].
+ self contents: aString.
+ self changed: #contents.!
Marcel Taeumel uploaded a new version of Collections to project The Trunk:
http://source.squeak.org/trunk/Collections-kfr.812.mcz
==================== Summary ====================
Name: Collections-kfr.812
Author: kfr
Time: 4 November 2018, 4:41:29.534614 pm
UUID: 93f849c9-8b62-e04c-b8e0-ab2a7c2d728c
Ancestors: Collections-eem.811
Print the matrix so one can see the rows and columns
=============== Diff against Collections-eem.811 ===============
Item was added:
+ ----- Method: Matrix>>printMatrix (in category 'printing') -----
+ printMatrix
+ "Answer a String whose characters are a description of the receiver layed out in rows and columns"
+
+ ^ String streamContents: [:aStream |
+ 1
+ to: nrows
+ do: [:iRow |
+ 1
+ to: ncols
+ do: [:iCols |
+ aStream
+ print: (self at: iRow at: iCols).
+ aStream tab: 2].
+ aStream cr]]!
Marcel Taeumel uploaded a new version of Collections to project The Trunk:
http://source.squeak.org/trunk/Collections-mt.864.mcz
==================== Summary ====================
Name: Collections-mt.864
Author: mt
Time: 27 November 2019, 10:46:36.719363 am
UUID: 5e0200f3-d834-4849-93ad-393e5b2b1af2
Ancestors: Collections-mt.863, Collections-kfr.812
Merges Collections-kfr.812 but renames #printMatrix to the existing #stringForReadout. We might want to use that one for ObjectExplorer ... See Object >> #asExplorerString.
=============== Diff against Collections-mt.863 ===============
Item was added:
+ ----- Method: Matrix>>stringForReadout (in category 'printing') -----
+ stringForReadout
+ "Answer a String whose characters are a description of the receiver layed out in rows and columns"
+
+ ^ String streamContents: [:aStream |
+ 1
+ to: self rowCount
+ do: [:iRow |
+ 1
+ to: self columnCount
+ do: [:iCols |
+ aStream
+ print: (self at: iRow at: iCols).
+ aStream tab: 2].
+ aStream cr]]!
Marcel Taeumel uploaded a new version of MorphicExtrasTests to project The Trunk:
http://source.squeak.org/trunk/MorphicExtrasTests-mt.6.mcz
==================== Summary ====================
Name: MorphicExtrasTests-mt.6
Author: mt
Time: 27 November 2019, 10:24:35.984363 am
UUID: 3d508d97-0a4c-8546-9d8f-9ce4823c6400
Ancestors: MorphicExtrasTests-pre.5
Tests for simple setter/getter moved to and extended in StringSystemSupportTest in the package Tests-System-Support.
=============== Diff against MorphicExtrasTests-pre.5 ===============
Item was removed:
- TestCase subclass: #MorphicExtrasSymbolExtensionsTest
- instanceVariableNames: ''
- classVariableNames: ''
- poolDictionaries: ''
- category: 'MorphicExtrasTests-Flaps'!
Item was removed:
- ----- Method: MorphicExtrasSymbolExtensionsTest>>testAsSimpleSetterReturnsSetterSelector (in category 'as yet unclassified') -----
- testAsSimpleSetterReturnsSetterSelector
- self assert: #foo: equals: #foo asSimpleSetter.
-
- "And it really is 'simple':"
- self assert: #foo:: equals: #foo: asSimpleSetter.!