Skip to content

Commit

Permalink
result dialog: refactor overview pyramid integration, add pane splitt…
Browse files Browse the repository at this point in the history
…er, fix result selection
  • Loading branch information
LinqLover committed Dec 21, 2024
1 parent 1290f1e commit 2749605
Show file tree
Hide file tree
Showing 26 changed files with 75 additions and 111 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*SwaLint-Core-UserInterface
*SwaLint-Core-UserInterface-override
buildPluggableMultiSelectionList: aSpec
| widget listClass |
aSpec getSelected ifNotNil:[^self error:'There is no PluggableListMorphOfManyByItem'].
Expand All @@ -17,6 +17,9 @@ buildPluggableMultiSelectionList: aSpec
widget getIconSelector: aSpec icon.
self buildHelpFor: widget spec: aSpec.
self setFrame: aSpec frame in: widget.
self setLayoutHintsFor: widget spec: aSpec.
aSpec itemAlignment ifNotNil: [:alignment | widget listMorph cellPositioning: alignment].
aSpec itemPadding ifNotNil: [:padding | widget listMorph cellInset: padding].
parent ifNotNil:[self add: widget to: parent].
panes ifNotNil:[
aSpec list ifNotNil:[panes add: aSpec list].
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
"class" : {
},
"instance" : {
"buildPluggableMultiSelectionList:" : "NA 7/21/2015 11:16" } }
"buildPluggableMultiSelectionList:" : "ct 12/21/2024 18:45" } }
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
initialization
asContainer

^ self asContainerWithPadding: 5 px
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
initialization
asContainerWithPadding: padding

| container |
container := Morph new
beTransparent;
extent: (self fullBounds; extent) + (padding * 2);
addMorph: self;
yourself.
self position: padding.
^ container
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
"addCalcMorphWith:to:at:" : "NA 7/31/2015 22:03",
"addNameMorphWith:to:at:" : "NA 7/31/2015 21:41",
"addResultMorphWith:to:at:" : "NA 7/31/2015 21:41",
"asContainer" : "ct 12/21/2024 20:06",
"asContainerWithPadding:" : "ct 12/21/2024 20:06",
"borderWidth" : "ct 12/21/2024 18:18",
"buildDictionary" : "ct 12/21/2024 18:18",
"buildEntries" : "BD 6/29/2018 12:32",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
building
buildOverviewPyramidWith: aBuilder

| overviewResults pyramid |
overviewResults := self getOverviewPyramidResults ifNil: [^ nil].
pyramid := OverviewPyramidMorph newWithResults: overviewResults.

^ aBuilder pluggableScrollPaneSpec new
name: self overviewPyramidScrollPaneName;
morph: (pyramid asContainerWithPadding: 20 px);
yourself
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,7 @@ buildResultsListForMorphicWith: aBuilder
^ aBuilder pluggablePanelSpec new
name: #resultsPanel;
frame: self resultsFrame;
children: ({
aBuilder pluggableScrollPaneSpec new
name: self overviewPyramidScrollPaneName;
frame: (self overviewPyramidScrollFrame);
children: ({
aBuilder pluggablePanelSpec new
name: self resultsPanelName;
frame: (self overviewPyramidFrame);
yourself.});
yourself.
"in background"
(self buildResultsListWith: aBuilder)
frame: self resultsFrameInPanel;
yourself});
wantsResizeHandles: true;
model: self;
children: #buildResultsListMorphs;
yourself
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
building
buildResultsListMorphs

| builder specs |
builder := Project uiManager toolBuilder.
specs := self buildResultsListMorphsWith: builder.
specs withIndexDo: [:spec :index |
spec frame:
(LayoutFrame fullFrame
leftFraction: index - 1 / specs size;
rightFraction: index / specs size;
yourself)].
^ specs collect: [:each | each buildWith: builder]
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
building
buildResultsListMorphsWith: aBuilder

^ Array streamContents: [:stream |
stream nextPut:
(self buildResultsListWith: aBuilder).
self isOrderedByTests ifFalse: [
(self buildOverviewPyramidWith: aBuilder) ifNotNil: [:pyramid |
stream nextPut: pyramid]]]
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
building
buildWith: aBuilder
| window tool |

| window |
window := self buildWindowWith: aBuilder specs:{
self buttonsFrame -> [self buildButtonsWith: aBuilder].
self categoriesFrame -> [self buildCategoriesWith: aBuilder].
Expand All @@ -9,8 +10,4 @@ buildWith: aBuilder
self testsFrame -> [self buildTestListWith: aBuilder].
self resultsFrame -> [self buildResultsWith: aBuilder]}.

tool := aBuilder build: window.

Smalltalk isMorphic
ifTrue: [ self createOverviewPyramidMorph: tool ].
^ tool
^ aBuilder build: window

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
accessing-results
resultSelected: anInteger

resultIndex := anInteger.
self changed: #resultSelected; changed: #browsable.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
accessing-results
resultSelected

^ 0
^ resultIndex

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
accessing
toggleResultView

(Smalltalk isMorphic and: self overviewPyramidIsSelected and: self isOrderedByTests not)
ifTrue: [ self showOverviewPyramid ]
ifFalse: [ self hideOverviewPyramid ].
self changed: #buildResultsListMorphs.
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ updateResults

results := self findResults.
resultsSelected := 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 @@ -19,10 +19,13 @@
"browsable" : "NA 7/15/2015 16:11",
"browseSelection" : "NA 7/2/2015 14:39",
"buildListFrom:" : "NA 7/29/2015 18:16",
"buildResultsListForMorphicWith:" : "ct 12/20/2024 01:11",
"buildOverviewPyramidWith:" : "ct 12/21/2024 20:03",
"buildResultsListForMorphicWith:" : "ct 12/21/2024 19:32",
"buildResultsListMorphs" : "ct 12/21/2024 19:39",
"buildResultsListMorphsWith:" : "ct 12/21/2024 19:35",
"buildResultsListWith:" : "NH 7/22/2015 10:28",
"buildResultsWith:" : "NA 7/31/2015 20:37",
"buildWith:" : "ct 12/20/2024 00:57",
"buildWith:" : "ct 12/21/2024 20:13",
"buttons" : "NA 7/31/2015 13:49",
"categoriesBottom" : "NA 7/1/2015 11:44",
"categoriesFrame" : "BD 6/29/2018 12:53",
Expand All @@ -33,16 +36,13 @@
"classAt:put:" : "NA 7/2/2015 19:29",
"classList" : "NA 7/15/2015 11:18",
"classesFrame" : "BD 6/29/2018 12:53",
"createOverviewPyramidMorph:" : "BD 6/29/2018 12:21",
"createOverviewPyramidMorphWith:and:" : "ct 12/20/2024 00:59",
"fetchAllTestObjects" : "NA 7/30/2015 13:21",
"fetchChildTestObjectsFrom:" : "BD 7/13/2018 11:50",
"findClassesForSelectedCategories" : "ct 12/20/2024 00:11",
"findResults" : "ct 12/20/2024 00:16",
"findTestsForSelectedTestCategories" : "ct 12/20/2024 00:15",
"getCategoriesFor:" : "NA 7/21/2015 15:40",
"getOverviewPyramidResults" : "ct 12/20/2024 02:36",
"hideOverviewPyramid" : "ct 12/20/2024 03:08",
"iconAt:" : "NA 7/16/2015 18:11",
"initializeInstanceVariables" : "NA 7/30/2015 16:33",
"isMultiSelectable" : "NA 7/30/2015 14:43",
Expand All @@ -51,37 +51,30 @@
"onEnvironment:" : "BD 7/13/2018 11:43",
"orderButtonString" : "NA 7/30/2015 14:45",
"orderBySymbol" : "NA 7/2/2015 13:27",
"overviewPyramidFrame" : "BD 6/29/2018 12:54",
"overviewPyramidIsSelected" : "ct 12/20/2024 00:16",
"overviewPyramidScrollFrame" : "BD 7/13/2018 11:42",
"overviewPyramidScrollPaneName" : "NH 7/22/2015 14:04",
"resultAt:" : "NA 7/2/2015 13:45",
"resultAt:put:" : "BD 7/13/2018 11:50",
"resultDialogLabelFor:" : "NA 7/15/2015 16:17",
"resultList" : "NH 7/8/2015 10:06",
"resultMenu:" : "NA 7/2/2015 18:29",
"resultPanel" : "ct 12/20/2024 01:03",
"resultSelected" : "BD 7/13/2018 11:42",
"resultSelected:" : "NA 7/16/2015 12:48",
"resultSelected" : "ct 12/21/2024 18:58",
"resultSelected:" : "ct 12/21/2024 18:58",
"results" : "BD 7/13/2018 11:44",
"resultsBrowserForSelection" : "NA 7/2/2015 14:30",
"resultsFrame" : "BD 6/29/2018 12:54",
"resultsFrameInPanel" : "BD 6/29/2018 12:54",
"resultsPanelName" : "TS 7/8/2015 11:59",
"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",
"selectionButtonString" : "NA 7/30/2015 14:46",
"selectorEnvironmentForResults" : "BD 7/13/2018 11:51",
"showOverviewPyramid" : "ct 12/20/2024 03:09",
"testAt:put:" : "NA 7/2/2015 19:29",
"testCategoriesBottom" : "NA 7/1/2015 11:44",
"testCategoryAt:put:" : "NA 7/2/2015 19:30",
"testsFrame" : "BD 6/29/2018 12:54",
"toggleResultOrdering" : "NA 7/2/2015 10:13",
"toggleResultView" : "NH 7/22/2015 12:09",
"toggleResultView" : "ct 12/21/2024 18:59",
"toggleSelection" : "NA 7/2/2015 10:13",
"update" : "NA 7/21/2015 16:31",
"updateResults" : "NA 7/30/2015 14:41",
"updateResults" : "ct 12/21/2024 18:59",
"windowTitle" : "TS 7/8/2015 12:00" } }
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"isOrderedByTests",
"results",
"resultsSelected",
"overviewpyramidMorph" ],
"resultIndex" ],
"name" : "SLResultDialog",
"pools" : [
],
Expand Down

0 comments on commit 2749605

Please sign in to comment.