diff --git a/packages/Babylonian-Core.package/BPTraceValue.class/instance/filterableClassesInStack.st b/packages/Babylonian-Core.package/BPTraceValue.class/instance/filterableClassesInStack.st index 51f792e7..961b239a 100644 --- a/packages/Babylonian-Core.package/BPTraceValue.class/instance/filterableClassesInStack.st +++ b/packages/Babylonian-Core.package/BPTraceValue.class/instance/filterableClassesInStack.st @@ -1,7 +1,7 @@ private filterableClassesInStack - - ^ {BlockClosure. + + ^ { BlockClosure. Symbol. DynamicVariable class. CSProcessContextInformation. @@ -9,4 +9,6 @@ filterableClassesInStack CSLayeredMethod. CSPartialMethod. TestCase. - TestResult.} \ No newline at end of file + TestResult. + BPPrintbuggerTest. + } \ No newline at end of file diff --git a/packages/Babylonian-Core.package/BPTraceValue.class/instance/filterableMessagesInStack.st b/packages/Babylonian-Core.package/BPTraceValue.class/instance/filterableMessagesInStack.st index 262d550b..247c2e37 100644 --- a/packages/Babylonian-Core.package/BPTraceValue.class/instance/filterableMessagesInStack.st +++ b/packages/Babylonian-Core.package/BPTraceValue.class/instance/filterableMessagesInStack.st @@ -1,6 +1,6 @@ private filterableMessagesInStack - + ^ {MethodReference class: BlockClosure selector: #newProcess. MethodReference class: BPExample selector: #traceInBackground. MethodReference class: BlockClosure selector: #on:do:. @@ -17,5 +17,4 @@ filterableMessagesInStack MethodReference class: BPMethodExample selector: #runOn:. MethodReference class: CSMethodObject selector: #run:with:in:. MethodReference class: CSLayeredMethod selector: #valueWithReceiver:arguments:. - MethodReference class: CSPartialMethod selector: #valueWithReceiver:arguments:. - MethodReference class: BlockClosure selector: #whileFalseDo:.} \ No newline at end of file + MethodReference class: CSPartialMethod selector: #valueWithReceiver:arguments:.} \ No newline at end of file diff --git a/packages/Babylonian-Core.package/BPTraceValue.class/instance/filteredStack.st b/packages/Babylonian-Core.package/BPTraceValue.class/instance/filteredStack.st index b4b297c4..8d0b5619 100644 --- a/packages/Babylonian-Core.package/BPTraceValue.class/instance/filteredStack.st +++ b/packages/Babylonian-Core.package/BPTraceValue.class/instance/filteredStack.st @@ -1,6 +1,6 @@ private filteredStack - - ^ self filteredStackFor: self stack + + ^ self stack reject: [:aStackEntry | self shouldBeFiltered: aStackEntry ] \ No newline at end of file diff --git a/packages/Babylonian-Core.package/BPTraceValue.class/instance/filteredStackFor..st b/packages/Babylonian-Core.package/BPTraceValue.class/instance/filteredStackFor..st deleted file mode 100644 index 51660ea0..00000000 --- a/packages/Babylonian-Core.package/BPTraceValue.class/instance/filteredStackFor..st +++ /dev/null @@ -1,6 +0,0 @@ -private -filteredStackFor: aStack - - ^ aStack reject: [:aStackEntry | self shouldBeFiltered: aStackEntry ] - - \ No newline at end of file diff --git a/packages/Babylonian-Core.package/BPTraceValue.class/instance/oneSidedStackLevelTo..st b/packages/Babylonian-Core.package/BPTraceValue.class/instance/oneSidedStackLevelTo..st deleted file mode 100644 index edae03a7..00000000 --- a/packages/Babylonian-Core.package/BPTraceValue.class/instance/oneSidedStackLevelTo..st +++ /dev/null @@ -1,14 +0,0 @@ -private -oneSidedStackLevelTo: anotherTraceValue - - "0: anotherTraceValue stack does not contain self containedMethodReference. - +x: stack level in which anotherTraceValue stack contains self containedMethodReference. - We traverse by reverse to cover recursive calls." - - |foundElementIndex| - foundElementIndex := (self filteredStackFor: anotherTraceValue stack) findLast: [:aStackEntry | - (aStackEntry third == self stack first third and: [aStackEntry fourth == self stack first fourth])]. - - ^ foundElementIndex ~= 0 - ifTrue: [foundElementIndex-1] - ifFalse: [0] \ No newline at end of file diff --git a/packages/Babylonian-Core.package/BPTraceValue.class/instance/relativeStackLevelTo..st b/packages/Babylonian-Core.package/BPTraceValue.class/instance/relativeStackLevelTo..st deleted file mode 100644 index 98014e90..00000000 --- a/packages/Babylonian-Core.package/BPTraceValue.class/instance/relativeStackLevelTo..st +++ /dev/null @@ -1,28 +0,0 @@ -accessing -relativeStackLevelTo: anotherTraceValue - - "-x: self stack calls anotherTraceValue by x calls. - 0: self strack and anotherTraceValue are called independently in the same method - OR they are not related at all. - +x: anotherTraceValue stacks calls self by x calls." - - "First check trivial case: If two stack depths are the same they are either called in the same - method or totally unrelated. If the two stacks are both full, the trivial check fails." - (self isStackFull not and: [self stack size == anotherTraceValue stack size]) ifTrue: [^ 0]. - - "If both stacks are full, the direction can also not be as easily concluded. Return the non zero one unless - both directions result in a depth of zero." - (self isStackFull and: [anotherTraceValue isStackFull]) ifTrue: [ - {self oneSidedStackLevelTo: anotherTraceValue. (anotherTraceValue oneSidedStackLevelTo: self) negated} - detect: [:aStackDepth | aStackDepth ~= 0] - ifFound: [:theStackDepth | ^ theStackDepth] - ifNone: [^ 0]]. - - "else self can only be called if the stack size of other is bigger & vice visa." - (self stack size < anotherTraceValue stack size) - ifTrue: [^ self oneSidedStackLevelTo: anotherTraceValue] - ifFalse: [^ (anotherTraceValue oneSidedStackLevelTo: self) negated]. - - - - \ No newline at end of file diff --git a/packages/Babylonian-Core.package/BPTraceValue.class/methodProperties.json b/packages/Babylonian-Core.package/BPTraceValue.class/methodProperties.json index c695e08e..160960cd 100644 --- a/packages/Babylonian-Core.package/BPTraceValue.class/methodProperties.json +++ b/packages/Babylonian-Core.package/BPTraceValue.class/methodProperties.json @@ -9,14 +9,11 @@ "chronologicalPosition" : "jb 5/20/2021 14:50", "chronologicalPosition:" : "jb 5/20/2021 14:50", "containedMethodReference" : "jb 7/2/2021 14:34", - "filterableClassesInStack" : "jb 6/30/2021 00:58", - "filterableMessagesInStack" : "jb 6/24/2021 22:43", - "filteredStack" : "jb 6/30/2021 00:53", - "filteredStackFor:" : "jb 6/30/2021 00:47", + "filterableClassesInStack" : "jb 11/20/2021 02:07", + "filterableMessagesInStack" : "jb 11/20/2021 01:52", + "filteredStack" : "jb 11/19/2021 18:54", "isStackFull" : "jb 6/30/2021 01:26", - "oneSidedStackLevelTo:" : "jb 8/1/2021 21:24", "printOn:" : "jb 5/19/2021 20:59", - "relativeStackLevelTo:" : "jb 7/2/2021 14:36", "shouldBeFiltered:" : "jb 6/30/2021 00:55", "stack" : "pre 5/8/2019 18:36", "stack:" : "jb 12/7/2020 18:55", diff --git a/packages/Babylonian-Printbugger.package/BPSwimlane.class/instance/barWidthFor.relativeTo..st b/packages/Babylonian-Printbugger.package/BPSwimlane.class/instance/barWidthFor.relativeTo..st deleted file mode 100644 index 318d2040..00000000 --- a/packages/Babylonian-Printbugger.package/BPSwimlane.class/instance/barWidthFor.relativeTo..st +++ /dev/null @@ -1,6 +0,0 @@ -constants -barWidthFor: aTraceValue relativeTo: aStackRelation - - ^ self stackDepth + (aStackRelation * self stackDepth) - - \ No newline at end of file diff --git a/packages/Babylonian-Printbugger.package/BPSwimlane.class/instance/colorFor..st b/packages/Babylonian-Printbugger.package/BPSwimlane.class/instance/colorFor..st new file mode 100644 index 00000000..83187bf3 --- /dev/null +++ b/packages/Babylonian-Printbugger.package/BPSwimlane.class/instance/colorFor..st @@ -0,0 +1,4 @@ +private +colorFor: aMethodReference + + ^ context colorFor: aMethodReference having: self class barColorScheme \ No newline at end of file diff --git a/packages/Babylonian-Printbugger.package/BPSwimlane.class/instance/lineSubmorphsFor.relativeTo..st b/packages/Babylonian-Printbugger.package/BPSwimlane.class/instance/lineSubmorphsFor.calledBy..st similarity index 68% rename from packages/Babylonian-Printbugger.package/BPSwimlane.class/instance/lineSubmorphsFor.relativeTo..st rename to packages/Babylonian-Printbugger.package/BPSwimlane.class/instance/lineSubmorphsFor.calledBy..st index 7d2bc4ac..d43b1339 100644 --- a/packages/Babylonian-Printbugger.package/BPSwimlane.class/instance/lineSubmorphsFor.relativeTo..st +++ b/packages/Babylonian-Printbugger.package/BPSwimlane.class/instance/lineSubmorphsFor.calledBy..st @@ -1,12 +1,12 @@ private -lineSubmorphsFor: aTraceValue relativeTo: aStackRelation - +lineSubmorphsFor: aTraceValue calledBy: aStackOfMethodReferences + | valueMorph | valueMorph := self newLabelValuePairMorphFor: aTraceValue. ^ {self newHaltButtonFor: aTraceValue. self newBarMorphFor: aTraceValue - relativeTo: aStackRelation + calledBy: aStackOfMethodReferences withHeight: (valueMorph fullBounds height + 10). valueMorph.} \ No newline at end of file diff --git a/packages/Babylonian-Printbugger.package/BPSwimlane.class/instance/newBarMorphFor.calledBy.withHeight..st b/packages/Babylonian-Printbugger.package/BPSwimlane.class/instance/newBarMorphFor.calledBy.withHeight..st new file mode 100644 index 00000000..0fabf412 --- /dev/null +++ b/packages/Babylonian-Printbugger.package/BPSwimlane.class/instance/newBarMorphFor.calledBy.withHeight..st @@ -0,0 +1,16 @@ +private - ui +newBarMorphFor: aTraceValue calledBy: aStackOfMethodReferences withHeight: aNumber + + + ^ Morph new + name: #stackBar; + color: Color transparent; + changeTableLayout; + listDirection: #rightToLeft; + wrapCentering: #center; + hResizing: #shrinkWrap; + vResizing: #shrinkWrap; + cellInset: 1@0; + addAllMorphsBack: (aStackOfMethodReferences collect: [:aStackMethod | + self newStackFrameMorphFor: aStackMethod withHeight: aNumber]); + yourself \ No newline at end of file diff --git a/packages/Babylonian-Printbugger.package/BPSwimlane.class/instance/newBarMorphFor.relativeTo.withHeight..st b/packages/Babylonian-Printbugger.package/BPSwimlane.class/instance/newBarMorphFor.relativeTo.withHeight..st deleted file mode 100644 index 6afbcc70..00000000 --- a/packages/Babylonian-Printbugger.package/BPSwimlane.class/instance/newBarMorphFor.relativeTo.withHeight..st +++ /dev/null @@ -1,9 +0,0 @@ -private - ui -newBarMorphFor: aTraceValue relativeTo: aStackRelation withHeight: aNumber - - ^ Morph new - name: #stackBar; - color: (self colorFor: aTraceValue in: context); - extent: ((self barWidthFor: aTraceValue relativeTo: aStackRelation)@aNumber); - yourself. - \ No newline at end of file diff --git a/packages/Babylonian-Printbugger.package/BPSwimlane.class/instance/newStackFrameMorphFor.withHeight..st b/packages/Babylonian-Printbugger.package/BPSwimlane.class/instance/newStackFrameMorphFor.withHeight..st new file mode 100644 index 00000000..3006ba82 --- /dev/null +++ b/packages/Babylonian-Printbugger.package/BPSwimlane.class/instance/newStackFrameMorphFor.withHeight..st @@ -0,0 +1,26 @@ +private - ui +newStackFrameMorphFor: aMethodReference withHeight: aNumber + + | stackMorph | + stackMorph := Morph new + color: (self colorFor: aMethodReference); + extent: (self stackDepth@aNumber); + balloonText: aMethodReference asString; + setProperty: #stackMethodReference + toValue: aMethodReference; + on: #click + send: #value + to: [ToolSet browse: aMethodReference actualClass + selector: aMethodReference selector]; + yourself. + + stackMorph + on: #mouseEnter + send: #value + to: [stackMorph borderStyle: (BorderStyle width: 2 color: Color black)]; + on: #mouseLeave + send: #value + to: [stackMorph borderStyle: nil]. + + ^ stackMorph + \ No newline at end of file diff --git a/packages/Babylonian-Printbugger.package/BPSwimlane.class/instance/stackDepth.st b/packages/Babylonian-Printbugger.package/BPSwimlane.class/instance/stackDepth.st index 0d431612..c31ece8f 100644 --- a/packages/Babylonian-Printbugger.package/BPSwimlane.class/instance/stackDepth.st +++ b/packages/Babylonian-Printbugger.package/BPSwimlane.class/instance/stackDepth.st @@ -1,4 +1,4 @@ constants stackDepth - - ^ self fontHeight \ No newline at end of file + + ^ self fontHeight / 1.25 \ No newline at end of file diff --git a/packages/Babylonian-Printbugger.package/BPSwimlane.class/instance/stackDepthsFor..st b/packages/Babylonian-Printbugger.package/BPSwimlane.class/instance/stackDepthsFor..st deleted file mode 100644 index 2cc3310a..00000000 --- a/packages/Babylonian-Printbugger.package/BPSwimlane.class/instance/stackDepthsFor..st +++ /dev/null @@ -1,17 +0,0 @@ -private -stackDepthsFor: aBPExample - - |stackDepthsRelativeToFirstLine lowestDepth| - stackDepthsRelativeToFirstLine := aBPExample traceValues collect: [:anotherTraceValue | - aBPExample traceValues first relativeStackLevelTo: anotherTraceValue]. - - "the first trace value may be a method with a probe being called in a method which probes after the call, which would result - in stacks going from right to left instead of the other way around (with being thinner). so normalize the depths before returning." - lowestDepth := stackDepthsRelativeToFirstLine - ifNotEmpty: [stackDepthsRelativeToFirstLine min] - ifEmpty: [0]. - - (lowestDepth < 0) - ifTrue: [stackDepthsRelativeToFirstLine replace: [:aStackDepth |aStackDepth - lowestDepth]]. - - ^ stackDepthsRelativeToFirstLine \ No newline at end of file diff --git a/packages/Babylonian-Printbugger.package/BPSwimlane.class/instance/stackMethodsFor..st b/packages/Babylonian-Printbugger.package/BPSwimlane.class/instance/stackMethodsFor..st new file mode 100644 index 00000000..26283dfb --- /dev/null +++ b/packages/Babylonian-Printbugger.package/BPSwimlane.class/instance/stackMethodsFor..st @@ -0,0 +1,5 @@ +private +stackMethodsFor: aBPExample + + ^ aBPExample traceValues collect: [:aTraceValue | + aTraceValue filteredStack collect: [:aStackEntry | MethodReference class: aStackEntry fourth selector: aStackEntry third]] \ No newline at end of file diff --git a/packages/Babylonian-Printbugger.package/BPSwimlane.class/instance/updateLayoutToContext.st b/packages/Babylonian-Printbugger.package/BPSwimlane.class/instance/updateLayoutToContext.st index 3ff203ac..30bc854b 100644 --- a/packages/Babylonian-Printbugger.package/BPSwimlane.class/instance/updateLayoutToContext.st +++ b/packages/Babylonian-Printbugger.package/BPSwimlane.class/instance/updateLayoutToContext.st @@ -1,5 +1,6 @@ change notifications updateLayoutToContext - + self lineSubMorphs withIndexDo: [:aTraceValueLine :anIndex | - (aTraceValueLine submorphNamed: #stackBar) color: (self colorFor: (example traceValues at: anIndex) in: context)]. \ No newline at end of file + (aTraceValueLine submorphNamed: #stackBar) submorphsDo: [:aStackEntry | + aStackEntry color: (self colorFor: (aStackEntry valueOfProperty: #stackMethodReference))]]. \ No newline at end of file diff --git a/packages/Babylonian-Printbugger.package/BPSwimlane.class/instance/visualizeLineFor.relativeTo..st b/packages/Babylonian-Printbugger.package/BPSwimlane.class/instance/visualizeLineFor.calledBy..st similarity index 55% rename from packages/Babylonian-Printbugger.package/BPSwimlane.class/instance/visualizeLineFor.relativeTo..st rename to packages/Babylonian-Printbugger.package/BPSwimlane.class/instance/visualizeLineFor.calledBy..st index 5e73da0c..cda8c591 100644 --- a/packages/Babylonian-Printbugger.package/BPSwimlane.class/instance/visualizeLineFor.relativeTo..st +++ b/packages/Babylonian-Printbugger.package/BPSwimlane.class/instance/visualizeLineFor.calledBy..st @@ -1,6 +1,6 @@ private -visualizeLineFor: aTraceValue relativeTo: aStackRelation - +visualizeLineFor: aTraceValue calledBy: aStackOfMethodReferences + ^ Morph new name: aTraceValue chronologicalPosition asString; color: Color transparent; @@ -9,6 +9,6 @@ visualizeLineFor: aTraceValue relativeTo: aStackRelation cellPositioning: #center; vResizing: #shrinkWrap; hResizing: #shrinkWrap; - cellInset: 3@1; - addAllMorphsBack: (self lineSubmorphsFor: aTraceValue relativeTo: aStackRelation); - yourself. \ No newline at end of file + cellInset: 3@0; + addAllMorphsBack: (self lineSubmorphsFor: aTraceValue calledBy: aStackOfMethodReferences); + yourself \ No newline at end of file diff --git a/packages/Babylonian-Printbugger.package/BPSwimlane.class/instance/visualizeLinesFor..st b/packages/Babylonian-Printbugger.package/BPSwimlane.class/instance/visualizeLinesFor..st index 883d9a2a..32a84571 100644 --- a/packages/Babylonian-Printbugger.package/BPSwimlane.class/instance/visualizeLinesFor..st +++ b/packages/Babylonian-Printbugger.package/BPSwimlane.class/instance/visualizeLinesFor..st @@ -1,8 +1,8 @@ private visualizeLinesFor: aBPExample - - |stackDepthsRelativeToFirstLine| - stackDepthsRelativeToFirstLine := self stackDepthsFor: aBPExample. + + | stackMethods | + stackMethods := self stackMethodsFor: aBPExample. "Add a wrapper to have some distance between the title morph and the values" ^ Morph new @@ -14,5 +14,5 @@ visualizeLinesFor: aBPExample wrapCentering: #center; cellPositioning: #topLeft; addAllMorphsBack: (aBPExample traceValues withIndexCollect: [:aTraceValue :anIndex | - self visualizeLineFor: aTraceValue relativeTo: (stackDepthsRelativeToFirstLine at: anIndex )]); + self visualizeLineFor: aTraceValue calledBy: (stackMethods at: anIndex )]); yourself \ No newline at end of file diff --git a/packages/Babylonian-Printbugger.package/BPSwimlane.class/methodProperties.json b/packages/Babylonian-Printbugger.package/BPSwimlane.class/methodProperties.json index ccc6f964..dcf379dd 100644 --- a/packages/Babylonian-Printbugger.package/BPSwimlane.class/methodProperties.json +++ b/packages/Babylonian-Printbugger.package/BPSwimlane.class/methodProperties.json @@ -5,7 +5,7 @@ "newFor:" : "jb 6/10/2021 23:33", "newFor:withContext:" : "jb 6/10/2021 23:24" }, "instance" : { - "barWidthFor:relativeTo:" : "jb 6/25/2021 00:34", + "colorFor:" : "jb 11/20/2021 01:29", "colorFor:in:" : "jb 6/11/2021 01:04", "context:" : "jb 6/10/2021 23:26", "example:" : "jb 6/10/2021 15:06", @@ -15,19 +15,20 @@ "initialize" : "jb 6/10/2021 23:34", "initializeProperties" : "jb 7/10/2021 16:37", "lineSubMorphs" : "jb 7/10/2021 17:43", - "lineSubmorphsFor:relativeTo:" : "jb 7/10/2021 16:57", - "newBarMorphFor:relativeTo:withHeight:" : "jb 6/30/2021 03:10", + "lineSubmorphsFor:calledBy:" : "jb 11/19/2021 21:37", + "newBarMorphFor:calledBy:withHeight:" : "jb 11/19/2021 21:58", "newHaltButtonFor:" : "lu 6/17/2021 13:44", "newLabelFor:" : "jb 7/10/2021 17:13", "newLabelMorphFor:" : "jb 7/10/2021 17:14", "newLabelValuePairMorphFor:" : "jb 7/10/2021 17:14", + "newStackFrameMorphFor:withHeight:" : "jb 11/20/2021 01:32", "newTitleMorphFor:" : "lu 7/20/2021 21:21", "positionInProbeFor:and:" : "jb 6/24/2021 22:21", "scrollBarSize" : "lu 6/9/2021 23:47", - "stackDepth" : "jb 7/10/2021 16:50", - "stackDepthsFor:" : "jb 6/30/2021 02:18", + "stackDepth" : "jb 11/19/2021 18:29", + "stackMethodsFor:" : "jb 11/19/2021 21:21", "update:with:" : "jb 7/1/2021 23:47", - "updateLayoutToContext" : "jb 7/10/2021 17:43", + "updateLayoutToContext" : "jb 11/20/2021 01:33", "visualize" : "jb 7/10/2021 16:41", - "visualizeLineFor:relativeTo:" : "jb 7/10/2021 16:57", - "visualizeLinesFor:" : "jb 7/10/2021 16:56" } } + "visualizeLineFor:calledBy:" : "jb 11/19/2021 21:45", + "visualizeLinesFor:" : "jb 11/19/2021 21:39" } } diff --git a/packages/Babylonian-Tests.package/BPPrintbuggerTest.class/instance/testSwimlaneDisplaysTraceValuesForOneProbe.st b/packages/Babylonian-Tests.package/BPPrintbuggerTest.class/instance/testSwimlaneDisplaysTraceValuesForOneProbe.st index b459f66f..16accb05 100644 --- a/packages/Babylonian-Tests.package/BPPrintbuggerTest.class/instance/testSwimlaneDisplaysTraceValuesForOneProbe.st +++ b/packages/Babylonian-Tests.package/BPPrintbuggerTest.class/instance/testSwimlaneDisplaysTraceValuesForOneProbe.st @@ -1,11 +1,12 @@ tests testSwimlaneDisplaysTraceValuesForOneProbe - + | swimlane traceValues| self initExample1WithMethodWithMultipleProbes. swimlane := printbugger canvasMorph firstSubmorph. self assert: (swimlane isKindOf: BPSwimlane). self assert: 6 equals: (swimlane lineSubMorphs size). - traceValues := swimlane allMorphs select: [:aSubmorph | aSubmorph isKindOf: StringMorph] thenCollect: [:aStringMorph | aStringMorph contents]. + traceValues := swimlane allMorphs select: [:aSubmorph | + aSubmorph isKindOf: StringMorph] thenCollect: [:aStringMorph | aStringMorph contents]. self assert: (traceValues includesAllOf: {'1'. '2'. '2'. '4'. '3'. '6'.}). \ No newline at end of file diff --git a/packages/Babylonian-Tests.package/BPPrintbuggerTest.class/instance/testSwimlaneDisplaysTraceValuesForTwoProbesChronologicallySorted.st b/packages/Babylonian-Tests.package/BPPrintbuggerTest.class/instance/testSwimlaneDisplaysTraceValuesForTwoProbesChronologicallySorted.st index 9962e685..42a381d4 100644 --- a/packages/Babylonian-Tests.package/BPPrintbuggerTest.class/instance/testSwimlaneDisplaysTraceValuesForTwoProbesChronologicallySorted.st +++ b/packages/Babylonian-Tests.package/BPPrintbuggerTest.class/instance/testSwimlaneDisplaysTraceValuesForTwoProbesChronologicallySorted.st @@ -1,10 +1,11 @@ tests testSwimlaneDisplaysTraceValuesForTwoProbesChronologicallySorted - + |swimlane traceValues traceIndexes| self initExample1WithMethodWithMultipleProbes. swimlane := BPSwimlane newFor: example1. - traceValues := swimlane allMorphs select: [:aSubmorph | aSubmorph isKindOf: StringMorph] thenCollect: [:aStringMorph | aStringMorph contents]. + traceValues := swimlane allMorphs select: [:aSubmorph | + aSubmorph isKindOf: StringMorph] thenCollect: [:aStringMorph | aStringMorph contents]. self assert: (traceValues includesAllOf: {'1'. '2'. '2'. '4'. '3'. '6'.}). traceIndexes := {'1'. '2'. '2'. '4'. '3'. '6'.} collect: [:aTraceString | traceValues indexOf: aTraceString]. self assert: traceIndexes isSorted. diff --git a/packages/Babylonian-Tests.package/BPPrintbuggerTest.class/instance/testTwoTraceValuesInDifferentMethodsGetDifferentColorsInMultipleSwimlanes.st b/packages/Babylonian-Tests.package/BPPrintbuggerTest.class/instance/testTwoTraceValuesInDifferentMethodsGetDifferentColorsInMultipleSwimlanes.st index 778b03a2..1a73088c 100644 --- a/packages/Babylonian-Tests.package/BPPrintbuggerTest.class/instance/testTwoTraceValuesInDifferentMethodsGetDifferentColorsInMultipleSwimlanes.st +++ b/packages/Babylonian-Tests.package/BPPrintbuggerTest.class/instance/testTwoTraceValuesInDifferentMethodsGetDifferentColorsInMultipleSwimlanes.st @@ -1,14 +1,16 @@ tests testTwoTraceValuesInDifferentMethodsGetDifferentColorsInMultipleSwimlanes - + |swimlane1 swimlane2 colors1 colors2| self initExample1WithMethodWithMultipleProbes. self initExample2WithSingleProbe. swimlane1 := printbugger canvasMorph firstSubmorph. swimlane2 := printbugger canvasMorph submorphs second. - colors1 := (swimlane1 allMorphs select: [:aSubmorph | aSubmorph knownName = 'stackBar'] thenCollect: [:aBarMorph | aBarMorph color]) asSet. - colors2 := (swimlane2 allMorphs select: [:aSubmorph | aSubmorph knownName = 'stackBar'] thenCollect: [:aBarMorph | aBarMorph color]) asSet. + colors1 := (swimlane1 allMorphs select: [:aSubmorph | + aSubmorph knownName = 'stackBar'] thenCollect: [:aBarMorph | aBarMorph firstSubmorph color]) asSet. + colors2 := (swimlane2 allMorphs select: [:aSubmorph | + aSubmorph knownName = 'stackBar'] thenCollect: [:aBarMorph | aBarMorph firstSubmorph color]) asSet. self assert: colors1 size equals: colors2 size. self assert: colors1 ~= colors2. \ No newline at end of file diff --git a/packages/Babylonian-Tests.package/BPPrintbuggerTest.class/instance/testTwoTraceValuesInDifferentMethodsGetDifferentColorsInSameSwimlane.st b/packages/Babylonian-Tests.package/BPPrintbuggerTest.class/instance/testTwoTraceValuesInDifferentMethodsGetDifferentColorsInSameSwimlane.st index bed8be39..daf9bc65 100644 --- a/packages/Babylonian-Tests.package/BPPrintbuggerTest.class/instance/testTwoTraceValuesInDifferentMethodsGetDifferentColorsInSameSwimlane.st +++ b/packages/Babylonian-Tests.package/BPPrintbuggerTest.class/instance/testTwoTraceValuesInDifferentMethodsGetDifferentColorsInSameSwimlane.st @@ -1,10 +1,11 @@ tests testTwoTraceValuesInDifferentMethodsGetDifferentColorsInSameSwimlane - + |swimlane colors| self initExample1WithMethodWithExampleCallingOnlyProbedMethod. swimlane := printbugger canvasMorph firstSubmorph. - colors := (swimlane allMorphs select: [:aSubmorph | aSubmorph knownName = 'stackBar'] thenCollect: [:aBarMorph | aBarMorph color]) asSet. + colors := (swimlane allMorphs select: [:aSubmorph | + aSubmorph knownName = 'stackBar'] thenCollect: [:aBarMorph | aBarMorph firstSubmorph color]) asSet. self assert: 2 equals: colors size. \ No newline at end of file diff --git a/packages/Babylonian-Tests.package/BPPrintbuggerTest.class/instance/testTwoTraceValuesInDifferentMethodsGetDifferentStackDepthsInSameSwimlane.st b/packages/Babylonian-Tests.package/BPPrintbuggerTest.class/instance/testTwoTraceValuesInDifferentMethodsGetDifferentStackDepthsInSameSwimlane.st index e689da2a..c7af2548 100644 --- a/packages/Babylonian-Tests.package/BPPrintbuggerTest.class/instance/testTwoTraceValuesInDifferentMethodsGetDifferentStackDepthsInSameSwimlane.st +++ b/packages/Babylonian-Tests.package/BPPrintbuggerTest.class/instance/testTwoTraceValuesInDifferentMethodsGetDifferentStackDepthsInSameSwimlane.st @@ -1,11 +1,11 @@ tests testTwoTraceValuesInDifferentMethodsGetDifferentStackDepthsInSameSwimlane - + |swimlane stackDepths| self initExample1WithMethodWithExampleCallingOnlyProbedMethod. swimlane := printbugger canvasMorph firstSubmorph. - stackDepths := swimlane allMorphs select: [:aSubmorph | aSubmorph knownName = 'stackBar'] thenCollect: [:aBarMorph | aBarMorph width]. + stackDepths := swimlane allMorphs select: [:aSubmorph | + aSubmorph knownName = 'stackBar'] thenCollect: [:aBarMorph | aBarMorph fullBounds width]. - self assert: 2 equals: stackDepths asSet size. - self assert: stackDepths first < stackDepths second. \ No newline at end of file + self assert: 2 equals: stackDepths asSet size. \ No newline at end of file diff --git a/packages/Babylonian-Tests.package/BPPrintbuggerTest.class/instance/testTwoTraceValuesInSameMethodGetSameColorInSameSwimlane.st b/packages/Babylonian-Tests.package/BPPrintbuggerTest.class/instance/testTwoTraceValuesInSameMethodGetSameColorInSameSwimlane.st index 66b3b5ff..c2b12f20 100644 --- a/packages/Babylonian-Tests.package/BPPrintbuggerTest.class/instance/testTwoTraceValuesInSameMethodGetSameColorInSameSwimlane.st +++ b/packages/Babylonian-Tests.package/BPPrintbuggerTest.class/instance/testTwoTraceValuesInSameMethodGetSameColorInSameSwimlane.st @@ -1,11 +1,12 @@ tests testTwoTraceValuesInSameMethodGetSameColorInSameSwimlane - + |swimlane colors| self initExample1WithMethodWithMultipleProbes. swimlane := printbugger canvasMorph firstSubmorph. - colors := (swimlane allMorphs select: [:aSubmorph | aSubmorph knownName = 'stackBar'] thenCollect: [:aBarMorph | aBarMorph color]) asSet. + colors := (swimlane allMorphs select: [:aSubmorph | + aSubmorph knownName = 'stackBar'] thenCollect: [:aBarMorph | aBarMorph firstSubmorph color]) asSet. self assert: 1 equals: colors size. \ No newline at end of file diff --git a/packages/Babylonian-Tests.package/BPPrintbuggerTest.class/methodProperties.json b/packages/Babylonian-Tests.package/BPPrintbuggerTest.class/methodProperties.json index 4f162de7..dedc0e8f 100644 --- a/packages/Babylonian-Tests.package/BPPrintbuggerTest.class/methodProperties.json +++ b/packages/Babylonian-Tests.package/BPPrintbuggerTest.class/methodProperties.json @@ -12,14 +12,14 @@ "tearDown" : "jb 7/2/2021 00:50", "testShows2SwimlanesFor2ActiveExamples" : "jb 6/2/2021 21:56", "testShowsNoSwimlanesForNoActiveExamples" : "jb 5/31/2021 14:20", - "testSwimlaneDisplaysTraceValuesForOneProbe" : "jb 7/10/2021 17:45", - "testSwimlaneDisplaysTraceValuesForTwoProbesChronologicallySorted" : "jb 6/30/2021 03:24", + "testSwimlaneDisplaysTraceValuesForOneProbe" : "jb 11/19/2021 21:52", + "testSwimlaneDisplaysTraceValuesForTwoProbesChronologicallySorted" : "jb 11/19/2021 21:52", "testSwimlaneEmptyForNoProbes" : "jb 7/10/2021 17:44", - "testTwoTraceValuesInDifferentMethodsGetDifferentColorsInMultipleSwimlanes" : "jb 7/2/2021 14:48", - "testTwoTraceValuesInDifferentMethodsGetDifferentColorsInSameSwimlane" : "jb 7/2/2021 01:00", - "testTwoTraceValuesInDifferentMethodsGetDifferentStackDepthsInSameSwimlane" : "jb 7/2/2021 14:49", + "testTwoTraceValuesInDifferentMethodsGetDifferentColorsInMultipleSwimlanes" : "jb 11/20/2021 01:35", + "testTwoTraceValuesInDifferentMethodsGetDifferentColorsInSameSwimlane" : "jb 11/20/2021 01:38", + "testTwoTraceValuesInDifferentMethodsGetDifferentStackDepthsInSameSwimlane" : "jb 11/20/2021 02:06", "testTwoTraceValuesInSameMethodGetSameColorInMultipleSwimlanes" : "jb 7/2/2021 00:31", - "testTwoTraceValuesInSameMethodGetSameColorInSameSwimlane" : "jb 7/2/2021 00:30", + "testTwoTraceValuesInSameMethodGetSameColorInSameSwimlane" : "jb 11/19/2021 21:50", "testUpdatesSwimlanesAfterDeactivatingExample" : "jb 7/2/2021 14:50", "testUpdatesSwimlanesAfterNewActiveExample" : "jb 7/2/2021 14:51", "usedMethods" : "jb 7/2/2021 00:57" } }