Skip to content

Commit

Permalink
dialogs: fix browse-it/senders/implementors by not overriding #enviro…
Browse files Browse the repository at this point in the history
…nment
  • Loading branch information
LinqLover committed Dec 22, 2024
1 parent a53150f commit faeecde
Show file tree
Hide file tree
Showing 29 changed files with 55 additions and 65 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
accessing-categories
categories

^ self environment classCategories
^ self testEnvironment classCategories
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ categoryAt: anInteger put: aBoolean
ifTrue: [ self categoriesSelected copyWith: target ]
ifFalse: [ self categoriesSelected copyWithout: target ]]
ifFalse: [| categoryList package |
package := self environment packageForCategory: target.
package := self testEnvironment packageForCategory: target.
categoryList := self getCategoriesFor: package.
aBoolean
ifTrue: [ self categoriesSelected, categoryList ]
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ updating
findTestsForSelectedTestCategories
| items |
self testCategoriesSelected ifEmpty: [ ^ OrderedCollection new ].
items := self testCategoriesSelected gather: [ :category | self environment testsAtCategory: category ].
items := self testCategoriesSelected gather: [ :category | self testEnvironment testsAtCategory: category ].
^ items asOrderedCollection
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
initialization
onEnvironment: aSLEnvironment

self removeDependent: environment.
environment := aSLEnvironment.
self addDependent: environment.
self testEnvironment: aSLEnvironment.
self update.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ actions
run

self runnable ifFalse: [^ self].
self environment selectedTests: self testsSelected.
self environment selectedClasses: self classesSelected.
self testEnvironment selectedTests: self testsSelected.
self testEnvironment selectedClasses: self classesSelected.
SLResultDialog onEnvironment:
(SLTestRunner onEnvironment: self environment).
(SLTestRunner onEnvironment: self testEnvironment).
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
accessing-testCategories
testCategories

^ self environment testCategories
^ self testEnvironment testCategories
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
accessing
testEnvironment: aSLEnvironment

self removeDependent: environment.
environment := aSLEnvironment.
self addDependent: environment.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
accessing
environment
testEnvironment

^ environment
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
updating
update: aspect

aspect == self environment ifTrue:
aspect == self testEnvironment ifTrue:
[self update].
^ super update: aspect
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"buttonsOffsetTop" : "BD 6/29/2018 11:58",
"buttonsRight" : "NA 6/30/2015 22:39",
"buttonsTop" : "NA 6/30/2015 22:39",
"categories" : "NA 7/14/2015 11:57",
"categories" : "ct 12/22/2024 05:06",
"categoriesFrame" : "BD 6/29/2018 12:49",
"categoriesLeft" : "NA 6/30/2015 22:46",
"categoriesOffsetBottom" : "BD 6/29/2018 11:58",
Expand All @@ -40,7 +40,7 @@
"categoriesSelected:" : "ct 12/17/2024 21:37",
"categoriesTop" : "NA 6/30/2015 22:48",
"categoryAt:" : "ct 12/20/2024 00:10",
"categoryAt:put:" : "ct 12/20/2024 00:10",
"categoryAt:put:" : "ct 12/22/2024 05:06",
"categoryList" : "NA 7/14/2015 11:57",
"categoryMenu:" : "BD 6/29/2018 14:27",
"categorySelected" : "NA 6/30/2015 11:43",
Expand All @@ -60,26 +60,24 @@
"close" : "NA 7/17/2015 00:35",
"defaultBackgroundColor" : "NA 6/30/2015 11:58",
"descriptionFrame" : "BD 6/29/2018 12:49",
"environment" : "NA 7/14/2015 10:56",
"environment:" : "NA 7/14/2015 10:55",
"filterCategories" : "ct 12/20/2024 00:14",
"filterClasses" : "ct 12/20/2024 00:14",
"filterTestCategories" : "ct 12/13/2024 05:32",
"filterTests" : "ct 12/20/2024 00:15",
"findClassesForSelectedCategories" : "ct 12/20/2024 00:10",
"findTestsForSelectedTestCategories" : "ct 12/20/2024 00:14",
"findTestsForSelectedTestCategories" : "ct 12/22/2024 05:06",
"getCategoriesFor:" : "NA 7/17/2015 01:04",
"initialExtent" : "BD 6/17/2018 21:14",
"initialize" : "BD 7/13/2018 11:40",
"initializeInstanceVariables" : "ct 12/13/2024 05:48",
"loadFastTests" : "BD 6/29/2018 15:57",
"loadFullTests" : "BD 6/29/2018 15:48",
"loadSelectionTests" : "BD 6/29/2018 15:19",
"onEnvironment:" : "ct 12/13/2024 00:59",
"onEnvironment:" : "ct 12/22/2024 05:05",
"open" : "NA 6/30/2015 11:55",
"openConfigureDialog" : "NA 7/14/2015 11:43",
"perform:orSendTo:" : "NA 7/2/2015 18:29",
"run" : "ct 12/20/2024 00:16",
"run" : "ct 12/22/2024 05:06",
"runnable" : "ct 12/20/2024 00:16",
"saveSelectionTests" : "BD 6/29/2018 15:19",
"selectAllCategories" : "ct 12/13/2024 05:29",
Expand All @@ -98,7 +96,7 @@
"selectString" : "NA 7/17/2015 00:51",
"testAt:" : "ct 12/20/2024 00:09",
"testAt:put:" : "ct 12/20/2024 00:15",
"testCategories" : "NA 7/14/2015 10:57",
"testCategories" : "ct 12/22/2024 05:06",
"testCategoriesBottom" : "BD 6/21/2018 16:29",
"testCategoriesFrame" : "BD 6/29/2018 12:49",
"testCategoriesRight" : "NA 6/30/2015 23:00",
Expand All @@ -112,6 +110,8 @@
"testCategorySelected" : "NA 6/30/2015 11:52",
"testCategorySelected:" : "NA 6/30/2015 11:52",
"testDescription" : "ct 12/19/2024 20:22",
"testEnvironment" : "ct 12/22/2024 05:04",
"testEnvironment:" : "ct 12/22/2024 05:05",
"testList" : "ct 12/20/2024 00:15",
"testMenu:shifted:" : "ct 12/20/2024 02:23",
"testSelected" : "NA 6/30/2015 13:57",
Expand All @@ -123,7 +123,7 @@
"testsSelected:" : "ct 12/17/2024 21:37",
"toggleCategorySelectionMethod" : "NA 7/17/2015 00:49",
"update" : "fm 6/29/2018 03:24",
"update:" : "ct 12/13/2024 01:01",
"update:" : "ct 12/22/2024 05:06",
"updateCategories" : "ct 12/20/2024 00:10",
"updateClasses" : "ct 12/20/2024 00:13",
"updateTestCategories" : "ct 12/20/2024 00:14",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ categoryAt: anInteger put: aBoolean
ifTrue: [ self categoriesSelected copyWith: target ]
ifFalse: [ self categoriesSelected copyWithout: target ]]
ifFalse: [| categoryList package |
package := self environment packageForCategory: (target testObject).
package := self testEnvironment packageForCategory: (target testObject).
categoryList := (self getCategoriesFor: package) select: [ :each | self categories includes: each].
aBoolean
ifTrue: [ self categoriesSelected, categoryList ]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ fetchAllTestObjects
"Fetches System- and CategoryTestObjects as well as all selected ClassTestObjects "
| allTestObjects |
allTestObjects := OrderedCollection new
addAll: (self environment testSystem children);
add: (self environment testSystem);
addAll: (self testEnvironment testSystem children);
add: (self testEnvironment testSystem);
yourself.
classesSelected do: [ :each | allTestObjects addAll: (self fetchChildTestObjectsFrom: each)].
self classesSelected do: [ :each | allTestObjects addAll: (self fetchChildTestObjectsFrom: each)].

^ allTestObjects
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ findClassesForSelectedCategories
items := self categoriesSelected gather: [ :category |
((Smalltalk organization listAtCategoryNamed: (category name))
collect: [ :each | Smalltalk at: each ])].
chosenClasses := self environment classes.
chosenClasses := self testEnvironment classes.
chosenClasses := chosenClasses select: [:each | items includes: each testObject].

^ chosenClasses
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ findResults
allTestObjects := self fetchAllTestObjects.
resultsDict := Dictionary new.

self environment results do: [ :each |
self testEnvironment results do: [ :each |
((allTestObjects includes: (each testObject))
and: [self testsSelected anySatisfy: [ :testData | testData symbol = each testData symbol]])
ifTrue: [self addEntry: each to: resultsDict]].
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ findTestsForSelectedTestCategories

| items chosenTests |
self testCategoriesSelected ifEmpty: [ ^ OrderedCollection new ].
chosenTests := self environment ifNil: [Set new] ifNotNil: [self environment tests].
items := self testCategoriesSelected gather: [ :category | self environment testsAtCategory: category ].
chosenTests := self testEnvironment ifNil: [Set new] ifNotNil: [self testEnvironment tests].
items := self testCategoriesSelected gather: [ :category | self testEnvironment testsAtCategory: category ].
items := items select: [ :each | (chosenTests collect: [ :test | test format]) includes: each format ].

^ items asOrderedCollection
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ resultDialogLabelFor: aSet
^ (aSet size > 1
ifTrue: ['Issues for selected tests on selected objects']
ifFalse: ['Issues for "', aSet anyOne name, '" on selected objects']),
' (', self environment timeString, ')'
' (', self testEnvironment timeString, ')'
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ run

self runnable ifFalse: [^ self].
self class onEnvironment:
(SLTestRunner onEnvironment: self environment).
(SLTestRunner onEnvironment: self testEnvironment).
self close.
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ selectorEnvironmentForResults
ifFalse: [self addResult: result toEnvironment: environment].
selectedTests add: result testData]].

environment label: ((self resultDialogLabelFor: selectedTests), ' (', self environment timeString, ')').
environment label: ((self resultDialogLabelFor: selectedTests), ' (', self testEnvironment timeString, ')').
^ environment
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,18 @@
"buttons" : "NA 7/31/2015 13:49",
"categoriesBottom" : "NA 7/1/2015 11:44",
"categoriesFrame" : "BD 6/29/2018 12:53",
"categoryAt:put:" : "ct 12/20/2024 00:11",
"categoryAt:put:" : "ct 12/22/2024 05:06",
"categoryList" : "NA 7/14/2015 11:56",
"changeResultOrdering" : "BD 7/13/2018 11:49",
"changeSelection" : "NA 7/2/2015 10:14",
"classAt:put:" : "NA 7/2/2015 19:29",
"classList" : "NA 7/15/2015 11:18",
"classesFrame" : "BD 6/29/2018 12:53",
"fetchAllTestObjects" : "NA 7/30/2015 13:21",
"fetchAllTestObjects" : "ct 12/22/2024 05:06",
"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",
"findClassesForSelectedCategories" : "ct 12/22/2024 05:07",
"findResults" : "ct 12/22/2024 05:07",
"findTestsForSelectedTestCategories" : "ct 12/22/2024 05:08",
"getCategoriesFor:" : "NA 7/21/2015 15:40",
"getOverviewPyramidResults" : "ct 12/20/2024 02:36",
"iconAt:" : "NA 7/16/2015 18:11",
Expand All @@ -54,7 +54,7 @@
"overviewPyramidScrollPaneName" : "NH 7/22/2015 14:04",
"resultAt:" : "ct 12/22/2024 04:40",
"resultAt:put:" : "ct 12/22/2024 05:01",
"resultDialogLabelFor:" : "NA 7/15/2015 16:17",
"resultDialogLabelFor:" : "ct 12/22/2024 05:07",
"resultList" : "NH 7/8/2015 10:06",
"resultMenu:" : "NA 7/2/2015 18:29",
"resultSelected" : "ct 12/21/2024 18:58",
Expand All @@ -64,12 +64,12 @@
"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",
"run" : "ct 12/22/2024 05:07",
"runnable" : "NA 7/1/2015 14:38",
"selectAllResults" : "ct 12/22/2024 04:40",
"selectNoResults" : "ct 12/22/2024 04:40",
"selectionButtonString" : "NA 7/30/2015 14:46",
"selectorEnvironmentForResults" : "ct 12/22/2024 04:40",
"selectorEnvironmentForResults" : "ct 12/22/2024 05:07",
"testCategoriesBottom" : "NA 7/1/2015 11:44",
"testCategoriesSelected:" : "ct 12/22/2024 01:35",
"testsFrame" : "BD 6/29/2018 12:54",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ close

self
lintingEnabled: false;
environment: nil;
testEnvironment: nil;
classesSelected: nil;
testsSelected: nil.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
private
createEnvironment

self environment: SLDefaultEnvironment new.
self testEnvironment: SLDefaultEnvironment new.
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
actions
run

self environment
self testEnvironment
selectedTests: self testsSelected;
selectedClasses: self classesSelected.

self resultDialog: (SLResultDialog onEnvironmentWithoutOpening:
(SLTestRunner onEnvironment: self environment)).
(SLTestRunner onEnvironment: self testEnvironment)).

self changed: #resultCountLabel.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
accessing
environment: anObject
testEnvironment: anObject

environment := anObject
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
accessing
environment
testEnvironment

^ environment
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,8 @@
"callingWindow:" : "BD 7/3/2018 12:15",
"classesSelected" : "LS 6/29/2018 16:15",
"classesSelected:" : "LS 6/29/2018 16:15",
"close" : "BD 7/6/2018 10:51",
"createEnvironment" : "BD 7/6/2018 11:21",
"environment" : "BD 7/6/2018 11:21",
"environment:" : "BD 7/6/2018 10:36",
"close" : "ct 12/22/2024 05:08",
"createEnvironment" : "ct 12/22/2024 05:09",
"initialExtent" : "BD 7/6/2018 11:16",
"initialize" : "BD 7/13/2018 10:35",
"lintingEnabled" : "BD 7/6/2018 09:42",
Expand All @@ -37,7 +35,9 @@
"resultDialog" : "BD 7/1/2018 12:23",
"resultDialog:" : "BD 7/3/2018 12:18",
"resultsFrame" : "BD 7/3/2018 12:17",
"run" : "BD 7/25/2018 16:19",
"run" : "ct 12/22/2024 05:08",
"testEnvironment" : "ct 12/22/2024 05:05",
"testEnvironment:" : "ct 12/22/2024 05:05",
"testsSelected" : "LS 6/29/2018 16:15",
"testsSelected:" : "LS 6/29/2018 16:15",
"toOverview" : "ct 12/20/2024 00:19",
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
"addTestToSelection:" : "AT 5/27/2008 19:02",
"addTestToSelection:inCategory:" : "AT 5/27/2008 19:02",
"dataFromEnvironment:" : "topa 2/7/2008 21:15",
"environment" : "NH 7/15/2015 23:55",
"environment:" : "NH 7/15/2015 23:55",
"hideTest:" : "AT 5/27/2008 19:15",
"initialize" : "JTM 7/29/2015 22:53",
"initializeTestDictionary" : "NH 7/15/2015 23:52",
Expand Down

0 comments on commit faeecde

Please sign in to comment.