Skip to content

Commit

Permalink
tdb: fix robust context selection for multiple contexts with same name
Browse files Browse the repository at this point in the history
  • Loading branch information
LinqLover committed Dec 31, 2023
1 parent 2d02fde commit 581dfd3
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ selectContextSlice: aContextSlice
and: [(expanded includes: aContextSlice parent) not])
ifTrue:
[expanded addAll: aContextSlice withAllParents.

self flag: #brittle. "if there are multiple slices with the same name..."
self changed:
#(openPath) ,
(aContextSlice withAllParents
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@
"resultForContextSlice:ifLeaf:ifParent:" : "ct 7/22/2022 14:20",
"resultLabelFor:" : "ct 7/21/2022 21:39",
"rootContextSlices" : "ct 6/19/2022 16:03",
"selectContextSlice:" : "ct 12/28/2022 23:06",
"selectContextSlice:" : "ct 12/31/2023 01:24",
"selectedClassOrMetaClass" : "ct 7/3/2022 22:07",
"selectedContextSlice" : "ct 6/19/2022 16:04",
"sendFeedback" : "ct 7/31/2022 19:55",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@ selectAndExpandContext: aContext

self cacheSourcesDuring:
[self selectContext: aContext.

self flag: #brittle. "if there are multiple slices with the same name..."
self changed: #(openPath) , (self treeSelectedContextPath collect: [:context | context asString]).

self flag: #coroutines.
(self selectedContext tdbIdentical: aContext) ifFalse:
[selectedContext := aContext.
self changed: #cursorPosition]].
[self selectContext: aContext]].
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ selectContext: aContext
self cacheSourcesDuring:
[self basicSelectContext: aContext.
self changed: #treeSelectedContextPath.

self flag: #coroutines.
(self selectedContext tdbIdentical: aContext) ifFalse:
[selectedContext := aContext.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -214,8 +214,8 @@
"restart" : "ct 1/8/2022 01:26",
"rootContexts" : "ct 1/25/2022 20:02",
"runToSelection:" : "ct 2/17/2022 19:10",
"selectAndExpandContext:" : "ct 12/30/2023 23:17",
"selectContext:" : "ct 12/30/2023 23:17",
"selectAndExpandContext:" : "ct 12/31/2023 01:24",
"selectContext:" : "ct 12/31/2023 01:25",
"selectedContext" : "ct 11/20/2021 22:20",
"selectedContextPath" : "ct 1/26/2022 17:06",
"selectedMessage" : "ct 2/12/2022 22:34",
Expand Down

1 comment on commit 581dfd3

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed Screenshots/Help

This push caused a change of 1 artifact against the default branch:

Please sign in to comment.