Skip to content

Commit

Permalink
result dialog: click on group title to toggle group selection
Browse files Browse the repository at this point in the history
  • Loading branch information
LinqLover committed Dec 22, 2024
1 parent b30b6bb commit a53150f
Show file tree
Hide file tree
Showing 15 changed files with 63 additions and 26 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
testing
isResultListDummy

^ false
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
"initializeShowRule" : "AT 2/2/2008 12:12",
"isError" : "AT 5/8/2008 10:07",
"isNumeric" : "BD 7/8/2018 10:53",
"isResultListDummy" : "ct 12/22/2024 04:42",
"isSLResult" : "AT 5/17/2008 16:53",
"isSummary" : "AT 5/8/2008 10:07",
"printOn:" : "BD 6/29/2018 12:57",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
browsing
browsable

^ resultsSelected notEmpty
^ self resultsSelected notEmpty
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ messageListForResults
System Navigation calls it Message List.
ToolSet calls it MessageSet. "

^ resultsSelected
^ self resultsSelected
inject: Set new
into: [:messages :result |
result isSummary
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
accessing-results
resultAt: anIndex

^ resultsSelected includes: (self results at: anIndex ifAbsent: [ ^ false ])
^ self resultsSelected includes: (self results at: anIndex ifAbsent: [ ^ false ])
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,31 @@ resultAt: anInteger put: aBoolean

| target |
target := self results at: anInteger ifAbsent: [^ self].
target isResultListDummy ifTrue: [
"group selection"
| end group select |
end := (self results findFirst: [ :ea | ea isResultListDummy ] startingAt: anInteger + 1) - 1.
end < 1 ifTrue: [end := self results size].
group := self results copyFrom: anInteger + 1 to: end.
select := (self resultsSelected includesAllOf: group) not.
^ self resultsSelected:
(select
ifTrue: [
self isMultiSelectable
ifTrue: [ self resultsSelected , group ]
ifFalse: [
group ifEmpty: [^ self].
self resultsSelected copyWith: group first] ]
ifFalse: [
self resultsSelected copyWithoutAll: group ]) ].
target hasDetails ifTrue: [
resultsSelected := self isMultiSelectable
ifTrue: [
aBoolean
ifTrue: [ resultsSelected copyWith: target ]
ifFalse: [ resultsSelected copyWithout: target ]]
ifFalse: [
aBoolean
ifTrue: [IdentitySet new add: target; yourself]
ifFalse: [IdentitySet new]]].

self changed: #browsable.
self resultsSelected:
(self isMultiSelectable
ifTrue: [
aBoolean
ifTrue: [ self resultsSelected copyWith: target ]
ifFalse: [ self resultsSelected copyWithout: target ]]
ifFalse: [
aBoolean
ifTrue: [IdentitySet new add: target; yourself]
ifFalse: [IdentitySet new]])].
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
accessing-results
resultsSelected: anIdentitySet

resultsSelected := anIdentitySet.
self changed: #resultAt:; changed: #browsable.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
accessing-results
resultsSelected

^ resultsSelected
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ accessing-results
selectAllResults

self isMultiSelectable ifTrue: [
resultsSelected := (self results select: [:each | each hasDetails]) asIdentitySet.
self resultsSelected: (self results select: [:each | each hasDetails]) asIdentitySet.
self changed: #resultSelected; update.]
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ selectNoResults
"Fixed to update all selections now that the
selection invalidation has been optimised."

resultsSelected := IdentitySet new.
self resultsSelected: IdentitySet new.
self changed: #resultSelected; update.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ selectorEnvironmentForResults
ifAbsent: [Smalltalk at: #RBSelectorEnvironment]) new.
selectedTests := Set new.

resultsSelected do: [ :result |
self resultsSelected do: [ :result |
result hasDetails ifTrue: [
result isSummary
ifTrue: [self addSummaryResult: result toEnvironment: environment]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ updating
updateResults

results := self findResults.
resultsSelected := resultsSelected select: [ :each | self results includes: each ].
self resultsSelected: (self resultsSelected select: [ :each | self results includes: each ]).
self resultSelected: 0.
self changed: #resultList; changed: #results; changed: #resultSelected.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"addSummaryResult:toEnvironment:" : "ct 12/22/2024 02:16",
"addSummaryResult:toMessageList:" : "ct 12/19/2024 20:18",
"addSystemSummaryResult:toMessageList:" : "ct 12/19/2024 20:18",
"browsable" : "NA 7/15/2015 16:11",
"browsable" : "ct 12/22/2024 04:40",
"browseSelection" : "NA 7/2/2015 14:39",
"buildListFrom:" : "NA 7/29/2015 18:16",
"buildOverviewPyramidWith:" : "ct 12/21/2024 20:03",
Expand Down Expand Up @@ -47,13 +47,13 @@
"initializeInstanceVariables" : "NA 7/30/2015 16:33",
"isMultiSelectable" : "NA 7/30/2015 14:43",
"isOrderedByTests" : "NA 7/30/2015 14:43",
"messageListForResults" : "NA 7/16/2015 10:45",
"messageListForResults" : "ct 12/22/2024 04:40",
"onEnvironment:" : "BD 7/13/2018 11:43",
"orderButtonString" : "NA 7/30/2015 14:45",
"orderBySymbol" : "NA 7/2/2015 13:27",
"overviewPyramidScrollPaneName" : "NH 7/22/2015 14:04",
"resultAt:" : "NA 7/2/2015 13:45",
"resultAt:put:" : "BD 7/13/2018 11:50",
"resultAt:" : "ct 12/22/2024 04:40",
"resultAt:put:" : "ct 12/22/2024 05:01",
"resultDialogLabelFor:" : "NA 7/15/2015 16:17",
"resultList" : "NH 7/8/2015 10:06",
"resultMenu:" : "NA 7/2/2015 18:29",
Expand All @@ -62,12 +62,14 @@
"results" : "BD 7/13/2018 11:44",
"resultsBrowserForSelection" : "NA 7/2/2015 14:30",
"resultsFrame" : "BD 6/29/2018 12:54",
"resultsSelected" : "ct 12/22/2024 04:39",
"resultsSelected:" : "ct 12/22/2024 04:56",
"run" : "BD 6/29/2018 12:58",
"runnable" : "NA 7/1/2015 14:38",
"selectAllResults" : "NA 7/16/2015 12:46",
"selectNoResults" : "NA 7/16/2015 12:47",
"selectAllResults" : "ct 12/22/2024 04:40",
"selectNoResults" : "ct 12/22/2024 04:40",
"selectionButtonString" : "NA 7/30/2015 14:46",
"selectorEnvironmentForResults" : "BD 7/13/2018 11:51",
"selectorEnvironmentForResults" : "ct 12/22/2024 04:40",
"testCategoriesBottom" : "NA 7/1/2015 11:44",
"testCategoriesSelected:" : "ct 12/22/2024 01:35",
"testsFrame" : "BD 6/29/2018 12:54",
Expand All @@ -76,5 +78,5 @@
"toggleResultView" : "ct 12/21/2024 18:59",
"toggleSelection" : "NA 7/2/2015 10:13",
"update" : "NA 7/21/2015 16:31",
"updateResults" : "ct 12/21/2024 18:59",
"updateResults" : "ct 12/22/2024 04:41",
"windowTitle" : "TS 7/8/2015 12:00" } }
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
testing
isResultListDummy

^ true
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@
"format:" : "NA 7/28/2015 12:13",
"hash" : "NA 7/2/2015 14:28",
"icon" : "NA 7/16/2015 18:13",
"isResultListDummy" : "ct 12/22/2024 04:42",
"noResultText" : "AT 5/22/2008 15:23",
"result" : "AT 5/8/2008 10:09" } }

0 comments on commit a53150f

Please sign in to comment.