-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix + refactor dialogs; reintroduce overview pyramid morph
* use #containingWindow instead of preserving toolbuilder outputs * fix multiselection by adding observer updates required in newer Squeak versions * use accessors for more variables * UIManager default -> Project uiManager * dump descriptionCollection
- Loading branch information
Showing
65 changed files
with
245 additions
and
261 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
packages/SwaLint-Core.package/SLDefaultDialog.class/instance/categoriesSelected..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
accessing | ||
categoriesSelected: aSet | ||
|
||
categoriesSelected := aSet. | ||
self changed: #categoriesSelected; updateClasses. |
4 changes: 4 additions & 0 deletions
4
packages/SwaLint-Core.package/SLDefaultDialog.class/instance/categoriesSelected.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
accessing | ||
categoriesSelected | ||
|
||
^ categoriesSelected |
3 changes: 2 additions & 1 deletion
3
packages/SwaLint-Core.package/SLDefaultDialog.class/instance/categoryAt..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
accessing-categories | ||
categoryAt: anIndex | ||
|
||
^ categoriesSelected includes: (self categories at: anIndex ifAbsent: [ ^ false ]) | ||
^ self categoriesSelected includes: | ||
(self categories at: anIndex ifAbsent: [ ^ false ]) |
23 changes: 12 additions & 11 deletions
23
packages/SwaLint-Core.package/SLDefaultDialog.class/instance/categoryAt.put..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,16 @@ | ||
accessing-categories | ||
categoryAt: anInteger put: aBoolean | ||
|
||
| target | | ||
target := self categories at: anInteger ifAbsent: [^ self]. | ||
self selectByCategory | ||
ifTrue: [categoriesSelected := aBoolean | ||
ifTrue: [ categoriesSelected copyWith: target ] | ||
ifFalse: [ categoriesSelected copyWithout: target ]] | ||
ifFalse: [| categoryList package | | ||
package := self environment packageForCategory: target. | ||
categoryList := self getCategoriesFor: package. | ||
categoriesSelected := aBoolean | ||
ifTrue: [ categoriesSelected, categoryList ] | ||
ifFalse: [ categoriesSelected copyWithoutAll: categoryList ]]. | ||
self changed: #categorySelected; updateClasses. | ||
self categoriesSelected: | ||
(self selectByCategory | ||
ifTrue: [aBoolean | ||
ifTrue: [ self categoriesSelected copyWith: target ] | ||
ifFalse: [ self categoriesSelected copyWithout: target ]] | ||
ifFalse: [| categoryList package | | ||
package := self environment packageForCategory: target. | ||
categoryList := self getCategoriesFor: package. | ||
aBoolean | ||
ifTrue: [ self categoriesSelected, categoryList ] | ||
ifFalse: [ self categoriesSelected copyWithoutAll: categoryList ]]). |
3 changes: 2 additions & 1 deletion
3
packages/SwaLint-Core.package/SLDefaultDialog.class/instance/classAt..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
accessing-classes | ||
classAt: anInteger | ||
|
||
^ classesSelected includes: (classes at: anInteger ifAbsent: [ ^ false ]) | ||
^ self classesSelected includes: | ||
(self classes at: anInteger ifAbsent: [ ^ false ]) |
10 changes: 6 additions & 4 deletions
10
packages/SwaLint-Core.package/SLDefaultDialog.class/instance/classAt.put..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
accessing-classes | ||
classAt: anInteger put: aBoolean | ||
|
||
classesSelected := classesSelected | ||
perform: (aBoolean ifTrue: [ #copyWith: ] ifFalse: [ #copyWithout: ]) | ||
with: (classes at: anInteger ifAbsent: [ ^ self ]). | ||
self changed: #classSelected; changed: #runnable. | ||
| target | | ||
target := self classes at: anInteger ifAbsent: [ ^ self ]. | ||
self classesSelected: | ||
(self classesSelected | ||
perform: (aBoolean ifTrue: [ #copyWith: ] ifFalse: [ #copyWithout: ]) | ||
with: target). |
4 changes: 4 additions & 0 deletions
4
packages/SwaLint-Core.package/SLDefaultDialog.class/instance/classesSelected.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
accessing | ||
classesSelected | ||
|
||
^ classesSelected |
17 changes: 9 additions & 8 deletions
17
packages/SwaLint-Core.package/SLDefaultDialog.class/instance/filterCategories.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,16 @@ | ||
accessing-categories | ||
filterCategories | ||
|
||
| pattern | | ||
pattern := UIManager default | ||
pattern := Project uiManager | ||
request: 'Pattern(s) to select categories:\ (separate patterns with '';'')' withCRs | ||
initialAnswer: (categoryPattern ifNil: ['*']). | ||
(pattern isNil or: [pattern isEmpty]) ifTrue: | ||
[^self]. | ||
categoriesSelected := ((categoryPattern := pattern) subStrings: ';') | ||
inject: Set new | ||
into: [:matches :subPattern| | ||
matches | ||
addAll: (self categories select: [ :each | subPattern match: each]); | ||
yourself]. | ||
self changed: #categorySelected; update. | ||
self categoriesSelected: | ||
(((categoryPattern := pattern) subStrings: ';') | ||
inject: Set new | ||
into: [:matches :subPattern| | ||
matches | ||
addAll: (self categories select: [ :each | subPattern match: each]); | ||
yourself]). |
21 changes: 10 additions & 11 deletions
21
packages/SwaLint-Core.package/SLDefaultDialog.class/instance/filterClasses.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,17 @@ | ||
accessing-classes | ||
filterClasses | ||
|
||
| pattern | | ||
pattern := UIManager default | ||
pattern := Project uiManager | ||
request: 'Pattern(s) to select tests:\ (separate patterns with '';'')' withCRs | ||
initialAnswer: (classPattern ifNil: ['*']). | ||
(pattern isNil or: [pattern isEmpty]) ifTrue: | ||
[^self]. | ||
classesSelected := ((classPattern := pattern) subStrings: ';') | ||
inject: Set new | ||
into: [:matches :subPattern| | ||
matches | ||
addAll: (classes select: [ :each | subPattern match: each name]); | ||
yourself]. | ||
self | ||
changed: #classSelected; | ||
changed: #runnable; | ||
update. | ||
self classesSelected: | ||
(((classPattern := pattern) subStrings: ';') | ||
inject: Set new | ||
into: [:matches :subPattern| | ||
matches | ||
addAll: (self classes select: [ :each | subPattern match: each name]); | ||
yourself]). | ||
self update. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 9 additions & 11 deletions
20
packages/SwaLint-Core.package/SLDefaultDialog.class/instance/filterTests.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,16 @@ | ||
accessing-test | ||
filterTests | ||
|
||
| pattern | | ||
pattern := UIManager default | ||
pattern := Project uiManager | ||
request: 'Pattern(s) to select tests:\ (separate patterns with '';'')' withCRs | ||
initialAnswer: (testPattern ifNil: ['*']). | ||
(pattern isNil or: [pattern isEmpty]) ifTrue: | ||
[^self]. | ||
testsSelected := ((testPattern := pattern) subStrings: ';') | ||
inject: Set new | ||
into: [:matches :subPattern| | ||
matches | ||
addAll: (tests select: [ :each | subPattern match: each name]); | ||
yourself]. | ||
self | ||
changed: #testSelected; | ||
changed: #runnable; | ||
update. | ||
self testsSelected: | ||
(((testPattern := pattern) subStrings: ';') | ||
inject: Set new | ||
into: [:matches :subPattern| | ||
matches | ||
addAll: (self tests select: [ :each | subPattern match: each name]); | ||
yourself]). |
4 changes: 2 additions & 2 deletions
4
...s/SwaLint-Core.package/SLDefaultDialog.class/instance/findClassesForSelectedCategories.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
updating | ||
findClassesForSelectedCategories | ||
| items | | ||
categoriesSelected isEmpty ifTrue: [ ^ OrderedCollection new ]. | ||
items := categoriesSelected gather: [ :category | | ||
self categoriesSelected isEmpty ifTrue: [ ^ OrderedCollection new ]. | ||
items := self categoriesSelected gather: [ :category | | ||
((Smalltalk organization listAtCategoryNamed: category) | ||
collect: [ :each | Smalltalk at: each ])]. | ||
^ items asOrderedCollection |
4 changes: 2 additions & 2 deletions
4
...SwaLint-Core.package/SLDefaultDialog.class/instance/findTestsForSelectedTestCategories.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
updating | ||
findTestsForSelectedTestCategories | ||
| items | | ||
testCategoriesSelected isEmpty ifTrue: [ ^ OrderedCollection new ]. | ||
items := testCategoriesSelected gather: [ :category | environment testsAtCategory: category ]. | ||
self testCategoriesSelected ifEmpty: [ ^ OrderedCollection new ]. | ||
items := self testCategoriesSelected gather: [ :category | self environment testsAtCategory: category ]. | ||
^ items asOrderedCollection |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
packages/SwaLint-Core.package/SLDefaultDialog.class/instance/runnable.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
actions | ||
runnable | ||
|
||
^ classesSelected notEmpty and: [testsSelected notEmpty] | ||
^ self classesSelected notEmpty and: [self testsSelected notEmpty] |
3 changes: 1 addition & 2 deletions
3
packages/SwaLint-Core.package/SLDefaultDialog.class/instance/selectAllCategories.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
accessing-categories | ||
selectAllCategories | ||
|
||
categoriesSelected := self categories asSet. | ||
self changed: #categorySelected; update. | ||
self categoriesSelected: self categories asSet. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 1 addition & 2 deletions
3
packages/SwaLint-Core.package/SLDefaultDialog.class/instance/selectAllTestCategories.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
accessing-testCategories | ||
selectAllTestCategories | ||
|
||
testCategoriesSelected := self testCategories asSet. | ||
self changed: #testCategorySelected; update. | ||
self testCategoriesSelected: self testCategories asSet. |
8 changes: 1 addition & 7 deletions
8
packages/SwaLint-Core.package/SLDefaultDialog.class/instance/selectAllTests.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,4 @@ | ||
accessing-test | ||
selectAllTests | ||
"Fixed to update all selections now that the | ||
selection invalidation has been optimised." | ||
|
||
testsSelected := tests asSet. | ||
self | ||
changed: #testSelected; | ||
changed: #runnable; | ||
update. | ||
self testsSelected: self tests asSet. |
9 changes: 5 additions & 4 deletions
9
packages/SwaLint-Core.package/SLDefaultDialog.class/instance/selectInverseCategories.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
accessing-categories | ||
selectInverseCategories | ||
|
||
categoriesSelected := self categories asSet | ||
removeAll: categoriesSelected; | ||
yourself. | ||
self changed: #allSelections; changed: #categorySelected; update. | ||
self categoriesSelected: | ||
(self categories asSet | ||
removeAll: self categoriesSelected; | ||
yourself). | ||
self changed: #allSelections. |
16 changes: 6 additions & 10 deletions
16
packages/SwaLint-Core.package/SLDefaultDialog.class/instance/selectInverseClasses.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,8 @@ | ||
accessing-classes | ||
selectInverseClasses | ||
"Fixed to update all selections now that the | ||
selection invalidation has been optimised." | ||
|
||
classesSelected := classes asSet | ||
removeAll: classesSelected; | ||
yourself. | ||
self | ||
changed: #classSelected; | ||
changed: #runnable; | ||
update. | ||
|
||
self classesSelected: | ||
(self classes asSet | ||
removeAll: classesSelected; | ||
yourself). | ||
self update. |
8 changes: 4 additions & 4 deletions
8
packages/SwaLint-Core.package/SLDefaultDialog.class/instance/selectInverseTestCategories.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
accessing-testCategories | ||
selectInverseTestCategories | ||
|
||
testCategoriesSelected := self testCategories asSet | ||
removeAll: testCategoriesSelected; | ||
yourself. | ||
self changed: #testCategorySelected; update. | ||
self testCategoriesSelected: | ||
(self testCategories asSet | ||
removeAll: self testCategoriesSelected; | ||
yourself). |
16 changes: 4 additions & 12 deletions
16
packages/SwaLint-Core.package/SLDefaultDialog.class/instance/selectInverseTests.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,7 @@ | ||
accessing-test | ||
selectInverseTests | ||
"Fixed to update all selections now that the | ||
selection invalidation has been optimised." | ||
|
||
testsSelected := tests asSet | ||
removeAll: testsSelected; | ||
yourself. | ||
descriptionCollection := OrderedCollection new | ||
addAll: testsSelected; | ||
yourself. | ||
self | ||
changed: #testSelected; | ||
changed: #runnable; | ||
update. | ||
self testsSelected: | ||
(self tests asSet | ||
removeAll: self testsSelected; | ||
yourself). |
4 changes: 2 additions & 2 deletions
4
packages/SwaLint-Core.package/SLDefaultDialog.class/instance/selectNoCategories.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
accessing-categories | ||
selectNoCategories | ||
|
||
categoriesSelected := Set new. | ||
self changed: #allSelections; changed: #categorySelected; update. | ||
self categoriesSelected: Set new. | ||
self changed: #allSelections. |
3 changes: 1 addition & 2 deletions
3
packages/SwaLint-Core.package/SLDefaultDialog.class/instance/selectNoTestCategories.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
accessing-testCategories | ||
selectNoTestCategories | ||
|
||
testCategoriesSelected := Set new. | ||
self changed: #testCategorySelected; update. | ||
self testCategoriesSelected: Set new. |
Oops, something went wrong.