Skip to content

Commit

Permalink
browser: refactor aspectDependencies, accelerate class list in target…
Browse files Browse the repository at this point in the history
… chooser
  • Loading branch information
LinqLover committed Dec 22, 2024
1 parent 7b98533 commit d943b5e
Show file tree
Hide file tree
Showing 26 changed files with 77 additions and 52 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
*SwaLintBrowser-UI-sorting
sl2SortedByHeavy: propertyBlock

^ ((self collect: [:ea | ea -> (propertyBlock value: ea)])
sorted: [:assoc | assoc value] asSortFunction)
collect: [:assoc | assoc key]
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"class" : {
},
"instance" : {
"sl2SortedByHeavy:" : "ct 12/22/2024 00:52" } }
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
{
"name" : "Collection" }
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
updating-private
allAspectDependencies

^ self pragmaAspectDependencies , self aspectDependencies
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
updating
aspectDependencies

^ Dictionary new
"Model"
at: #windowTitle put: #(#labelString);
yourself
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
updating
updating-private
dependentAspectsOn: aspect

self flag: #todo. "Detect cyclic dependencies!"
^ self aspectDependencies associations
^ self allAspectDependencies associations
select: [:assoc |
assoc value isString ifTrue: [
self notify: 'You probably missed an array here!' "aid for stupid devs"].
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
updating-private
pragmaAspectDependencies

^ (Pragma allNamed: #uses: from: self class to: thisContext methodClass)
collect: [:pragma |
| uses |
uses := pragma argumentAt: 1.
uses isSymbol ifTrue: [uses := {uses}].
pragma selector -> uses]
as: Dictionary
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"class" : {
},
"instance" : {
"allAspectDependencies" : "ct 12/22/2024 01:09",
"aspectDependencies" : "ct 12/22/2024 01:00",
"changed:" : "ct 2/8/2022 14:49",
"changedDependent:" : "ct 2/8/2022 14:49",
"dependentAspectsOn:" : "ct 12/22/2024 01:15",
"pragmaAspectDependencies" : "ct 12/22/2024 01:09" } }
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"category" : "SwaLintBrowser-UI",
"commentStamp" : "",
"name" : "SL2AspectDependencyGraph0" }

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
accessing - toolbuilder
availableClasses
<uses: #selectedSystemCategories>

^ (self selectedSystemCategories gather: [:category | self classesInSystemCategory: category])
sorted: #name ascending
^ self cached:
[(self selectedSystemCategories gather: [:category | self classesInSystemCategory: category])
sl2SortedByHeavy: #name]
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
private
cached: aBlock

^ caches at: aBlock method ifAbsentPut: aBlock
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,9 @@ changed: aspect

super changed: aspect.

caches keys do: [:key |
((self pragmaAspectDependencies at: key selector) includes: aspect) ifTrue:
[caches removeKey: key]].

(self dependentAspectsOn: aspect)
do: [:dependentAspect | self changedDependent: dependentAspect].
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
accessing
hasClassSelected: aClass
<uses: #selectedClasses>

^ self selectedClasses includes: aClass
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
accessing - toolbuilder
hasClassSelectedAt: anInteger
<uses: #hasClassSelected:>

^ self hasClassSelected: (self availableClasses at: anInteger)
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
accessing
hasSystemCategorySelected: category
<uses: #selectedSystemCategories>

^ self selectedSystemCategories includes: category
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
accessing - toolbuilder
hasSystemCategorySelectedAt: anInteger
<uses: #hasSystemCategorySelected:>

^ self hasSystemCategorySelected: (self availableSystemCategories at: anInteger)
Original file line number Diff line number Diff line change
Expand Up @@ -10,30 +10,28 @@
"allClasses:" : "ct 12/12/2024 03:00",
"allSystemCategories" : "ct 12/12/2024 02:39",
"allSystemCategories:" : "ct 12/12/2024 02:59",
"aspectDependencies" : "ct 12/12/2024 03:31",
"availableClasses" : "ct 12/17/2024 22:09",
"availableClasses" : "ct 12/22/2024 01:18",
"availableSystemCategories" : "ct 12/12/2024 02:38",
"buildButtons:" : "ct 12/12/2024 02:21",
"buildClassList:" : "ct 12/22/2024 00:32",
"buildCreateDialogWith:" : "ct 12/12/2024 02:20",
"buildEditDialogWith:" : "ct 12/12/2024 03:46",
"buildSystemCategoryList:" : "ct 12/22/2024 00:38",
"cached:" : "ct 12/22/2024 01:07",
"cancel" : "ct 12/12/2024 03:05",
"cancelColor" : "ct 12/12/2024 03:03",
"changed:" : "ct 2/8/2022 14:49",
"changedDependent:" : "ct 2/8/2022 14:49",
"changed:" : "ct 12/22/2024 01:13",
"class:select:" : "ct 12/22/2024 01:29",
"classAt:select:" : "ct 12/12/2024 03:33",
"classMenu:" : "ct 12/22/2024 00:43",
"classesInSystemCategory:" : "ct 12/22/2024 01:25",
"close:" : "ct 12/12/2024 03:05",
"createOrCancel:" : "ct 12/12/2024 03:38",
"dependentAspectsOn:" : "ct 2/8/2022 14:49",
"edit:" : "ct 12/12/2024 03:46",
"hasClassSelected:" : "ct 12/12/2024 03:06",
"hasClassSelectedAt:" : "ct 12/12/2024 03:04",
"hasSystemCategorySelected:" : "ct 12/12/2024 03:14",
"hasSystemCategorySelectedAt:" : "ct 12/12/2024 03:14",
"hasClassSelected:" : "ct 12/22/2024 01:02",
"hasClassSelectedAt:" : "ct 12/22/2024 01:02",
"hasSystemCategorySelected:" : "ct 12/22/2024 01:02",
"hasSystemCategorySelectedAt:" : "ct 12/22/2024 01:02",
"initialize" : "ct 12/22/2024 01:07",
"initializeWithSystemOrganizer:" : "ct 12/21/2024 21:38",
"invertSelection:" : "ct 12/22/2024 00:41",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
"allClasses",
"accepted",
"selectedSystemCategory",
"selectedClass" ],
"selectedClass",
"caches" ],
"name" : "SL2TargetChooser",
"pools" : [
],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
updating
aspectDependencies

| pragmaDependencies |
pragmaDependencies := (Pragma allNamed: #uses: from: self class to: thisContext methodClass)
collect: [:pragma | pragma selector -> (pragma argumentAt: 1)]
as: Dictionary.

^ pragmaDependencies
^ Dictionary new
"Model"
at: #windowTitle put: #(#labelString);
"CodeHolder"
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"unregisterInWorldMenu" : "ct 12/17/2024 21:18" },
"instance" : {
"addModelItemsToWindowMenu:" : "ct 12/19/2024 23:25",
"aspectDependencies" : "ct 12/17/2024 23:12",
"aspectDependencies" : "ct 12/22/2024 01:49",
"authorFilterLabel" : "ct 12/10/2024 23:22",
"basicHelpForMessage:" : "ct 12/21/2024 21:20",
"browseSelectedTestNode" : "ct 12/21/2024 20:39",
Expand All @@ -22,8 +22,6 @@
"buildWith:" : "ct 12/10/2024 23:20",
"buttonBarHeight" : "ct 12/10/2024 23:09",
"changeTarget" : "ct 12/17/2024 21:48",
"changed:" : "ct 2/8/2022 14:49",
"changedDependent:" : "ct 2/8/2022 14:49",
"childrenForTestCategory:" : "ct 12/19/2024 21:06",
"childrenForTestNode:" : "ct 12/21/2024 20:49",
"childrenForTestNodePath:" : "ct 12/18/2024 04:42",
Expand All @@ -38,7 +36,6 @@
"dateFilterLabel" : "ct 12/10/2024 23:22",
"defaultShouldDisplayAllTests" : "ct 12/18/2024 03:07",
"defaultWindowColor" : "ct 12/10/2024 23:28",
"dependentAspectsOn:" : "ct 2/8/2022 14:49",
"displayedResults" : "ct 12/21/2024 20:49",
"displayedTestCategories" : "ct 12/18/2024 02:27",
"displayedTests" : "ct 12/21/2024 20:50",
Expand Down

0 comments on commit d943b5e

Please sign in to comment.